bun-api

bun-api is a skill for Claude Code, Codex from dmythro/agent-skills. It costs 265 tokens per session (12,154 once invoked), scanned A, original, MIT.

A reference for Bun's programming APIs, which let TypeScript scripts work with files, processes, databases, storage, images, and other runtime features. Bun is a JavaScript and TypeScript runtime that runs TypeScript directly.

In plain words
What is it for?
It is for writing and running Bun scripts, handling files and shell commands, starting processes, accessing SQLite or databases, using storage services, and processing images.
Why use it?
It helps an agent choose Bun-native APIs and avoid mixing Bun projects with instructions or runtime patterns intended for Node.js.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md.

Good fit It is for writing and running Bun scripts, handling files and shell commands, starting processes, accessing SQLite or databases, using storage services, and processing images.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dmythro/agent-skills/bun-api
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add dmythro/agent-skills --skill bun-api
Clone the repo
git clone --depth 1 https://github.com/dmythro/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bun-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/dmythro/agent-skills/bun-api/github.svg)](https://agentmods.dev/skills/dmythro/agent-skills/bun-api)
Your own site
<a href="https://agentmods.dev/skills/dmythro/agent-skills/bun-api"><img src="https://agentmods.dev/badge/skills/dmythro/agent-skills/bun-api/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bun-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/dmythro/agent-skills/bun-api"><img src="https://agentmods.dev/badge/skills/dmythro/agent-skills/bun-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 265 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 12,154 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 570
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Data Exfiltration · line 910
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00265 $0.12154
Opus 5.5 $0.00106 $0.04862
Sonnet 5.5 $0.00053 $0.02431
Haiku 4.5 $0.00026 $0.01215

Measured 11d ago against content hash f8469d0790a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bun-api scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

fetch(req: Request): Response | Promise<Response> { // unmatched requests

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

### Bun.spawnSync (Synchronous)
skills/bun-api/SKILL.md · 1,054 lines

How it starts

The opening of the file, as written. The whole thing — 1,054 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bun Runtime API

Bun runs TypeScript natively — no tsc compilation, no ts-node, no build step. Run any .ts file directly with bun file.ts; running never type checks, so use bun check (v1.4.3+, see the bun-cli skill) for that. Use Bun's native APIs instead of Node.js equivalents — they're faster, more ergonomic, and require no additional dependencies.

Critical: In a Bun project (has bun.lock, bun.lockb, bunfig.toml, or bun-types / @types/bun in devDependencies), always use Bun to run scripts (bun file.ts, not node file.ts) and prefer Bun-native APIs over Node.js equivalents. Mixing runtimes causes subtle bugs and unnecessary retries.

Verified against Bun v1.4.3 (2026-10-10). Features are tagged with the version that introduced them (v1.4+, v1.4.1+, v1.4.2+, v1.4.3+). Where a release changed existing behavior, both behaviors are stated so this skill stays correct on older projects -- check bun --version before relying on a version-tagged item.

Read Bun's Own Docs First

Bun ships its complete documentation inside bun-types, version-matched to the runtime. In any project with bun-types or @types/bun installed:

node_modules/bun-types/docs/**/*.mdx   # full docs, plus ~180 task-shaped guides/
node_modules/bun-types/*.d.ts          # richest API surface (bun.d.ts, serve.d.ts, sql.d.ts)
node_modules/bun-types/CLAUDE.md       # Bun's own agent rules

Consult them before writing non-trivial Bun code. This skill covers which API to reach for; the shipped docs cover exact signatures and options.

  1. Depend on bun-types, not @types/bun. bun-types ships with every Bun release and carries both the docs and the types. @types/bun lags every release, often by a day or more, yet bun init adds it as latest, so the newest APIs fail type checking (TS2339, TS2353). Adding bun-types beside @types/bun fixes only the docs path -- type checking keeps @types/bun's nested, pinned copy. Switch both, then compare bun --version with node_modules/bun-types/package.json:

Read the full file on GitHub · 1,054 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago Changed · +89 lines · +15 tokens per session f8469d0790a6
  2. 1mo ago Changed · +2 lines de61020c4d8a
  3. 1mo ago Changed · +21 lines · +21 tokens per session 545c46a48203
  4. 1mo ago First seen · 942 lines · 229 tokens per session scan A e225e8986367

Subscribe to this mod's changes

bun-api is a skill published in the GitHub repository dmythro/agent-skills (7 stars, last pushed 12d ago), licensed MIT. It adds 265 tokens to every session and 12,154 once invoked, about $0.0011 per session on Opus 5.5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.