Agent skill

Bun Init

by involvex in involvex/youtube-music-cli

Initialize a new Bun project with TypeScript and optimal configuration.

MITAuto-check: notesFrontend & Design

Install Bun Init

skills CLI
$ npx skills add involvex/youtube-music-cli --skill bun-init -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install involvex/youtube-music-cli bun-init --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/involvex/youtube-music-cli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/bun-init .claude/skills/bun-init && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bun-init
GitHub stars
456
Token cost
~2.1k tokens
SKILL.md length
385 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Initialize a new Bun project with TypeScript and optimal configuration.

  • Works in 10 steps: Check Prerequisites → Determine Project Type → Run Bun Init → …
  • Starting a new Bun project
  • SKILL.md covers Workflow, Post-Initialization Checklist, Key Configuration Principles and Common Adjustments, plus 1 more section
  • Calls bun; needs API_KEY

What it does

Bun Init is an agent skill from involvex/youtube-music-cli. Initialize a new Bun project with TypeScript and optimal configuration. Use when starting a new Bun project or converting a directory to a Bun project.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Requires Bun 1.0+

It sits in Frontend & Design. It works with TypeScript, npm and YouTube. The repository describes itself as: A powerful Terminal User Interface (TUI) music player for YouTube Music. The licence is MIT.

When your agent uses it

  • Starting a new Bun project
  • Converting a directory to a Bun project

Example prompts

  • “/bun-init”

Requirements

  • A credential in API_KEY
  • Compatibility (from SKILL.md): Requires Bun 1.0+
  • Pre-approved tools (allowed-tools): Bash, Write, Read

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. Check Prerequisites
  2. Determine Project Type
  3. Run Bun Init
  4. Enhance TypeScript Configuration
  5. Create Project Structure
  6. Create .gitignore
  7. Create Environment Template
  8. Update package.json Scripts
  9. Install Common Dependencies
  10. Create Initial Test File

What it can do on your machine

Read from SKILL.md and the folder at commit a0d4e49. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Write
    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bun

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires Bun 1.0+

    From compatibility in the SKILL.md frontmatter.

Context cost

Bun Init loads about 2.1k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 385 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:245
    .env
  • NoteMentions a .env fileSKILL.md:246
    .env.local
  • NoteMentions a .env fileSKILL.md:247
    .env.*.local
  • NoteMentions a .env fileSKILL.md:389
    - Copy `.env.example` to `.env` and configure
  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Write, Read

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from involvex/youtube-music-cli at commit a0d4e49, republished under its MIT licence (© involvex). 385 words, ~2,112 tokens.

Download SKILL.mdSave it as .claude/skills/bun-init/SKILL.md (or your agent's skills folder).
name
bun-init
description
Initialize a new Bun project with TypeScript and optimal configuration. Use when starting a new Bun project or converting a directory to a Bun project.
allowed-tools
Bash, Write, Read
compatibility
Requires Bun 1.0+
metadata.author
dale
metadata.category
bun-runtime
metadata.tags
bun, javascript, typescript, initialization, setup

Bun Project Initialization

You are assisting with initializing a new Bun project. Follow these steps to create a well-structured project with optimal configurations.

Workflow

1. Check Prerequisites

First, verify Bun is installed:

bash
bun --version

If Bun is not installed, provide installation instructions for the user's platform.

2. Determine Project Type

Ask the user which type of project they want to create:

  • CLI Tool: Command-line application with bin entry point
  • Web App: Frontend application with React/Vue/etc
  • API Server: Backend API with routing framework
  • Library: Reusable package for publishing to npm
3. Run Bun Init

Execute the initialization command:

bash
bun init -y

This creates:

  • package.json with Bun-optimized scripts
  • tsconfig.json with recommended TypeScript settings
  • index.ts as the entry point
  • README.md with basic project info
4. Enhance TypeScript Configuration

Read the generated tsconfig.json and enhance it based on project type:

For CLI Tools:

json
{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "types": ["bun-types"],
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "allowImportingTsExtensions": true,
    "noEmit": true
  }
}

