write-script-deno

Writes Deno/TypeScript scripts for Windmill with correct structure, imports, and CLI testing commands.

Updated May 28, 2026
One-click install
npx skills add https://github.com/kma-core/windmill --skill write-script-deno-kma-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-deno
Source: https://github.com/kma-core/windmill/tree/main/system_prompts/auto-generated/skills/write-script-deno
Command: npx skills add https://github.com/kma-core/windmill --skill write-script-deno-kma-core

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires windmill-client.

What problem does it solve? Writing scripts for the Windmill platform requires following specific conventions—an exported async main function, the RT namespace for resource types, npm: prefixed imports, and the right CLI command for testing versus deploying. This Skill ensures every Deno/TypeScript script you write follows these rules and that you test changes with wmill script preview instead of accidentally deploying untested code. ## Core Features & Use Cases - Correct Script Structure: Generates scripts with a single exported async main function, proper resource typing via the RT namespace, and Deno-compatible imports (npm: prefix, Deno standard library URLs). - Safe Test-vs-Deploy Workflow: Distinguishes wmill script preview (run local edits without deploying) from wmill script run (run the deployed version) and wmill sync push (deploy only on explicit request), preventing accidental overwrites of workspace scripts. - Platform API Access: Provides the full windmill-client SDK surface—running scripts and flows, managing resources, variables, state, S3 file operations, approval flows, and workflow-as-code primitives like task, step, and parallel. - Use Case: Ask for a script that reads a CSV from S3 and inserts rows into PostgreSQL; the Skill produces a valid Deno script using wmill.loadS3File and a database resource, then offers to run wmill script preview with sample arguments. ## Quick Start Write a Windmill Deno script that fetches data from an API and stores the result, then preview it locally with sample arguments.

Frequently Asked Questions about write-script-deno

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a TypeScript script for Windmill?

Export a single async function named main whose parameters become the script's arguments. Use npm: prefixed imports for packages, the RT namespace for resource types, and import the windmill-client SDK for platform interactions like resources, state, and S3.

How do I test a Windmill script locally without deploying?

Run wmill script preview <script_path> with optional -d '<args>' to execute the local file without deploying. Use wmill script run only for scripts already deployed in the workspace, and wmill sync push only when you explicitly want to publish changes.

What is the difference between wmill script preview and script run?

script preview executes your local script file without deploying it, making it the default for iterating on edits. script run executes the version already deployed in the workspace, so it ignores uncommitted local changes.

How do I use credentials or resources in a Deno Windmill script?

Declare a parameter typed with the RT namespace, such as main(stripe: RT.Stripe), and Windmill injects the resource value at runtime. Check the generated rt.d.ts file or run wmill resource-type list --schema to discover available resource types.

Can Windmill Deno scripts read and write S3 files?

Yes. The windmill-client SDK provides loadS3File, loadS3FileStream, writeS3File, and deleteS3File, all operating on the wmill.S3Object type. If no S3 resource path is given, the workspace default storage is used.

When should I not use wmill sync push?

Do not run sync push just to test a script, because pushing deploys untested local changes over the workspace version. Use script preview for testing and reserve sync push for when you explicitly intend to deploy or publish.