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.
npx agentmods add skills/bishopz/2026-boilerplate/api-firstnpx skills add bishopZ/2026-Boilerplate --skill api-firstgit clone --depth 1 https://github.com/bishopZ/2026-BoilerplateWrote 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.
[](https://agentmods.dev/skills/bishopz/2026-boilerplate/api-first)<a href="https://agentmods.dev/skills/bishopz/2026-boilerplate/api-first"><img src="https://agentmods.dev/badge/skills/bishopz/2026-boilerplate/api-first.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00032 | $0.00555 |
| Opus 5 | $0.00016 | $0.00278 |
| Sonnet 5 | $0.00006 | $0.00111 |
| Haiku 4.5 | $0.00003 | $0.00056 |
Grade A, and why
api-first scanned grade A with 0 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 5d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API-first OpenAPI workflow
Use this skill when a task adds or changes HTTP API behavior, updates docs/openapi.yaml, or adjusts how API types are generated and consumed.
Contract documentation (source of truth)
- OpenAPI spec:
docs/openapi.yaml— human-reviewed contract; keep in sync with Express routes and response shapes. - Narrative and conventions:
docs/API.md— endpoint inventory, REST rules, migration guidance.
Do not treat generated TypeScript as documentation; treat the YAML + docs/API.md as the contract story.
Generated artifacts (pipeline)
- Command:
npm run gen:api-types - Input:
docs/openapi.yaml - Output:
src/generated/api/openapi.generated.ts(openapi-typescript; do not edit) - Hand-maintained aliases:
src/generated/api/api-types.ts— re-exports friendly names fromcomponents['schemas']for client and server imports.
After any YAML change, run gen:api-types and commit the updated openapi.generated.ts. Update api-types.ts when new schemas need stable export names.
Import paths
- Prefer
@/generated/api/api-typesfor shared DTOs (path alias@/*→src/*). - Never import
openapi.generated.tsdirectly from feature code unless you need path-level types; preferapi-types.tsfor schemas.
Tooling
- Generator:
openapi-typescript(devDependency) - Lint:
openapi.generated.tsis ESLint-ignored (generated noise)
CI / pre-commit
- Optional: add a CI step that runs
npm run gen:api-typesand fails ifgit diff --exit-codeshows drift (stops committed spec from diverging from generated output). This boilerplate does not enforce that by default; add when the team wants strict parity checks.
Validation checklist
-
docs/openapi.yamlmatches actual routes and status codes -
npm run gen:api-typessucceeds -
npm run type-checkpasses -
docs/API.mdanddocs/SCRIPTS.mdstill describe correct paths if you moved files
Done criteria
- Contract changes are reflected in YAML and regenerated TS.
- Client/server imports use
@/generated/api/api-types(or documented exceptions). - No manual edits inside
openapi.generated.ts.
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.
- 5d ago First seen · 52 lines · 32 tokens per session scan A 6725ba927593
api-first is a skill published in the GitHub repository bishopZ/2026-Boilerplate (24 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 555 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
typescript-expert
Expert-level TypeScript development with modern tooling, advanced types, and best practices. Use this skill for TypeScript projects requiring type-safe code, modern bundling, and comprehensive testing.
javascript-patterns
JavaScript and TypeScript patterns, anti-patterns, and quality rules — with deterministic regex-based anti-pattern detection for var usage, loose equality (==), leftover console.log, async without await, and common JS pitfalls. Covers Node.js, npm, ESLint, promise patterns, and async code. Use proactively when…
javascript-typescript
Modern JavaScript and TypeScript development patterns.
bun
Bun all-in-one JavaScript runtime and toolkit reference. Covers runtime APIs (file I/O, HTTP server, SQLite, shell), ultra-fast package manager, built-in bundler with plugins, test runner with mocking, TypeScript support, and Node.js compatibility.
lint-js
Lint JS/TS code only. Use before opening a PR when only JavaScript or TypeScript files were changed (no Rust).
lint-all
Lint all code (Rust + JS/TS). Use before opening a PR when Rust code was changed.