For Web Apps:

json
{
  "compilerOptions": {
    "target": "ES2022",
    "lib": ["ES2022", "DOM", "DOM.Iterable"],
    "module": "ESNext",
    "moduleResolution": "bundler",
    "jsx": "react-jsx",
    "types": ["bun-types"],
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "allowImportingTsExtensions": true,
    "noEmit": true
  }
}

For API Servers:

json
{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "types": ["bun-types"],
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "allowImportingTsExtensions": true,
    "noEmit": true,
    "paths": {
      "@/*": ["./src/*"]
    }
  }
}

For Libraries:

json
{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "types": ["bun-types"],
    "strict": true,
    "declaration": true,
    "declarationMap": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "allowImportingTsExtensions": true,
    "noEmit": true
  }
}
5. Create Project Structure

Generate appropriate directory structure and files:

CLI Tool:

project/
├── src/
│   ├── index.ts          # Main CLI entry point
│   ├── commands/         # Command handlers
│   └── utils/            # Shared utilities
├── tests/
│   └── index.test.ts
├── package.json
├── tsconfig.json
├── .gitignore
├── .env.example
└── README.md

Create src/index.ts:

typescript
#!/usr/bin/env bun

console.log("Hello from Bun CLI!");

// Example: Parse command line arguments
const args = process.argv.slice(2);
console.log("Arguments:", args);

Update package.json to add bin field:

json
{
  "bin": {
    "your-cli-name": "./src/index.ts"
  }
}

Web App:

project/
├── src/
│   ├── index.tsx         # App entry point
│   ├── components/       # React components
│   ├── styles/           # CSS/styles
│   └── utils/            # Utilities
├── public/
│   └── index.html
├── tests/
├── package.json
├── tsconfig.json
├── .gitignore
├── .env.example
└── README.md

API Server:

project/
├── src/
│   ├── index.ts          # Server entry point
│   ├── routes/           # Route handlers
│   ├── middleware/       # Express/Hono middleware
│   ├── services/         # Business logic
│   └── types/            # TypeScript types
├── tests/
├── package.json
├── tsconfig.json
├── .gitignore
├── .env.example
└── README.md

Create src/index.ts:

typescript
const server = Bun.serve({
  port: 3000,
  fetch(request) {
    return new Response("Welcome to Bun!");
  },
});

console.log(`Server running at http://localhost:${server.port}`);

Library:

project/
├── src/
│   ├── index.ts          # Main export
│   └── types.ts          # Type definitions
├── tests/
├── package.json
├── tsconfig.json
├── .gitignore
└── README.md
6. Create .gitignore

Generate a comprehensive .gitignore:

gitignore
# Bun
node_modules
bun.lockb
*.bun

# Environment
.env
.env.local
.env.*.local

# Build outputs
dist/
build/
*.tsbuildinfo

# Logs
logs
*.log
npm-debug.log*

# OS
.DS_Store
Thumbs.db

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# Test coverage
coverage/
.nyc_output/
7. Create Environment Template

Create .env.example:

bash
# Application
NODE_ENV=development
PORT=3000

# Add your environment variables here
# DATABASE_URL=
# API_KEY=
8. Update package.json Scripts

Add project-type-specific scripts:

CLI Tool:

json
{
  "scripts": {
    "dev": "bun run src/index.ts",
    "test": "bun test",
    "lint": "bun run --bun eslint src",
    "typecheck": "bun run --bun tsc --noEmit"
  }
}

Web App:

json
{
  "scripts": {
    "dev": "bun run --hot src/index.tsx",
    "build": "bun build src/index.tsx --outdir=dist --minify",
    "test": "bun test",
    "typecheck": "bun run --bun tsc --noEmit"
  }
}

API Server:

