Bun skill index — bunjs v0.2.2
You are holding the index, not the content. Its whole job is to tell you which one or
two files to open, so you pay for the guidance a task needs and nothing else.
Read only what the task calls for. Opening all eight is ~4,000 lines and defeats the
point of an index. Two is normal. Five means the task should be split.
The eight
Each path is relative to the directory holding this file — the other skills are its
sibling directories, which is true both when this ships as a plugin
(plugins/bunjs/skills/<name>/) and when it is installed as a project skill
(.claude/skills/<name>/).
Relative paths in a SKILL.md are resolved against that file's own directory — MEASURED
in benches/skill-router/ (RTR-1, --repeat 8, Sonnet 5) over 74 skill-file reads, with
no counterexamples. There is no reader for whom "the plugin's own directory" is a location;
the only thing an agent knows is where the file it just read lives. So ../<name>/ is not
a preference here, it is the only spelling that lands. A path that misses sends the reader
into a dead end, and in that run the ones who did not recover were every Recall failure.
| Read this |
When the task is about |
Ships |
../project-setup/SKILL.md |
starting or restructuring a project, folder layout, strict tsconfig, typed env config, workspaces, linting |
env parser + 24 tests |
../http-service/SKILL.md |
an HTTP server or JSON API — Bun.serve routes, middleware, request context, response shape, streaming |
middleware + 38 tests |
../errors/SKILL.md |
error handling, validation boundaries, retry, timeout, circuit breaker, "make it fail gracefully" |
AppError + 53 tests |
../testing/SKILL.md |
writing or fixing tests, bun:test, doubles, coverage gating, flaky tests |
harness + 30 tests |
../security/SKILL.md |
auth, passwords, tokens, injection, rate limiting, CORS, headers, secrets, security review |
guards + 51 tests |
../production/SKILL.md |
shipping — graceful shutdown, structured logging, health checks, Docker, signals, CI |
logger + 29 tests |
../performance/SKILL.md |
something is slow, benchmarking, event-loop blocking, profiling |
bench harness + 18 tests |
../tui/SKILL.md |
a terminal UI — OpenTUI, dashboards, full-screen CLI |
theme + 119 tests |
Routing
Match on what the task will make you write, not on the words the user used. Someone
who says "add login" is asking for security; someone who says "it's slow" is asking for
performance even though neither said the skill's name.
Most real tasks need a short ordered chain. Build code first, then harden it:
| Task |
Read, in this order |
| new service or app from scratch |
project-setup → http-service → errors |
| "add auth / login / signup" |
security → errors |
| "build an API endpoint" |
http-service → errors |
| "write tests" / "fix this flaky test" |
testing |
| "get it deployed" / "the deploy drops requests" |
production |
| "it's slow" |
performance |
| a terminal UI or dashboard |
tui |
| "review this for security" |
security → errors |
Chains stop where the task stops. "Create a todo app" is
project-setup → http-service → errors; add testing only once there is something to
test, security only once it has users, production only when it is being shipped.
Reading all six upfront buys nothing you can act on yet.
Two rules that come from the skills themselves
Copy the shipped assets/, never retype them. Six of the eight ship tested code —
error hierarchy, security guards, logger, test harness, env parser, benchmark harness.
Each skill has the exact cp line. Retyped versions drop the subtle parts: the
enumeration-timing burn, the full-jitter backoff, the cycle-safe cause walk.
Every skill has an Acceptance section. It is the definition of done, and it is the part
most likely to be skipped. bun test and tsc --noEmit are the floor in all eight — bun run
strips types without checking them, so a type error never surfaces at runtime.
Scope
Only Bun is tested. Node and Deno at your own risk.
If the task is not Bun or TypeScript, say so and stop — none of these eight apply, and
guessing from them produces confident advice about the wrong runtime.
1---2name: bun3description: Router for the eight Bun/TypeScript skills — setup, HTTP, errors, testing, security, production, performance, TUI. Says which to read for a task, without loading them. Any Bun or TS work.4---56# Bun skill index — bunjs v0.2.278You are holding the **index**, not the content. Its whole job is to tell you which one or9two files to open, so you pay for the guidance a task needs and nothing else.1011**Read only what the task calls for.** Opening all eight is ~4,000 lines and defeats the12point of an index. Two is normal. Five means the task should be split.1314## The eight1516Each path is **relative to the directory holding this file** — the other skills are its17sibling directories, which is true both when this ships as a plugin18(`plugins/bunjs/skills/<name>/`) and when it is installed as a project skill19(`.claude/skills/<name>/`).2021Relative paths in a SKILL.md are resolved against **that file's own directory** — MEASURED22in `benches/skill-router/` (RTR-1, `--repeat 8`, Sonnet 5) over 74 skill-file reads, with23no counterexamples. There is no reader for whom "the plugin's own directory" is a location;24the only thing an agent knows is where the file it just read lives. So `../<name>/` is not25a preference here, it is the only spelling that lands. A path that misses sends the reader26into a dead end, and in that run the ones who did not recover were every Recall failure.2728| Read this | When the task is about | Ships |29|---|---|---|30| `../project-setup/SKILL.md` | starting or restructuring a project, folder layout, strict tsconfig, typed env config, workspaces, linting | env parser + 24 tests |31| `../http-service/SKILL.md` | an HTTP server or JSON API — `Bun.serve` routes, middleware, request context, response shape, streaming | middleware + 38 tests |32| `../errors/SKILL.md` | error handling, validation boundaries, retry, timeout, circuit breaker, "make it fail gracefully" | AppError + 53 tests |33| `../testing/SKILL.md` | writing or fixing tests, `bun:test`, doubles, coverage gating, flaky tests | harness + 30 tests |34| `../security/SKILL.md` | auth, passwords, tokens, injection, rate limiting, CORS, headers, secrets, security review | guards + 51 tests |35| `../production/SKILL.md` | shipping — graceful shutdown, structured logging, health checks, Docker, signals, CI | logger + 29 tests |36| `../performance/SKILL.md` | something is slow, benchmarking, event-loop blocking, profiling | bench harness + 18 tests |37| `../tui/SKILL.md` | a terminal UI — OpenTUI, dashboards, full-screen CLI | theme + 119 tests |3839## Routing4041Match on **what the task will make you write**, not on the words the user used. Someone42who says "add login" is asking for `security`; someone who says "it's slow" is asking for43`performance` even though neither said the skill's name.4445Most real tasks need a short ordered chain. Build code first, then harden it:4647| Task | Read, in this order |48|---|---|49| new service or app from scratch | `project-setup` → `http-service` → `errors` |50| "add auth / login / signup" | `security` → `errors` |51| "build an API endpoint" | `http-service` → `errors` |52| "write tests" / "fix this flaky test" | `testing` |53| "get it deployed" / "the deploy drops requests" | `production` |54| "it's slow" | `performance` |55| a terminal UI or dashboard | `tui` |56| "review this for security" | `security` → `errors` |5758Chains stop where the task stops. *"Create a todo app"* is59`project-setup` → `http-service` → `errors`; add `testing` only once there is something to60test, `security` only once it has users, `production` only when it is being shipped.61Reading all six upfront buys nothing you can act on yet.6263## Two rules that come from the skills themselves6465**Copy the shipped `assets/`, never retype them.** Six of the eight ship tested code —66error hierarchy, security guards, logger, test harness, env parser, benchmark harness.67Each skill has the exact `cp` line. Retyped versions drop the subtle parts: the68enumeration-timing burn, the full-jitter backoff, the cycle-safe cause walk.6970**Every skill has an Acceptance section. It is the definition of done**, and it is the part71most likely to be skipped. `bun test` and `tsc --noEmit` are the floor in all eight — `bun run`72strips types without checking them, so a type error never surfaces at runtime.7374## Scope7576Only Bun is tested. Node and Deno at your own risk.7778If the task is not Bun or TypeScript, say so and stop — none of these eight apply, and79guessing from them produces confident advice about the wrong runtime.