skills/team/fastapi-scaffolder/SKILL.md
Scaffolds FastAPI endpoints with OpenAPI documentation, Pydantic v2 request/response models, JWT authentication, rate limiting, and health checks. Python analog of minimal-api-scaffolder. Use when creating REST APIs, adding endpoints, setting up FastAPI projects, or configuring API infrastructure.
npx skillsauth add michaelalber/ai-toolkit fastapi-scaffolderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"An API is a contract — make it explicit, versioned, and documented. Security by default means the insecure path requires more work than the secure path."
FastAPI has OpenAPI documentation built in — but built-in is not automatic. Every endpoint needs
explicit metadata (summary, description, response_model, responses) to produce docs useful to
consumers; an endpoint without metadata is a black box. Security by default means every router
requires authentication unless an endpoint explicitly, intentionally opts out — an unauthenticated
endpoint is a deliberate decision, not an oversight.
Non-Negotiable Constraints:
summary, description, response_model, and a responses dict./api/v1/ prefix via APIRouter(prefix="/api/v1"); changing it later is breaking.Depends(get_current_user) at router level; anonymous access is an explicit opt-out.BaseModel subclasses; no bare dict/Any returns.response_model= on every route; no implicit response inference.Full principle table, KB lookups, discipline rules, anti-patterns, and error recovery live in
references/conventions.md.
DETECT Find the app entry point (main.py/app.py); check existing versioning, auth
(get_current_user/OAuth2/HTTPBearer), and middleware (CORS) via grep.
CONFIGURE Project-level setup: app creation, config (pydantic-settings), shared dependencies,
exception handlers, CORS, health. (Structure in output-templates.md.)
SCAFFOLD Create the endpoint with full OpenAPI metadata, Pydantic v2 request/response models, and
security. (Complete scaffold in references/router-template.md.)
SECURE Add authentication, authorization (role factories), and rate limiting (stricter on auth
endpoints). (JWT + API-key patterns in references/security-patterns.md.)
DOCUMENT uvicorn up; verify /openapi.json and /docs render the new endpoints with metadata.
VERIFY App starts; /health passes; /docs renders; pytest passes; ruff check; mypy app/.
Exit criteria: router registered under /api/v1 with router-level auth; every route has
response_model, summary, and a responses dict; rate limiting applied (strict on auth); health
endpoints present; app starts, /docs renders, tests/ruff/mypy pass.
<fastapi-scaffold-state>
phase: DETECT | CONFIGURE | SCAFFOLD | SECURE | DOCUMENT | VERIFY | COMPLETE
project_structure: new | existing
versioning_configured: true | false
auth_configured: true | false
cors_configured: true | false
rate_limiting_configured: true | false
health_checks_added: true | false
openapi_complete: true | false
last_action: [description]
next_action: [description]
</fastapi-scaffold-state>
references/output-templates.md.references/router-template.md.references/security-patterns.md.references/conventions.md.| Skill | Relationship |
|-------|-------------|
| python-feature-slice | Feature slice provides the service layer; this skill provides endpoint quality (OpenAPI, security, rate limiting). Use together for complete feature scaffolding. |
| python-security-review | After scaffolding, verify authentication, authorization, and input validation. |
| alembic-migration-manager | When new endpoints require schema changes, use it for the migration lifecycle. |
| minimal-api-scaffolder | Parallel skill for .NET Minimal API — same OpenAPI-first, security-by-default philosophy, different ecosystem. |
development
Interviews the user relentlessly about a plan, decision, or idea — one question at a time, each with a recommended answer. Shared engine behind "grill-me" and "grill-with-docs". Use on any "grill" trigger phrase or to stress-test thinking. Do NOT use to build the plan; it ends at shared understanding, not implementation.
testing
Runs a relentless interview to sharpen a plan or design, capturing the decisions as ADRs and a glossary along the way. Use when the user wants to be grilled AND wants the session to leave durable domain documentation behind. Do NOT use for a throwaway stress-test with no artifacts; use grill-me instead.
tools
OWASP-based security review of Vue/TypeScript front-ends. Detects framework (Vite/Vue CLI/Nuxt), entry points, and data flows; scans the OWASP Top 10 (2025) mapped to Vue client-side risks (raw-HTML XSS via v-html, URL/protocol injection, bundled secrets, insecure token storage, dependency CVEs, missing CSP, open redirects, router guard bypass); emits an exec summary plus graded findings. Use to audit Vue for vulnerabilities. Not for architecture grading (vue-architecture-checklist).
tools
Analyzes legacy Vue codebases and produces actionable modernization plans. Primary migration paths include Options API to Composition API, Vue 2 to Vue 3, Vue CLI to Vite, JavaScript to TypeScript, Vue Test Utils/Karma/Mocha to Vitest + Vue Testing Library, legacy Vuex to Pinia, and removed-in-Vue-3 pattern cleanup (filters, event bus, `$listeners`). Does NOT perform the migration — assesses, quantifies risk, and plans.