json
{
  "scripts": {
    "dev": "bun run --hot src/index.ts",
    "start": "bun run src/index.ts",
    "test": "bun test",
    "typecheck": "bun run --bun tsc --noEmit"
  }
}

Library:

json
{
  "scripts": {
    "build": "bun build src/index.ts --outdir=dist --minify --sourcemap=external",
    "test": "bun test",
    "typecheck": "bun run --bun tsc --noEmit",
    "prepublishOnly": "bun run build && bun test"
  }
}
9. Install Common Dependencies

Suggest installing common dependencies based on project type:

CLI Tool:

bash
bun add commander chalk ora
bun add -d @types/node

Web App:

bash
bun add react react-dom
bun add -d @types/react @types/react-dom

API Server:

bash
bun add hono
bun add -d @types/node

Library:

bash
# No default dependencies - user will add as needed
10. Create Initial Test File

Create a basic test file in tests/:

typescript
import { describe, expect, test } from "bun:test";

describe("Initial test", () => {
  test("basic assertion", () => {
    expect(1 + 1).toBe(2);
  });
});
Show full SKILL.md (158 more words)Show less

Post-Initialization Checklist

After completing the setup, provide the user with:

  1. ✅ Confirmation of project type created
  2. ✅ List of generated files and directories
  3. ✅ Next steps:
    • Copy .env.example to .env and configure
    • Run bun install if dependencies were suggested
    • Run bun dev to start development
    • Run bun test to verify tests work

Key Configuration Principles

  • Module Resolution: Use "moduleResolution": "bundler" for Bun's native resolution
  • TypeScript Types: Always include "types": ["bun-types"]
  • No Emit: Set "noEmit": true since Bun runs TypeScript directly
  • Import Extensions: Enable "allowImportingTsExtensions": true for .ts imports
  • Strict Mode: Enable strict TypeScript checks for better code quality

Common Adjustments

If user wants workspaces (monorepo):

Add to package.json:

json
{
  "workspaces": ["packages/*"]
}

If user wants path aliases:

Add to tsconfig.json:

json
{
  "compilerOptions": {
    "paths": {
      "@/*": ["./src/*"],
      "@components/*": ["./src/components/*"]
    }
  }
}

If user wants JSX without React:

Update tsconfig.json:

json
{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "preact" // or other JSX runtime
  }
}

Completion

Once all files are created, inform the user that initialization is complete and provide a summary of:

  • Project structure
  • Available npm scripts
  • Recommended next steps
  • Links to Bun documentation for their project type

© involvex, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/bun-init of involvex/youtube-music-cli.

Open the folder on GitHubat commit a0d4e49

Compare with similar skills

Bun Init next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bun Init compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bun Init this skillinvolvex/youtube-music-cli456—~2.1kAutomated safety check: NotesMIT
Create Docsvictorgarciaesgi/nuxt-typed-router4132 repos~2.8kAutomated safety check: PassMIT
Add npm Dependencyelirantutia/vibeyard1.4k—~1.5kAutomated safety check: PassMIT
Vuetify Skilldlogue/vite-vuetify-ts-starter1811 repos~1.9kAutomated safety check: PassMIT
Compare Array Bundle SizePostHog/posthog-js613—~599Automated safety check: PassCustom licence
Reduce Bundle Sizekcsujeet/ilamy-calendar351—~2.9kAutomated safety check: PassMIT

