api-design
Contract-first API design with Hyrum's Law awareness, versioning strategies, error semantics, and boundary validation.
Skill by NasserJabir
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/nasserjabir-api-design
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, design, backend, legal
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/api-design
What's inside
- Skill name
api-design- Description
- Contract-first API design with Hyrum's Law awareness, versioning strategies, error semantics, and boundary validation.
- License
- MIT
- Instructions
- 104 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# API Design
## Description
Structured approach to designing robust, maintainable APIs: contract-first development, semantic versioning, error handling semantics, and input validation at system boundaries. Derived from addyosmani/agent-skills.
## When to Activate
- Designing new REST, GraphQL, or gRPC APIs
- Defining API contracts or OpenAPI/protobuf schemas
- Implementing versioning or deprecation strategies
- Reviewing error handling patterns in API layers
- Validating inputs at service boundaries
- Integrating third-party APIs
## Process
### 1. Contract-First Design
- Define the schema (OpenAPI 3.1, protobuf, GraphQL SDL) before writing implementation
- Use code generation from contracts to ensure client/server alignment
- Version the contract alongside the implementation in source control
- Publish contracts to a registry (e.g., Apicurio, Buf Schema Registry)
### 2. Hyrum's Law Awareness
- Every observable behavior of your API will be depended upon by someone
- Document which behaviors are guaranteed vs. incidental
- Avoid breaking changes to undocumented behavior; treat the entire surface as the contract
- Use `sunsetting` headers and deprecation timelines for planned removals
### 3. One-Version Rule
- Prefer a single, current API version at all times
- Use additive (non-breaking) evolution instead of version increments
- Only create a new version when breaking changes are unavoidable
- Maintain at most N-1 previous version; set clear sunset dates
### 4. Error Semantics
- Use appropriate HTTP status codes: 4xx for client errors, 5xx for server errors
- Return structured error responses with `code`, `message`, and `details` fields
- Use RFC 7807 Problem Details for HTTP APIs format
- Never expose internal stack traces, SQL errors, or implementation details
- Distinguish between validation errors (422), not-found (404), and unauthorized (401/403)
### 5. Boundary Validation
- Validate all inputs at the API boundary; never trust client data
- Use schema validation libraries (Zod, Joi, Ajv) for request body/query/params
- Enforce type safety at serialization/deserialization boundaries
- Validate file uploads: size limits, MIME types, virus scanning
- Rate limit per-client and per-endpoint
## Quality Criteria
- API schema exists before implementation begins
- All endpoints return RFC 7807 error responses on failure
- No `any` types in API contracts
- Input validation covers all user-supplied fields
- Breaking changes follow semver with documented migration path
- API documentation is generated from the contract, not manually maintained
## References
- [addyosmani/agent-skills — API Design](https://github.com/addyosmani/agent-skills)
- [Hyrum's Law — hyrumslaw.com](https://www.hyrumslaw.com/)
- [RFC 7807 Problem Details](https://tools.ietf.org/html/rfc7807)
- [OpenAPI 3.1 Specification](https://spec.openapis.org/oas/latest.html)
- [Microsoft REST API Guidelines](https://github.com/microsoft/api-guidelines)
## Examples
### RFC 7807 Error Response
```json
{
"type": "https://api.example.com/errors/validation-failed",
"title": "Validation Failed",
"status": 422,
"detail": "The request body contains 2 invalid fields.",
"errors": [
{ "field": "email", "reason": "must be a valid email address" },
{ "field": "age", "reason": "must be between 0 and 150" }
]
}
```
### Zod Boundary Validation
```typescript
const CreateUserSchema = z.object({
email: z.string().email(),
name: z.string().min(1).max(100),
age: z.number().int().min(0).max(150),
});
app.post('/users', (req, res) => {
const result = CreateUserSchema.safeParse(req.body);
if (!result.success) {
return res.status(422).json({
type: 'https://api.example.com/errors/validation-failed',
title: 'Validation Failed',
status: 422,
errors: result.error.issues.map(i => ({
field: i.path.join('.'),
reason: i.message,
})),
});
}
// proceed with result.data
});
```From NasserJabir/NassAI-Praxis, MIT.
More from NasserJabir/NassAI-Praxis
- 0.559score
nassai-praxis
NasserJabir
Activate the NassAI Praxis methodology: project memory (working/episodic/semantic/procedural), 10 specialist personas with disclosure rules, 59 skills with…
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
accessibility-compliance
NasserJabir
WCAG 2.2 compliance, ARIA patterns, keyboard navigation, screen reader support, and color contrast requirements.
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
anti-patterns
NasserJabir
Common excuses agents use to skip steps with counter-arguments.
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
code-review
NasserJabir
Review changes for correctness, safety, maintainability, and consistency.
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
database-design
NasserJabir
PostgreSQL schema design, indexing strategies, migration patterns, and connection pooling for production workloads.
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
context-engineering
NasserJabir
Feed agents the right information at the right time.
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
planning
NasserJabir
Turn a request into a sequenced, scoped implementation plan.
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
security
NasserJabir
Identify and reduce security risks in code, configuration, and memory.
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
tdd
NasserJabir
Use tests to define behavior before production implementation.
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
brainstorming
NasserJabir
Structured ideation process to explore requirements, alternatives, and design before writing any code.
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
code-review
NasserJabir
Systematic review of code changes to ensure quality, correctness, and adherence to standards.
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
brainstorming
NasserJabir
Generate and compare candidate approaches before implementation.
SkillBFreshness: B★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 24, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/NasserJabir/NassAI-Praxis
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from NasserJabir
- 0.559score
nassai-praxis
NasserJabir
Activate the NassAI Praxis methodology: project memory (working/episodic/semantic/procedural), 10 specialist personas with disclosure rules, 59 skills with…
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
anti-patterns
NasserJabir
Common excuses agents use to skip steps with counter-arguments.
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
accessibility-compliance
NasserJabir
WCAG 2.2 compliance, ARIA patterns, keyboard navigation, screen reader support, and color contrast requirements.
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
code-review
NasserJabir
Review changes for correctness, safety, maintainability, and consistency.
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
database-design
NasserJabir
PostgreSQL schema design, indexing strategies, migration patterns, and connection pooling for production workloads.
SkillBFreshness: B★ 3Claude Code +9 - 0.558score
brainstorming
NasserJabir
Structured ideation process to explore requirements, alternatives, and design before writing any code.
SkillBFreshness: B★ 3Claude Code +9
Cite this page
api-design skill. Agent Mart. https://agentmart.dev/skills/nasserjabir-api-design (last updated 2026-10-24)