/bunjs:bun runs instead · from bunjs
Routes Bun/TypeScript tasks to the correct skill file among eight specialized skills (setup, HTTP, errors, testing, security, production, performance, TUI). Reads only what the task needs.
This skill never runs in Claude Code
It ships in bunjs at skills/, but /bunjs:bun (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
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.
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 |
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 |
| "design the tables / schema" | project-setup (references/database-schema.md) |
| "document the API" / OpenAPI / Apidog | http-service (references/openapi-and-apidog.md) |
| "add a cache shared by every replica" / Redis | performance (references/optimisation-patterns.md) |
| "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.
Copy the shipped assets/, never retype them. All eight ship tested code — env
parser, HTTP middleware, error hierarchy, test harness, security guards, logger, benchmark
harness, TUI theme.
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.
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.
What SKILL.md sets; muted values are Claude Code's defaults
9 skills in this plugin
/errorsError handling and resilience for Bun/TypeScript — operational vs programmer errors, AppError hierarchy, centralized handler, boundary validation, timeout/retry/circuit breaker. Copyable, tested./http-serviceBuild or review a Bun HTTP service — Bun.serve declarative routes, middleware composition, request context, status/ETag/streaming helpers, graceful lifecycle. Ships tested middleware with measured routing gotchas./performanceDiagnose and fix Bun/TypeScript performance — event-loop blocking, measured native fast paths, benchmarking that does not lie, streaming, caching, workers, memory. Ships a tested benchmark harness.npx claudepluginhub madappgang/magus --plugin bunjsOther plugins' skills for the same job