Similar skills

  • Create Docs

    victorgarciaesgi/nuxt-typed-router

    Create complete documentation sites for projects. An agent skill from victorgarciaesgi/nuxt-typed-router.

    413 GitHub starsUsed in 2 repos~2.8k tokens
    Frontend & DesignAuto-check passed
  • Add npm Dependency

    elirantutia/vibeyard

    This skill MUST be used whenever the task involves adding, installing, or upgrading an npm package/library/dependency in this project.

    1.4k GitHub stars~1.5k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Vuetify Skilld

    logue/vite-vuetify-ts-starter

    Vue Material Component Framework. An agent skill from logue/vite-vuetify-ts-starter.

    181 GitHub starsUsed in 1 repo~1.9k tokens
    Frontend & DesignAuto-check passed
  • Compare Array Bundle Size

    PostHog/posthog-js

    Official

    Quickly compare the posthog-js array.js bundle size in the current working tree against a git baseline using the repository's esbuild proxy.

    613 GitHub stars~599 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Reduce Bundle Size

    kcsujeet/ilamy-calendar

    Systematically reduce the shipped bundle size of a JS/TS library without sacrificing code readability or breaking consumer APIs.

    351 GitHub stars~2.9k tokensUpdated 4 days ago
    Frontend & DesignAuto-check passed
  • npm Library Setup

    vana-com/personal-server

    Comprehensive guidance on setting up npm libraries with package.json, with a preference for ES Modules (ESM).

    116 GitHub stars~1.1k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed

More from involvex/youtube-music-cli

  • React State Management

    involvex/youtube-music-cli

    Master modern React state management with Redux Toolkit, Zustand, Jotai, and React Query.

    456 GitHub starsUsed in 12 repos~3k tokens
    Auto-check passed
  • Bun Win32

    involvex/youtube-music-cli

    Win32 FFI binding lifecycle for @bun-win32/ packages (Win32 DLL bindings via bun:ffi on Windows).

    456 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Bun Build

    involvex/youtube-music-cli

    Create optimized production bundles with Bun's native bundler.

    456 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check: notes
  • Bun Dev Server

    involvex/youtube-music-cli

    Set up high-performance development servers with Hot Module Replacement.

    456 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check: notes
  • Bun Test

    involvex/youtube-music-cli

    Configure Bun's built-in test runner with Jest-compatible APIs.

    456 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check: notes

Questions about Bun Init

What does Bun Init do?

Initialize a new Bun project with TypeScript and optimal configuration. Bun Init is an agent skill from involvex/youtube-music-cli. Initialize a new Bun project with TypeScript and optimal configuration.

When should I use Bun Init?

Bun Init fits situations like: starting a new Bun project; converting a directory to a Bun project.

How do I install Bun Init in Claude Code?

Run `npx skills add involvex/youtube-music-cli --skill bun-init -a claude-code`. Or copy the skill folder (.agents/skills/bun-init in involvex/youtube-music-cli) into .claude/skills/bun-init in your project. Claude Code loads it when a task matches its description.

How do I install Bun Init in Codex?

Run `npx skills add involvex/youtube-music-cli --skill bun-init -a codex`. Or copy the skill folder (.agents/skills/bun-init in involvex/youtube-music-cli) into .agents/skills/bun-init in your project. Codex loads it when a task matches its description.

Can I use Bun Init in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add involvex/youtube-music-cli --skill bun-init -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bun-init, .gemini/skills/bun-init, .github/skills/bun-init and .opencode/skills/bun-init in your project.

What does Bun Init need to run?

Going by SKILL.md and its folder, Bun Init needs the command-line tools its instructions call (bun) and credentials named API_KEY. Our summary lists: A credential in API_KEY. Its frontmatter pre-approves these tools: Bash, Write, Read. Compatibility (from SKILL.md): Requires Bun 1.0+.

Does Bun Init access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Bun Init safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file; pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Bun Init use?

Bun Init is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bun Init use?

About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bun Init?

Skills that share tags, products or a category with Bun Init: Create Docs (victorgarciaesgi/nuxt-typed-router, 413 stars), Add npm Dependency (elirantutia/vibeyard, 1.4k stars), Vuetify Skilld (logue/vite-vuetify-ts-starter, 181 stars) and Compare Array Bundle Size (PostHog/posthog-js, 613 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bun Init?

involvex (a GitHub user) maintains it in involvex/youtube-music-cli, which has 456 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 6, 2026.

Source: involvex/youtube-music-cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.