write-script-bun

Create Bun/TypeScript scripts with a main export and Windmill resource integration.

Updated Feb 21, 2026
One-click install
npx skills add https://github.com/adamkingsbury/unified-data-model --skill write-script-bun-adamkingsbury
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-bun
Source: https://github.com/adamkingsbury/unified-data-model/tree/main/.claude/skills/write-script-bun
Command: npx skills add https://github.com/adamkingsbury/unified-data-model --skill write-script-bun-adamkingsbury

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bun/TypeScript script development often lacks a standardized entry point and resource handling. This guide provides a clear pattern for creating Bun scripts that integrate with Windmill, enabling deterministic execution and consistent structure.

Core Features & Use Cases

  • Standard main export: export async function main(...) to define a single entry point for Bun/TypeScript scripts.
  • Windmill resource integration: access credentials and configuration through the RT namespace to satisfy requirements of Windmill workflows.
  • Optional scaffolding: support for optional directories (scripts/, references/, assets/) to organize helpers, docs, and assets as needed.

Quick Start

Create a Bun/TypeScript script by exporting an async function named main and wire it to Windmill resources using the RT namespace; this script should be placed in the project and executed according to Windmill's workflow.

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 for Windmill?

To create a Bun TypeScript script for Windmill, you export an async function named main as the single entry point and wire it to Windmill resources using the RT namespace. This ensures deterministic execution and consistent structure.

How does Windmill resource integration work with Bun scripts?

Windmill resource integration works with Bun scripts by using the RT namespace to access credentials and configuration. This connection satisfies Windmill workflow requirements and allows your TypeScript code to retrieve necessary external resources.

Do I need a specific directory structure for Windmill Bun scripts?

You do not need a specific directory structure, as Bun scripts support optional scaffolding. You can organize helpers, docs, and assets in optional directories like scripts/, references/, and assets/ to extend functionality as needed.

What's the best way to structure a deterministic Windmill task in TypeScript?

The best way to structure deterministic Windmill tasks in TypeScript is using a standard main export pattern. Exporting an async function named main defines a unified script entry point for consistent execution and resource access.

Can I use Bun with Windmill workflows for automation tasks?

Yes, you can use Bun with Windmill workflows for automation tasks. This approach automates Bun/TypeScript script creation with a standard main entry point and Windmill resource integration for deterministic task execution.

Why define a main export function for Windmill scripts?

You define a main export function for Windmill scripts to establish a standardized single entry point. This pattern solves the problem of undefined entry points and ensures consistent structure for Bun/TypeScript development.