/repo-health:api-driftfrom repo-health
Use when server routes and client calls may have drifted: a 404, 405 or shape error between frontend and backend, after renaming or removing an endpoint, before deleting a route, when an OpenAPI or GraphQL schema changed, or when asked to check API contracts or find dead or unused endpoints. Lists every route and every call, matches them, and reports mismatches with file:line on both sides.
Ships in repo-health. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Match every client call to a server route and every route to a caller. Report what does not match.
Find the route definitions in the repo's own framework; grep, then read only the hits.
| Stack | Look for |
|---|---|
| Express / Fastify / Hono / Koa | app.get(, router.post(, .route(, mounted prefixes from app.use('/api', router) |
| Next.js | app/**/route.ts exported GET/POST…, pages/api/**, server actions |
| NestJS | @Controller('x') + @Get(':id') |
| FastAPI / Flask / Django | @app.get, @router.post, APIRouter(prefix=), @bp.route, urls.py path( |
| Go / Rails / Spring | HandleFunc, r.GET(, routes.rb, @GetMapping |
| Schemas | `openapi.(json |
Record method, full path (prefixes applied), params, and the request and response shape if typed.
fetch(, axios., ky., $fetch(, useSWR(, useQuery fetchers, generated clients, requests./httpx. in scripts and tests. Resolve base URLs and template strings; a path you cannot resolve is reported as "dynamic", not guessed.
Normalise both sides: /users/:id, /users/{id}, /users/[id] and `/users/${id}` are one path. Then report:
| Kind | Client | Server | Detail |
|---|---|---|---|
| Missing route | web/api.ts:31 POST /api/orders/:id/cancel | — | no route; server has /api/orders/:id/void |
| Method mismatch | … | … | client PUT, server PATCH |
| Shape mismatch | … | … | client sends qty, server schema requires quantity |
| Unused route | — | server/routes.ts:88 GET /api/legacy | no caller in this repo |
Order: missing routes and method mismatches (broken now), then shape mismatches, then unused routes.
Lessons from earlier runs live in two files: ~/.claude/skill-lessons/api-drift.md (any repo) and .claude/skill-lessons/api-drift.md at the repo root (this repo only).
- <YYYY-MM-DD>: <do or avoid X> because <Y>. (seen: 1). When a line already says the same thing, raise its seen count and date instead of adding one. Facts about this repo go in the repo file, everything else in the user file. Keep each file under 30 lines by merging or dropping stale lessons.seen: 3: if the ashish-claude-skills source repo is open, propose the edit to plugins/repo-health/skills/api-drift/SKILL.md as a diff and wait for a yes, then delete the lesson once it lands; otherwise say Lesson ready to promote: <line> in the report.Learned: <the line written | nothing>.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
3 skills in this plugin
/env-doctorUse when a project will not install, build, start or pass tests on this machine; on a first clone or onboarding; when an error smells of setup (wrong runtime version, missing tool, missing env var, port in use, service not running); or when asked to check, diagnose or doctor the environment. Read-only: compares what the repo declares with what this machine has and gives one fix per gap./flag-cleanupUse when asked to clean up, remove or retire feature flags, find stale or dead flags, or when a flag is fully rolled out or abandoned. Works with any vendor (LaunchDarkly, Unleash, Flagsmith, GrowthBook, PostHog, Statsig, Split, ConfigCat, OpenFeature, Vercel flags) or home-made flags. Inventories every flag, asks which are settled, then removes one flag at a time keeping the winning branch.npx claudepluginhub ashishyd/ashish-claude-skills --plugin repo-health