Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add kok-o/contextos-agents --skill api-designgit clone --depth 1 https://github.com/kok-o/contextos-agentsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/kok-o/contextos-agents/api-design)<a href="https://agentmods.dev/skills/kok-o/contextos-agents/api-design"><img src="https://agentmods.dev/badge/skills/kok-o/contextos-agents/api-design/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/kok-o/contextos-agents/api-design"><img src="https://agentmods.dev/badge/skills/kok-o/contextos-agents/api-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.00652 |
| Opus 5.5 | $0.00015 | $0.00261 |
| Sonnet 5.5 | $0.00007 | $0.00130 |
| Haiku 4.5 | $0.00004 | $0.00065 |
Grade A, and why
api-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API and Interface Design
Design stable, self-documenting, and robust interfaces that are hard to misuse. Good interfaces make the right thing easy and the wrong thing difficult. This applies to REST APIs, GraphQL schemas, RPC services, and internal module contracts.
Core Principles
1. Hyrum's Law Awareness
With a sufficient number of users of an API, all observable behaviors of your system will be depended on by somebody, regardless of what you promise in the contract.
Design implications:
- Never leak internal implementation details: Database column names, raw ORM errors, stack traces, and internal IDs must never escape to clients.
- Lock down response shapes: Undocumented extra fields or varying JSON key ordering become accidental dependencies.
- Design for evolution: Additive changes are safe; removing, renaming, or changing types of fields requires a deprecation window.
2. Contract-First Development
Define the interface and data types before implementing handlers or controllers:
- Specify TypeScript interfaces, JSON Schemas, or OpenAPI documents.
- Review the contract independently of database models.
- Generate server stubs and client SDK types from the unified contract.
3. Uniform Error Semantics
All API error responses must adhere to a single predictable schema across the entire application:
interface APIErrorResponse {
error: {
code: string; // Machine-readable uppercase token (e.g., "VALIDATION_FAILED")
message: string; // Clear, user-safe human-readable description
details?: unknown; // Specific field errors or structured context
};
}
Standard HTTP status mappings:
400 Bad Request: Malformed syntax or unparseable request body.401 Unauthorized: Authentication credentials missing or invalid.403 Forbidden: Authenticated, but lacks required permissions.404 Not Found: Target resource does not exist.409 Conflict: Resource state conflict (e.g., duplicate unique key).422 Unprocessable Entity: Well-formed request failed semantic validation.429 Too Many Requests: Rate limit exceeded.500 Internal Server Error: Unhandled server condition (never leak stack details).
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today First seen · 64 lines · 37 tokens per session scan A 31ee14b4a0b4
api-design is a skill published in the GitHub repository kok-o/contextos-agents (10 stars, last pushed today), licensed Apache-2.0. It adds 37 tokens to every session and 652 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-25.
Other skills, from other repositories
n8n-architect
Use when the user explicitly wants to create, edit, validate, sync, or troubleshoot n8n workflows, asks about n8n nodes or automation, or wants to use n8n-as-code in the current context root.
bfl-api
BFL FLUX API integration guide covering endpoints, async polling patterns, rate limiting, error handling, webhooks, and regional endpoints with Python and TypeScript code examples.
api-doc-generator
Generate API documentation from source code, supporting REST APIs, GraphQL, and various documentation formats.
solr-extending
To build Solr plugins: SearchComponent, QParser, URP, DocTransformer.
api-aqa-flow
Workflow for backend API test automation: TMS / Issue Tracker test cases → automated API tests, HITL-gated.
tech-specs
To define clear, testable tech specs from requirements — target-state architecture, contracts, interfaces.