write-script-nativets

Write Native TypeScript scripts for Windmill using fetch-only execution without external imports.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing scripts for Windmill's Native TypeScript runtime requires following strict constraints—no external imports, a single exported async main function, and fetch-only API access—that are easy to get wrong without guidance. ## Core Features & Use Cases - Native TypeScript Script Authoring: Produces scripts with a single exported async main function that rely solely on the global fetch API, with no external imports allowed. - Resource Type Integration: Uses the RT namespace (e.g., RT.Stripe) to inject Windmill credentials and configuration, validated against the generated rt.d.ts file. - CLI Workflow Guidance: Directs the correct use of wmill script preview for local iteration, wmill script run for deployed scripts, wmill generate-metadata for lock files, and wmill sync push only for explicit deploys. - Use Case: A developer asks for a script that calls the Stripe API. The Skill generates a native TypeScript main function accepting stripe: RT.Stripe, uses fetch for the HTTP call, then runs wmill script preview with sample arguments to validate it locally. ## Quick Start Write a Windmill native TypeScript script that fetches data from an API and preview it locally with sample arguments.

Frequently Asked Questions about write-script-nativets

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

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

Export a single async function named main with typed parameters and return a value. Native TypeScript mode allows no external imports, so use the globally available fetch function for all HTTP calls.

How do I test a Windmill script locally before deploying?

Run wmill script preview <script_path> to execute the local file without deploying it to the workspace. Use wmill script run only when you want to test the version already deployed on the server.

Can I use npm packages in Windmill native TypeScript scripts?

No, native TypeScript mode does not allow any imports. You must use the global fetch function to call APIs directly, and the windmill-client SDK is unavailable in this mode.

How do I use credentials in a Windmill TypeScript script?

Declare a parameter typed with the RT namespace, such as stripe: RT.Stripe, and Windmill injects the resource value at runtime. Check the rt.d.ts file generated by wmill resource-type generate-namespace for available types.

When should I run wmill sync push versus script preview?

Use script preview while iterating on local edits since it runs the file without deploying. Only run wmill sync push when you explicitly want to publish changes to the workspace, since pushing overwrites the deployed version.