write-script-bunnative

Enforce a single exported async main function in TypeScript Bun Native scripts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes the creation of Bun Native scripts by enforcing a single, exported async main function and a consistent execution environment, reducing boilerplate and integration friction.

Core Features & Use Cases

  • Enforces a single exported async function named main(param1: string, param2: number) and a deterministic entry point
  • Uses Windmill's RT namespace to access credentials and configuration as resources
  • Provides guidelines for TypeScript Bun Native execution with fetch only (no external imports) and supports preprocessor scripts and S3 object operations
  • Outlines how to integrate S3 storage and resource handling within Bun Native scripts

Quick Start

Create a Bun Native script exporting an async main function and run wmill to generate metadata and deploy.

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 script with a deterministic entry point in Windmill?

Bun Native scripts require a single exported async main function to ensure deterministic execution in Windmill. This standardizes the entry point, reducing boilerplate and integration friction across your automation workflows.

What is the correct main function signature for TypeScript Bun Native scripts?

The correct main function signature for TypeScript Bun Native scripts is an exported async function named main with typed parameters, such as main(param1: string, param2: number). This enforces a deterministic entry point for script execution.

How do I access Windmill resources and credentials inside a Bun Native script?

You access Windmill resources and credentials inside a Bun Native script by using the RT namespace. This provides resource handling for configuration and credentials within your deterministic main function execution.

Can I use external imports or S3 operations in Bun Native scripts?

Bun Native scripts support fetch only without external imports, though they do support S3 object operations and preprocessor scripts. This restriction ensures deterministic script execution within the Windmill environment.

What are the limitations of writing Bun Native scripts for Windmill automation?

Limitations of writing Bun Native scripts include restrictions on external imports, allowing only fetch operations, and enforcing a single async main function. These constraints ensure deterministic execution but limit external library usage.