write-script-bunnative

Write Bun-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-bunnative-kma-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-bunnative
Source: https://github.com/kma-core/windmill/tree/main/system_prompts/auto-generated/skills/write-script-bunnative
Command: npx skills add https://github.com/kma-core/windmill --skill write-script-bunnative-kma-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing scripts for Windmill's Bun Native TypeScript runtime requires following strict constraints—no external imports, a single exported async main function, and fetch-based API calls—and this Skill ensures generated scripts comply with those rules while guiding correct CLI usage for previewing and deploying. ## Core Features & Use Cases - Bun Native Script Authoring: Generates TypeScript scripts with a single exported async main function, using only the global fetch API and the RT namespace for typed resources. - CLI Workflow Guidance: Distinguishes between wmill script preview for local iteration, wmill script run for deployed scripts, and wmill sync push for explicit deployments. - Preprocessor and S3 Patterns: Provides templates for trigger preprocessor scripts and S3 object operations via the windmill-client SDK. - Use Case: A developer asks for a script that calls an external REST API with a stored credential; the Skill produces a Bun-native script using an RT resource type and suggests running wmill script preview with sample arguments. ## Quick Start Write a Bun native Windmill script that fetches data from an external API using a stored resource credential, then preview it locally with sample arguments.

Frequently Asked Questions about write-script-bunnative

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

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

Export a single async function named main with typed parameters and return a value. External imports are not allowed in Bun native mode, so use the globally available fetch function for HTTP calls and the RT namespace for resource types.

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

wmill script preview executes a local script file without deploying it, making it the default for iterating on local edits. wmill script run executes the version already deployed in the workspace and should only be used when testing the deployed version.

Can I use npm imports in Windmill Bun native scripts?

No, Bun native mode does not allow external imports. Use the global fetch function for HTTP requests and the RT namespace for typed resources; the windmill-client SDK is unavailable in this mode.

How do I use resource types in a Windmill TypeScript script?

Declare parameters with types from the RT namespace, such as RT.Stripe, so Windmill injects the resource value at runtime. Check the rt.d.ts file generated by wmill resource-type generate-namespace for available types and fields.

When should I run wmill sync push on a script?

Run wmill sync push only when you explicitly intend to deploy or publish local changes to the workspace. For testing local edits, use wmill script preview instead, since pushing overwrites the workspace version with untested changes.