api-patterns — Claude Code skill: API design and installation
This skill guides API style choices and covers response structure, versioning, and pagination. Use it when planning an API.
npx claude-code-templates@latest --skill development/api-patternsWhat api-patterns does
The skill helps weigh REST, GraphQL, and tRPC against the project context. Its topic files cover response formats, version strategies, pagination, authentication, rate limits, documentation, and security checks. It also prompts the agent to consider who will consume the API before settling on an approach.
The material is split into focused files, so the skill directs attention to the sections relevant to the current request. Recommendations therefore depend on the API question at hand. A Python script checks API endpoints: run it with python scripts/api_validator.py <project_path>. The skill can use Read, Write, Edit, Glob, and Grep.
What it helps with
- choose an API style for a project
- define consistent response and error formats
- plan API versioning
- select a pagination approach
- validate project API endpoints
Example prompts for the agent
- Help me choose REST, GraphQL, or tRPC for this project.
- Design response and error formats with pagination for my REST API.
- Check this project's endpoints with
python scripts/api_validator.py <project_path>.
How to install api-patterns
1claude-code-templates
npx claude-code-templates@latest --skill development/api-patterns2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill api-patterns -a claude-code3Manually: put the files in place
~/.claude/skills/api-patterns/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/api-patterns/
Manually: put the files in place
.agents/skills/api-patterns/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/api-patterns/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates api-patterns2Manually: put the files in place
.github/skills/api-patterns/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/api-patternsManually: put the files in place
.devin/skills/api-patterns/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about api-patterns
How do I install api-patterns in Claude Code?
Run npx claude-code-templates@latest --skill development/api-patterns.
What does api-patterns do?
It guides API design decisions, including the choice between REST, GraphQL, and tRPC, along with response formats, versioning, and pagination.
How can I validate API endpoints?
Run python scripts/api_validator.py <project_path> and pass the project path.