Skill
API design
Designs interfaces that survive their consumers — resource modeling, errors, versioning, pagination, and compatibility.
- Technology
- api-design
- version 1.1.0
- MIT license
- 5 outside sources
When it loads
Your assistant reads this description and loads the skill when a request matches it. Nothing else is in context until then.
Designs interfaces that survive their consumers — resource modeling, errors, versioning, pagination, and compatibility. Use this to design a new API, review one before it ships, decide how to version or deprecate, fix an interface consumers keep misusing, or work out whether a change is breaking.
Add it to your assistant
This skill ships in the Technology department, with 18 others.
Claude Code
/plugin marketplace add cbrock84/headcount
/plugin install technology@headcount
ChatGPT and Codex
Add Headcount: Technology to ChatGPT from the ChatGPT plugin directory.
GitHub Copilot CLI
copilot plugin marketplace add cbrock84/headcount
copilot plugin install technology@headcount
Cursor
The repository is a Cursor plugin marketplace. On a Teams or Enterprise plan, import it under Dashboard, Plugins & MCPs, New marketplace, Import from a repository. To try this department on one machine, copy plugins/technology into ~/.cursor/plugins/local/ and reload the window.
Gemini CLI
Gemini CLI installs one skill at a time:
gemini skills install https://github.com/cbrock84/headcount.git --path plugins/technology/skills/api-design
The skill is identical in every tool. The Copilot, Cursor and Gemini steps follow each tool's published format and have not been run end to end here.
What the skill tells the assistant
The full text, as it installs. View the source on GitHub.
An API is a promise you cannot withdraw once someone depends on it. Design accordingly: the cost of getting it wrong is paid continuously by everyone who integrates.
Model the domain, not the database
Expose concepts the consumer thinks in. An interface that mirrors internal table structure leaks implementation, breaks whenever storage changes, and forces consumers to reconstruct meaning you already had.
Name things as the domain names them. Consistency in naming, casing, date formats and identifier style matters more than any individual choice being optimal — an interface that is uniformly imperfect is learnable, and one that is inconsistently excellent is not.
Errors are part of the contract
Most integrations spend most of their code on failure. Give it the same care as the success path:
- Distinguish machine-readable code from human-readable message. Consumers branch on the code; the message is for the developer reading logs.
- Say what to do about it. Retryable or not, and after how long.
- Never leak internals — stack traces and SQL in error bodies are a security finding as well as bad design.
- Be consistent about which failures are which status. Validation, authorization, and conflict are different situations and should never share a shape.
Compatibility
Adding an optional field is safe. Removing a field, renaming one, tightening validation, changing a default, or adding a required parameter are all breaking, and the last three break consumers who are doing nothing wrong.
Version when you must break, and be explicit about how long the previous version lives. A deprecation without a date is a deprecation nobody acts on.
Prefer expansion over versioning where possible: a new optional field costs a consumer nothing, a new version costs them a migration.
Pagination, filtering and limits
Any collection that can grow needs pagination from the first release — retrofitting it is a breaking change to every consumer. Prefer cursors over offsets for anything that changes while being read; offset pagination silently skips and duplicates records under concurrent writes.
State rate limits in the contract and communicate them in responses. An undocumented limit is discovered in the consumer's production incident.
Sources
references/sources.md in this skill lists the outside authorities that settle the questions here — what each one is authoritative for, and what you may do with it. Check them before answering on anything they cover, and cite what you used. Most are free to read and not free to reproduce; the use note on each is binding.
Tooling
Specification and documentation: OpenAPI with Redocly, Stoplight, or Scalar; gRPC with protocol buffers where the consumers are internal services, and similar.
Design review and testing: Postman, Insomnia, Bruno, and similar. Contract testing — Pact and similar — is what catches a breaking change before a consumer does.
Generate the documentation from the specification and the specification from or alongside the code. Hand-maintained API documentation is wrong within a release, and being confidently wrong is worse for a consumer than being absent.
Never
- Expose internal identifiers or storage structure through the interface.
- Return errors whose meaning must be inferred from the message text.
- Tighten validation on an existing endpoint and call it non-breaking.
- Ship a collection endpoint without pagination.
Company context
Before answering, look for the company profile: the file .headcount/company.md in the working folder, or a document titled "Headcount company profile" in the conversation, the project's instructions or files, or saved memory. Where there is one, answer for that company and do not ask for anything it already states. Where it conflicts with what the person says now, the person is right, and say that the profile looks out of date. Where there is none, carry on: ask only for the facts this question turns on, and mention once that executive:company-onboarding records them so they are not asked again.
Other departments
A skill written as department:skill belongs to another department, and each department installs separately. If the one a question belongs to is not installed, name the department that owns it and how to add it, and do not improvise its work. references/departments.md in this skill lists each department this skill names, with the install step for Claude Code and for ChatGPT.
Files it ships with
Loaded only when the skill calls for them.
Sources it checks against
Where a question has an outside authority, the skill points the assistant at it instead of answering from memory.
- RFC 9110: HTTP Semantics IETF
What an HTTP method, status code or header actually means. Settles whether PUT is idempotent, whether 409 or 422 is correct, and what a conditional request obliges a server to do.
- RFC 9457: Problem Details for HTTP APIs IETF
The wire format of an API error body. It obsoletes RFC 7807, so it also settles which of the two a new service should follow.
- RFC 9700: Best Current Practice for OAuth 2.0 Security IETF
Which OAuth 2.0 patterns remain permitted — that the implicit grant and password grant must not be used, that PKCE is required, and that redirect URIs must match exactly.
- OpenAPI Specification OpenAPI Initiative, Linux Foundation
What a valid API description document contains. Settles whether a given file is conformant rather than merely accepted by one tool.
- Semantic Versioning 2.0.0 Semantic Versioning project
What a version increment is allowed to mean, and therefore whether a given change requires a major bump. A community specification rather than a standards body, but the one every dependency resolver assumes.
More in Technology
- AI workflow architect
Designs AI systems, automations, and agent workflows for a business — identifying which manual work is worth automating, how to structure the system, which tools fit, and what cou…
- Branch and worktree workflow
Isolates feature work in its own branch or worktree and integrates it cleanly when done.
- Chief Technology Officer / CIO
Owns architecture, engineering delivery, infrastructure, data platform, and internal systems.
- Cloud infrastructure
Designs and runs cloud infrastructure — environments, infrastructure as code, networking and isolation, scaling, and cost.
- Code review
Conducts and responds to code review — reviewing a change for correctness, design, and risk, and evaluating review feedback received on your own work.
- Completion verification
Verifies that work is actually complete before it is claimed to be — running the checks, reading the output, and confirming the original request was satisfied rather than approxim…
- Data migration
Moves data from one system to another without losing it or corrupting it — profiling the source before mapping, deciding between big-bang and parallel-run cutover, reconciling cou…
- Implementation planning
Turns a spec or requirement into a written plan a separate session or agent can execute, then drives that plan through review checkpoints.
- Observability and reliability
Makes systems debuggable and reliably operable — instrumentation, alerting that is worth waking for, service objectives, and learning from failure.
- Parallel agent delivery
Splits work across multiple agents or sessions running at once, keeping their surfaces disjoint so results merge cleanly.
- Prompt optimizer
Turns rough intent or a weak prompt into a reliable one — diagnosing why output is inconsistent, restructuring the instruction, and adapting it across models.
- Release and deployment
Ships changes safely and often — pipelines, deployment strategies, feature flags, rollback, and database changes.
- Skill authoring
Writes and revises agent skills so they trigger at the right moments and give usable instruction when they do.
- Solution architecture
Designs system structure and makes architectural decisions defensible — boundaries, coupling, trade-offs, and recording why.
- Solution exploration
Explores the problem and the range of possible approaches before any code is written — clarifying what is actually being asked, surfacing options with their tradeoffs, and converg…
- Systematic debugging
Finds the root cause of a bug, test failure, or unexpected behavior before proposing any fix.
- Technical debt management
Makes technical debt visible and decidable — distinguishing real debt from mess, quantifying its cost, and arguing for remediation in business terms.
- Test-driven development
Drives implementation by writing a failing test first, then the smallest code that passes it.