Agent skill

Bun 1.4 Builtins Guide

by code-yeongyu in code-yeongyu/senpi

Points the agent at Bun 1.4 built-in APIs before it installs an npm package, so image, browser, markdown, cron, PTY and test work uses what Bun already ships.

MITAuto-check passedDevelopment

Install Bun 1.4 Builtins Guide

skills CLI
$ npx skills add code-yeongyu/senpi --skill bun-1-4 -a claude-code

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

GitHub CLI
$ gh skill install code-yeongyu/senpi bun-1-4 --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/code-yeongyu/senpi.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/senpi-codemode/src/skill/bun-1-4 .claude/skills/bun-1-4 && 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-1-4
GitHub stars
470
Token cost
~1.3k tokens
SKILL.md length
530 words
Files
11 (incl. references)
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Points the agent at Bun 1.4 built-in APIs before it installs an npm package, so image, browser, markdown, cron, PTY and test work uses what Bun already ships.

  • Works in 5 steps: Eval-first. The eval js kernel runs on… → Builtin-first. The Replaces column above… → Read the matching reference before using… → …
  • Before installing sharp, puppeteer, marked or node-cron for a task in Bun
  • SKILL.md covers Capability map — what you can… and Operating rules
  • Calls bun

What it does

Written for sessions whose eval js kernel runs Bun 1.4 or later, this skill holds a capability map of builtins that stand in for utility npm packages. Examples are Bun.file().image() for sharp, Bun.WebView for puppeteer or playwright scraping, Bun.markdown for marked, Bun.cron for node-cron, Bun.spawn with a terminal option for node-pty and Bun.stringWidth for string-width. The agent consults the map before adding a dependency or writing a workaround.

It also covers static file serving through Bun.serve routes, HTTP/3, bun test flags for parallel runs, shards, changed files, retries and isolation, and bun build options such as --react-compiler and --compile --asset. Reference files handle breaking changes, build, install, security, tests, runtime APIs and more. When the Bun version is unknown, the skill says to confirm it with bun --version first.

When your agent uses it

  • Before installing sharp, puppeteer, marked or node-cron for a task in Bun
  • Running tests in parallel or in CI shards with bun test
  • Resizing images or rendering Markdown without extra dependencies
  • Spawning a PTY or a static file server from a JavaScript eval cell

Example prompts

  • “Resize every PNG in ./assets to webp using whatever Bun already provides.”
  • “I need a nightly job in this script, so see whether Bun has a built-in before adding node-cron.”
  • “Split our test suite across three CI shards with bun test.”

