api-design-patterns
RESTful API design patterns including URL structure, HTTP methods, and idempotency. Use when designing new API endpoints or reviewing API architecture. For existing projects, follow the project's established conventions instead.
npx skills add majiayu000/claude-skill-registry --skill api-design-patterns-cooldaemon-dotfiles --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 Design Patterns ## Core Principle For new projects, enforce RESTful URL structure. For existing projects, follow the project's established API conventions. ## RESTful URL Structure ``` GET /api/resources # List resources GET /api/resources/:id # Get single resource POST /api/resources # Create (server assigns ID) PUT /api/resources/:id # Create or replace at specific ID PATCH /api/resources/:id # Partial update DELETE /api/resources/:id # Delete resource # Query parameters for filtering, sorting, pagination GET /api/resources?status=active&sort=created_at&limit=20&offset=0 ``` ## HTTP Methods and Idempotency | Method | Idempotent | Use Case | |--------|------------|----------| | GET | Yes | Retrieve resource(s) | | PUT | Yes | Create or replace at specific URI | | PATCH | No* | Partial update | | DELETE | Yes | Remove resource | | POST | No | Non-idempotent operations | ### PUT vs POST **Common misconception**: "POST = create, PUT = update" **Reality**: PUT can create, POST can do various things. The difference is idempotency. - **PUT**: Client specifies the ID. Idempotent (running twice = same result) - **POST**: Server assigns the ID. Non-idempotent (running twice = two res
- Core Principle
- RESTful URL Structure
- HTTP Methods and Idempotency
- PUT vs POST
- Anti-Patterns
What does the api-design-patterns skill do?
RESTful API design patterns including URL structure, HTTP methods, and idempotency. Use when designing new API endpoints or reviewing API architecture. For existing projects, follow the project's established conventions instead.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-design-patterns-cooldaemon-dotfiles --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.
