write-script-deno_skill

This skill helps you write Deno/TypeScript scripts for Windmill by guiding structure, imports, and resource usage.
  • HTML

15.8k

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill windmill-labs/windmill --skill write-script-deno

  • SKILL.md20.5 KB

Overview

This skill provides concise conventions and examples for writing Deno/TypeScript scripts that run on the Windmill platform. It covers file structure, required exports, imports, resource handling, S3 operations, and how to use the windmill-client SDK. Use this whenever you author or maintain scripts intended to be deployed and executed in Windmill.

How this skill works

Write a single async exported function named main (or preprocessor for preprocessor scripts) that Windmill will call with parameters and resources. Use the RT namespace for typed resource inputs, import npm packages with the npm: prefix, and use the windmill-client SDK for platform interactions, state, and S3 I/O. After authoring, run the CLI commands to generate metadata and push the script to Windmill.

When to use it

  • When building Deno/TypeScript scripts targeted at Windmill.
  • When you need platform-integrated resource access (API keys, DB config).
  • When you need to read/write files to S3 from a script.
  • When you want to call or orchestrate other scripts or flows via the SDK.
  • When writing preprocessor scripts to transform incoming events.

Best practices

  • Export only a single async function named main for normal scripts; use preprocessor(event) for preprocessor scripts.
  • Use the RT namespace for resource-typed parameters so credentials and configs are injected automatically.
  • Import npm modules using the npm: prefix and Deno std libs via full URLs.
  • Do not invoke main yourself; Windmill calls it with parameters and resource values.
  • Use windmill-client methods (runScriptByPath, setState, loadS3File, etc.) for platform operations instead of custom HTTP hacks.

Example use cases

  • A Deno script that accepts a Stripe RT resource and charges a customer using npm:stripe.
  • A preprocessor that maps webhook body and query params into typed script inputs.
  • A batch job that reads CSVs from S3, processes them with Deno streams, and writes results back to S3.
  • A flow task that runs child scripts via wmill.runScriptByPath and aggregates results.
  • A script that generates a DB URL from a database resource using wmill.databaseUrlFromResource.

FAQ

Import npm packages with the npm: prefix (e.g., import Stripe from "npm:stripe") or use Deno standard library URLs; Windmill handles installation at deploy time.

What export name should I use for preprocessor scripts?

Name the function preprocessor and accept an event object with kind, body, headers, and query to return the mapped parameters.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
write-script-deno skill by windmill-labs/windmill | VeilStrat