About pma-bun
pma-bun is an implementation guide for PMA-managed Bun backends, API services, and internal tools. It organizes project rules into focused references for runtime, data, testing, and delivery.
Key features
- 01Bun project scope and layout
- 02Runtime and configuration guidance
- 03Drizzle and SQLite data guidance
- 04Testing and coverage requirements
- 05Build, CI, and delivery rules
Use cases
- 01Setting up a PMA-managed Bun API
- 02Choosing a single API or monorepo layout
- 03Checking tests and coverage before merge
- 04Preparing compiled binaries and Docker delivery
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ zzci/ skills --skill pma-bunAfter installing, type/pma-bunin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
agents/openai.yamlreferences/baseline.mddata-and-testing.mddelivery.mdruntime.mdDetails
From the project READMEBun Project Implementation Guide
Use this skill together with /pma. /pma controls workflow, approval, and task tracking; this guide defines the implementation baseline after approval.
Keep this entry file small. Load only the relevant reference packs.
Scope
For PMA-managed Bun backends, API services, and internal tools. A SPA shipped alongside the API (same repo) is supported via a sibling web/ directory and pma-web — it does not require a Bun workspace.
Not for frontend-only SPAs, Node-specific runtime guides, or non-PMA workflows.
Loading Order
- Always load
references/baseline.mdfirst. - Load
references/runtime.mdfor bootstrap flow, config, root resolution, HTTP server, OpenAPI contract and docs, logging, PID lock, and dev/prod split. - Load
references/data-and-testing.mdfor Drizzle, SQLite-first storage,bun:sqlitedriver setup, migrations in source and compiled mode, repository patterns, and testing. - Load
references/delivery.mdfor compile flow, embedded assets, CI gates, observability, Docker, security, and Git workflow.
Quick Routing
- New project setup or repo restructuring (single API / API + sibling SPA / monorepo) →
references/baseline.md - dependency versions (registry verification, pinning rules) →
references/baseline.mdDependency Freshness - runtime (
app.ts/index.ts/ optionaldev.ts, config, startup, graceful shutdown, logging, PID lock) →references/runtime.md - routing and API docs (hard lock:
hono-openapi,/openapi.json,/docs) →references/runtime.md - dev URL routing (nsl) →
references/runtime.md(full protocol →/pma references/dev-environment.md; multi-app workspace setup →/pma docs/monorepo-example.md) - data access (schema design, SQLite setup, migrations, repositories) →
references/data-and-testing.md - testing (bun:test, coverage threshold, OpenAPI contract test, compiled-mode smoke test) →
references/data-and-testing.md - CI and delivery (compile pipeline, embedded assets, binary delivery, Docker, PR readiness) →
references/delivery.md
Reference Packs
references/baseline.mdScope, layout choice (single API vs monorepo vs API + sibling SPA), tech stack, required quality gates, scripts, conventions, and implementation workflow.references/runtime.mdTypeScript defaults, config loading, bootstrap structure, hono-openapi routes and contract rules, middleware, logging, docs routes, and runtime lifecycle.references/data-and-testing.mdDrizzle with SQLite-first storage, migration strategy for source and compiled mode, repository boundaries, coverage configuration, and testing rules.references/delivery.mdCompile pipeline with--assetembedding, security patterns, observability, CI pipeline, Docker, workspace rules, and Git conventions.
Acceptance Checklist
Before merge:
-
lint,typecheck,buildpass -
bun test --coveragepasses; the threshold lives inbunfig.toml(coverageThreshold, 0.8 or higher) - env config validated by Zod at startup; no
Bun.envreads in business logic - routes follow Routing Hard Lock;
/openapi.jsonmatches runtime validation and/docsopens it - no Vite in the backend process (no
@hono/vite-dev-server, no Vite middleware indev.ts) - nsl dev routing works (
bunx nsl run -n <name>:/api -s -- bun --watch src/index.ts); production bootstrap does not depend on nsl - migrations committed; when a binary ships, it embeds
drizzle/(andweb/distfor a sibling SPA) via--assetand passes the compiled-mode smoke test - new or bumped dependencies verified at the registry; any non-latest pin carries a recorded reason
If the repository intentionally diverges, keep the deviation explicit in the proposal and consistent across scripts, docs, and CI.