Prompt Details
Model
(claude-4-6-sonnet)
Token size
1,212
Example input
[WORKFLOW]: Every time I add a new REST API endpoint to our Express/TypeScript backend, I have to: create the route file, write the controller stub, add the service interface, register it in the router index, and add a matching Jest test skeleton. I do this 3-4 times per sprint and re-explain the pattern to Claude every single time.
[CONTEXT]: A 6-person SaaS startup engineering team building a B2B analytics platform. Stack: Node.js 20, Express 5, TypeScript 5, Prisma ORM, Jest. New engineers onboard monthly and need consistent patterns.
[SKILL_NAME]: api-route-scaffolder
Example output
Now I have a solid reference. Let me create all four files.Everything works. Let me copy all files to the output directory.Your `api-route-scaffolder` skill is ready. Here's a summary of what was built and the key decisions made:
**SKILL.md** โ Uses `keyword` invocation triggered by phrases like "new endpoint", "add route", "scaffold controller". The nine-step How It Works section wires Claude's behavior precisely: run the conflict check first, read an existing pattern before writing, compile-check at the end. Five hard guardrails prevent the two most common mistakes (silent overwrites, inventing response helper patterns).
**PATTERNS.md** โ Six opinionated, before/after patterns covering: file naming, thin controllers, service interfaces, router-level auth middleware, test skeleton structure, and alphabetical router index registration. Every pattern includes the "why" framed for a B2B multi-tenant context.
**EXAMPLES.md** โ Three fully worked examples covering the three scenarios your team actually hits: basic CRUD, a webhook endpoint with no auth middleware, and a nested resource (`/dashboards/:dashboardId/widgets`). Each includes the exact TypeScript output as indented plain text and a "Why this works" note that explains non-obvious decisions like `mergeParams: true`.
**run.py** โ A 110-line CLI tool that does two jobs: `--check` emits a JSON manifest of the five target file paths and any conflicts (exit 2 on conflict), `--generate` writes the route file to disk. Claude runs the check first to get exact paths, then uses Write/Edit tools for the other four files. Tested locally โ `report`, `dashboard-widget`, and nested base paths all resolve correctly.
**To install:** drop the `api-route-scaffolder/` directory into your Claude Code skills folder and ensure it's referenced in your `CLAUDE.md` or skills config. Claude will auto-trigger on any message containing the keyword phrases.
Or get it with Select10 Select prompts/mo โ under $2 each
Learn moreBy purchasing this prompt, you agree to our terms of service
CLAUDE-4-6-SONNET
๐Turn any repeated Claude Code workflow into a reusable skill directory. For developers who are tired of re-prompting the same setup every session.
๐๏ธ Outputs complete .claude/skills/[name]/ folder
๐ Generates SKILL.md with YAML frontmatter
๐ง Includes PATTERNS.md & EXAMPLES.md support files
โก Adds optional Python/bash scripts for token savings
๐ก๏ธ Invocation control & allowed-tools declarations built in
...more
Added 2 weeks ago
