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.
git clone --depth 1 https://github.com/halflength-ampleness75/claude-code-recipesWrote 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/commands/halflength-ampleness75/claude-code-recipes/api-gen)<a href="https://agentmods.dev/commands/halflength-ampleness75/claude-code-recipes/api-gen"><img src="https://agentmods.dev/badge/commands/halflength-ampleness75/claude-code-recipes/api-gen/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.
<a href="https://agentmods.dev/commands/halflength-ampleness75/claude-code-recipes/api-gen"><img src="https://agentmods.dev/badge/commands/halflength-ampleness75/claude-code-recipes/api-gen.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00014 | $0.01182 |
| Opus 5.5 | $0.00006 | $0.00473 |
| Sonnet 5.5 | $0.00003 | $0.00236 |
| Haiku 4.5 | $0.00001 | $0.00118 |
Grade A, and why
api-gen 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 1mo 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 — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Generate production-quality REST API endpoints from a description provided in $ARGUMENTS.
Step 1 — Understand the Requirements
Parse $ARGUMENTS to determine:
- Resource name (e.g., "users", "products", "orders")
- Operations needed (CRUD by default, or specific operations if stated)
- Fields and types (if specified, otherwise infer reasonable defaults)
- Relationships to other resources (if mentioned)
- Authentication requirements (if mentioned)
If $ARGUMENTS is vague (e.g., just "users"), generate a standard CRUD API with sensible defaults and ask the user to confirm the field list before writing code.
Step 2 — Detect the Project's Stack
Search the project to determine:
- Framework: Express, Fastify, Koa, NestJS, Django REST Framework, Flask, FastAPI, Gin, Echo, etc.
- Language: TypeScript, JavaScript, Python, Go, etc.
- Database/ORM: Prisma, TypeORM, Sequelize, SQLAlchemy, Django ORM, GORM, etc.
- Validation library: Zod, Joi, class-validator, Pydantic, marshmallow, etc.
- Project structure: Where do routes, controllers, models, and tests live?
- Existing patterns: Read 1-2 existing route files to match the project's conventions exactly.
If no existing backend framework is found, ask the user which stack to use. Do not assume.
Step 3 — Design the API
Create a specification before writing any code:
## API Design: [Resource]
Base path: /api/[resource]
| Method | Path | Description | Auth | Status Codes |
|--------|-----------------|----------------------|------|--------------------|
| GET | / | List all (paginated) | Yes | 200, 401 |
| GET | /:id | Get one by ID | Yes | 200, 401, 404 |
| POST | / | Create new | Yes | 201, 400, 401, 409 |
| PUT | /:id | Update by ID | Yes | 200, 400, 401, 404 |
| DELETE | /:id | Delete by ID | Yes | 204, 401, 404 |
### Request/Response Shapes
(show the JSON schema for request body and response body)
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.
- 1mo ago First seen · 142 lines · 14 tokens per session scan A 270827cedfc6
api-gen is a command published in the GitHub repository halflength-ampleness75/claude-code-recipes (2 stars, last pushed 6d ago), licensed MIT. It adds 14 tokens to every session and 1,182 once invoked, about $0.0001 per session on Opus 5.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-31.
Other commands, from other repositories
context-stats
Display context window usage and token statistics.
migrate
Generate and manage database migrations.
pull-repos
Pull all repos (parent + marketplace clones + configured project repos).
test-suite
Run comprehensive test suite with coverage analysis.
deps-update
Audit and update dependencies safely.
security-scan
Run security audit on codebase.