api-version
Manage API versioning strategy for Hono routes in apps/api/src/v1. Use when creating new API versions or migrating endpoints between versions.
npx skills add majiayu000/claude-skill-registry --skill api-version --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# API Versioning Skill This skill helps you manage API versions in `apps/api/src/v1/` and prepare for future versions. ## When to Use This Skill - Creating a new API version (v2, v3, etc.) - Deprecating old API endpoints - Migrating endpoints between versions - Planning breaking changes - Maintaining backward compatibility ## Current API Structure ``` apps/api/src/ ├── v1/ # Current API version │ ├── routes/ │ │ ├── cars.ts # Car registration endpoints │ │ ├── coe.ts # COE bidding endpoints │ │ ├── pqp.ts # PQP data endpoints │ │ └── health.ts # Health check │ └── index.ts # v1 router assembly └── index.ts # Main Hono app with versioned routes ``` ## Versioning Strategy ### URL-Based Versioning The project uses URL path versioning: - `https://api.sgcarstrends.com/v1/cars` - `https://api.sgcarstrends.com/v1/coe` - Future: `https://api.sgcarstrends.com/v2/cars` ### Benefits - Clear, explicit versioning visible in URLs - Easy to cache and monitor per version - Clients can migrate at their own pace - Multiple versions can coexist ## Creating a New API Version ### Step 1: Create Version Directory ```bash mkdir -p apps/api/src/v2/routes ``` ### Step 2: Copy Existing Routes Start with cur
- When to Use This Skill
- Current API Structure
- Versioning Strategy
- URL-Based Versioning
- Benefits
- Creating a New API Version
- Step 1: Create Version Directory
- Step 2: Copy Existing Routes
- Step 3: Create Version Router
- Step 4: Mount in Main App
- Step 5: Implement Breaking Changes
- Migration Patterns
- 1. Gradual Migration
- 2. Feature Flag Pattern
mkdir -p apps/api/src/v2/routes cp -r apps/api/src/v1/routes/* apps/api/src/v2/routes/ Remove v1 directory rm -rf apps/api/src/v1 Update main app Remove v1 mounting from apps/api/src/index.ts Test v1 curl https://api.sgcarstrends.com/v1/cars Test v2 curl https://api.sgcarstrends.com/v2/cars
What does the api-version skill do?
Manage API versioning strategy for Hono routes in apps/api/src/v1. Use when creating new API versions or migrating endpoints between versions.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-version --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
