write-script-bun

Create Bun/TypeScript scripts with an async main function template.

17.5k|1.1k|Updated May 5, 2022
One-click install
npx skills add https://github.com/windmill-labs/windmill --skill write-script-bun
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-bun
Source: https://github.com/windmill-labs/windmill/tree/main/system_prompts/auto-generated/skills/write-script-bun
Command: npx skills add https://github.com/windmill-labs/windmill --skill write-script-bun

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers often struggle with starting Bun/TypeScript scripts due to boilerplate setup, inconsistent structures, and lack of a guided template. This skill provides a clear starting point and conventions to speed script creation.

Core Features & Use Cases

  • Standard async main: export a single async function named main to define the script's entry point.
  • Guided imports and resource usage: demonstrates how to import libraries and access Windmill resources via the RT namespace.
  • Quick-start templates: offers a ready-to-adapt Bun/TS skeleton for automation tasks, CLI utilities, or small microservices.

Quick Start

Create a new Bun/TS script using this skill, implement an async main function that returns a result, and run wmill commands to generate metadata and deploy as needed.

Frequently Asked Questions about write-script-bun

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

FAQPage Schema
How do I create a Bun TypeScript script with a standard structure?

Write a Bun/TypeScript script by exporting a single async main function as the entry point. This skill provides a ready-to-use template with guided imports, resource access via the RT namespace, and enforced conventions to eliminate boilerplate setup and ensure consistent structure across automation tools and CLI utilities.

What's the fastest way to build automation tools with Bun?

Use Bun's runtime with TypeScript to build lightweight automation scripts. This skill accelerates development by offering a quick-start skeleton, standard async main patterns, and built-in guidance for importing libraries and accessing resources, letting you focus on logic rather than setup.

Can I use Bun to write CLI utilities and microservices?

Yes. Bun/TypeScript scripts created with this skill support CLI utilities, lightweight microservices, and automation tasks. The structured template and async main function pattern provide a foundation scalable from simple scripts to small services within the Bun ecosystem.

What do I need to run a Bun TypeScript script?

You need the Bun runtime and standard TypeScript tooling installed. This skill requires these prerequisites and guides you through defining an async main function, importing dependencies, and accessing Windmill resources to deploy and run your script.

Why use a structured template for Bun scripts instead of starting from scratch?

A structured template eliminates boilerplate, enforces consistent conventions, and provides proven patterns for imports and resource access. This skill reduces setup friction and ensures your script follows best practices for Bun/TypeScript automation from the start.

How do I access Windmill resources in a Bun TypeScript script?

Access Windmill resources through the RT namespace within your async main function. This skill demonstrates the import patterns and resource-access conventions, enabling you to integrate Windmill capabilities directly into your automation workflow.