fastapi-route-change
Use when adding or changing FastAPI routes, dependencies, middleware, or API response behavior.
SKILL.md.claude/skills/fastapi-route-change/SKILL.md
GitHubFastAPI Route Change
Follow AGENTS.md first.
Workflow
- Inspect neighboring route modules in
pubtator_link/api/routes/and reuse existing dependency and error-response patterns. - Keep route handlers thin; place business behavior in
pubtator_link/services/. - Validate request and response shapes with Pydantic models instead of ad hoc dictionaries.
- Cover route behavior under
tests/test_routes/and service behavior undertests/unit/. - For hosted-facing changes, check CORS, request-size, rate-limit, URL safety, and logging implications.
- Run the focused route/service tests, then
make ci-localbefore handoff.