Requirements

  • Bun 1.4 or later

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Eval-first. The eval js kernel runs on Bun (that is why this skill is present): call Bun.* APIs directly inside js cells. Reach for bash…
  2. Builtin-first. The Replaces column above is a ban list for new dependencies, in production code, test helpers, and one-off scripts alike.
  3. Read the matching reference before using an unfamiliar API — signatures and caveats (e.g. Bun.markdown HTML is unsanitized, HTTP/3 is…
  4. Upgrading a project to 1.4 or debugging behavior that changed? Read breaking-changes first — YAML/TOML strictness, .xml/.css import…
  5. TLS errors after upgrade are usually intentional — 1.4 tightened certificate verification across fetch, tls.connect, Bun.connect…

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    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

    Links to these hosts (documentation or services it may open):

    • bun.com

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

Context cost

Bun 1.4 Builtins Guide loads about 1.3k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 159 tokens; SKILL.md has 530 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~159
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~12k

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 passed

The automated check found no risky patterns in SKILL.md.

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 code-yeongyu/senpi at commit 0fa9139, republished under its MIT licence (© code-yeongyu). 530 words, ~1,316 tokens.

Download SKILL.mdSave it as .claude/skills/bun-1-4/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
bun-1-4
description
Read before a js eval cell that installs a package, spawns a server or PTY, or starts a long run, and before any bun -e, script, server, CLI, test, bundle, or package-management work: this session's eval js kernel runs Bun 1.4+ (this skill is present only when it does). Bun 1.4 ships builtins that replace 15+ npm deps — check here BEFORE installing sharp, puppeteer/playwright (scraping), marked, node-cron, node-pty, concurrently, serve-static, tar, json5, fast-xml-parser, string-width. Triggers: eval js, bun, Bun.serve, bun test, bun build, bun install, bun run, image resize, headless browser, markdown render, cron, PTY.

Bun 1.4 — Use the Builtins First

Bun 1.4 (2026) ships builtins that replace most utility npm packages. Before adding a dependency or writing a workaround, check the capability map below — if Bun ships it, use the builtin. This skill is loaded because this session's eval js kernel runs Bun >= 1.4; on other machines or pinned projects, confirm with bun --version ([v1.3.x]/[v1.4.0] tags in the references give exact minimums). Release post: https://bun.com/blog/bun-v1.4

Capability map — what you can do now

You want to...UseReplacesRef = references/<name>.md
Resize/convert/rotate imagesBun.file(p).image().resize().webp().write()sharpruntime-apis
Headless browser: navigate, click, screenshot, evaluate, CDPnew Bun.WebView()puppeteer, playwright (scraping)runtime-apis
Markdown → HTML / React / ANSIBun.markdown.html() / .react() / .render()marked, react-markdownruntime-apis
Schedule cron jobsBun.cron()node-cronruntime-apis
Drive a PTY (bash, vim, TUIs) from JSBun.spawn([...], { terminal })node-ptyruntime-apis
Run package scripts concurrently, glob-matchedbun run --parallel "build:*"concurrently, npm-run-allruntime-apis
Parse JSON5 / JSONL / JSONC / XML / TOML; tarballsBun.JSON5/.JSONL/.JSONC/.XML/.TOML, Bun.Archivejson5, ndjson, jsonc-parser, fast-xml-parser, @iarna/toml, tarruntime-apis
ANSI-aware terminal text: width, slice, wrapBun.stringWidth(), Bun.sliceAnsi(), Bun.wrapAnsi()string-width, slice-ansi, wrap-ansiruntime-apis
Call C libraries 3x faster, plain strings backbun:ffi (buffer_length, cstring)—runtime-apis
Serve a static dir (ETag/Range/304 handled)Bun.serve({ routes: { "/x/*": { dir } } })express.static, serve-static, sirvhttp-networking
HTTP/3 server; fetch protocol/compress/proxyhttp3: true, fetch(url, { protocol, compress, proxy })—http-networking
Tests across CPU workers / CI shards / changed files / flaky retrybun test --parallel --shard=1/3 --changed=main --retryjest/vitest infratest
Kill "passes alone, fails in suite" bugsbun test --isolatevitest default behaviortest
React Compiler auto-memoizationbun build --react-compilerbabel-plugin-react-compilerbuild
Embed assets/dirs into a single-file executablebun build --compile --asset ./publicpkg hacksbuild
Compile-time feature flags, in-memory bundling, metafilebun:bundle feature(), files:{}, metafile: trueesbuild define/pluginsbuild
Diff package versions, fix vulns, dedupe/prune, license auditbun pm diff, bun audit fix, bun dedupe, bun prune, bun pm licensesnpm-diff, npm audit fixinstall
7x faster CI installs (global virtual store)linker = "isolated" in bunfig.tomlpnpm storeinstall
Profile CPU/heap/bundle as grep-able Markdownbun --cpu-prof-md, --heap-prof-md, bun build --metafile-mdChrome DevTools round-tripdev-tooling
Native REPL; render Markdown in terminalbun repl, bun ./README.mdnode repl, glowruntime-apis
Run Playwright, vitest, Next.js 16, OpenTelemetry, dd-tracethey now just workNode.jsnode-compat-platforms

Free wins (no code change): 2x lower CPU, 13-48% less server memory, 2-2.5x faster startup — full numbers in performance.

Show full SKILL.md (151 more words)Show less

Operating rules

  1. Eval-first. The eval js kernel runs on Bun (that is why this skill is present): call Bun.* APIs directly inside js cells. Reach for bash or a spawned bun <file> / bun -e only for CLI surfaces (bun test, bun build, bun pm) or work that needs a separate process.
  2. Builtin-first. The Replaces column above is a ban list for new dependencies, in production code, test helpers, and one-off scripts alike.
  3. Read the matching reference before using an unfamiliar API — signatures and caveats (e.g. Bun.markdown HTML is unsanitized, HTTP/3 is experimental) live there, not here.
  4. Upgrading a project to 1.4 or debugging behavior that changed? Read breaking-changes first — YAML/TOML strictness, .xml/.css import semantics, Bun.$ globbing, fetch header combining, and WebSocket close timing all changed.
  5. TLS errors after upgrade are usually intentional — 1.4 tightened certificate verification across fetch, tls.connect, Bun.connect, RedisClient. See security before loosening anything.

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

Files

SKILL.md and 10 other files (references) in packages/senpi-codemode/src/skill/bun-1-4 of code-yeongyu/senpi.

  • SKILL.md
  • references/breaking-changes.md
  • references/build.md
  • references/dev-tooling.md
  • references/http-networking.md
  • references/install.md
  • references/node-compat-platforms.md
  • references/performance.md
  • references/runtime-apis.md
  • references/security.md
  • references/test.md

Open the folder on GitHubat commit 0fa9139

Compare with similar skills

Bun 1.4 Builtins Guide 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 1.4 Builtins Guide compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bun 1.4 Builtins Guide this skillcode-yeongyu/senpi470—~1.3kAutomated safety check: PassMIT
Project Pull Requestswimmwatch/cloakbrowser-mcp161—~1kAutomated safety check: PassMIT
Bun Runtimespinspire/pocketbase-sveltekit-starter5115 repos~653Automated safety check: NotesMIT
Monorepo Tooling and Dependenciespierrecomputer/pierre6.2k—~1.1kAutomated safety check: PassApache-2.0
Bun Runtime and Toolkitmweinbach/agent-coworker156—~2.2kAutomated safety check: NotesCustom licence
Project Docs Maintainerswimmwatch/cloakbrowser-mcp161—~569Automated safety check: PassMIT

Similar skills

  • Project Pull Request

    swimmwatch/cloakbrowser-mcp

    Create, update, prepare, or review a cloakbrowser-mcp GitHub Pull Request only when the user explicitly requests PR work.

    161 GitHub stars~1k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Bun Runtime

    spinspire/pocketbase-sveltekit-starter

    Bun as runtime, package manager, bundler, and test runner. An agent skill from spinspire/pocketbase-sveltekit-starter.

    511 GitHub starsUsed in 5 repos~653 tokens
    DevelopmentAuto-check: notes
  • Sets one monorepo's rules for toolchain pins, pnpm package operations, the shared dependency catalog and moon tasks, so the agent adds versions and scripts the right way.

    6.2k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Bun Runtime and Toolkit

    mweinbach/agent-coworker

    Quick reference for using Bun to run TypeScript and JavaScript, install packages, bundle code, run tests and serve HTTP, with the key files and commands.

    156 GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check: notes
  • Project Docs Maintainer

    swimmwatch/cloakbrowser-mcp

    Maintain, organize, consolidate, or audit the cloakbrowser-mcp documentation set only when the user explicitly requests project documentation maintenance or an authorized public change requires it.

    161 GitHub stars~569 tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Fix Dependabot

    remotion-dev/remotion

    Official

    Fix a Dependabot PR by updating all monorepo instances of the dependency, running bun install, and pushing

    62k GitHub stars~509 tokensUpdated today
    DevelopmentAuto-check passed

More from code-yeongyu/senpi

  • Senpi Agent QA Harness

    code-yeongyu/senpi

    Checks changes to the senpi coding agent by driving the real CLI from source in an isolated sandbox, over RPC, terminal UI, mock model and CLI smoke channels.

    470 GitHub stars~2.7k tokensUpdated today
    Auto-check: notes
  • Merge Upstream into Fork

    code-yeongyu/senpi

    Syncs a fork branch with its upstream remote using a history-preserving merge commit, with no rebase and no force push.

    470 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Worker brief for implementing one pre-assigned feature in the senpi todotools built-in extension, with strict scope, typing, testing and git-safety rules.

    470 GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • GPT Image Prompt Guide

    code-yeongyu/senpi

    Prompt-crafting guide for gpt-image-2.5: which image tool to call, which model to pick, and how to write prompts, edit with references and refine over turns.

    470 GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Senpi Release Publishing

    code-yeongyu/senpi

    Walks the canonical CalVer release flow for senpi, from a clean main checkout through changelog audit, checks, tag push, GitHub Release and npm publishing.

    470 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Tmux Manual QA Worker

    code-yeongyu/senpi

    Runs one manual QA scenario for the todo continuation feature in the real ./pi-test.sh CLI inside tmux, captures scrollback and checks a deterministic count marker.

    470 GitHub stars~1.6k tokensUpdated today
    Auto-check passed

Questions about Bun 1.4 Builtins Guide

What does Bun 1.4 Builtins Guide do?

Points the agent at Bun 1.4 built-in APIs before it installs an npm package, so image, browser, markdown, cron, PTY and test work uses what Bun already ships. 4 or later, this skill holds a capability map of builtins that stand in for utility npm packages.stringWidth for string-width.

When should I use Bun 1.4 Builtins Guide?

Bun 1.4 Builtins Guide fits situations like: before installing sharp, puppeteer, marked or node-cron for a task in Bun; running tests in parallel or in CI shards with bun test; resizing images or rendering Markdown without extra dependencies; spawning a PTY or a static file server from a JavaScript eval cell.

How do I install Bun 1.4 Builtins Guide in Claude Code?

Run `npx skills add code-yeongyu/senpi --skill bun-1-4 -a claude-code`. Or copy the skill folder (packages/senpi-codemode/src/skill/bun-1-4 in code-yeongyu/senpi) into .claude/skills/bun-1-4 in your project. Claude Code loads it when a task matches its description.

How do I install Bun 1.4 Builtins Guide in Codex?

Run `npx skills add code-yeongyu/senpi --skill bun-1-4 -a codex`. Or copy the skill folder (packages/senpi-codemode/src/skill/bun-1-4 in code-yeongyu/senpi) into .agents/skills/bun-1-4 in your project. Codex loads it when a task matches its description.

Can I use Bun 1.4 Builtins Guide 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 code-yeongyu/senpi --skill bun-1-4 -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-1-4, .gemini/skills/bun-1-4, .github/skills/bun-1-4 and .opencode/skills/bun-1-4 in your project.

What does Bun 1.4 Builtins Guide need to run?

Going by SKILL.md and its folder, Bun 1.4 Builtins Guide needs the command-line tools its instructions call (bun). Our summary lists: Bun 1.4 or later.

Does Bun 1.4 Builtins Guide access the network?

SKILL.md names 1 domain. As links in the text: bun.com. This is read from the text; nothing was executed.

Is Bun 1.4 Builtins Guide safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Bun 1.4 Builtins Guide use?

Bun 1.4 Builtins Guide 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 1.4 Builtins Guide use?

About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 10k tokens, read only when the agent opens those files.

What are the alternatives to Bun 1.4 Builtins Guide?

Skills that share tags, products or a category with Bun 1.4 Builtins Guide: Project Pull Request (swimmwatch/cloakbrowser-mcp, 161 stars), Bun Runtime (spinspire/pocketbase-sveltekit-starter, 511 stars), Monorepo Tooling and Dependencies (pierrecomputer/pierre, 6.2k stars) and Bun Runtime and Toolkit (mweinbach/agent-coworker, 156 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bun 1.4 Builtins Guide?

code-yeongyu (a GitHub user) maintains it in code-yeongyu/senpi, which has 470 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 7, 2026.

Source: code-yeongyu/senpi on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.