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 AsyrafHussin/agent-skills --skill api-design-patternsgit clone --depth 1 https://github.com/AsyrafHussin/agent-skillsWrote 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/asyrafhussin/agent-skills/api-design-patterns)<a href="https://agentmods.dev/skills/asyrafhussin/agent-skills/api-design-patterns"><img src="https://agentmods.dev/badge/skills/asyrafhussin/agent-skills/api-design-patterns/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/asyrafhussin/agent-skills/api-design-patterns"><img src="https://agentmods.dev/badge/skills/asyrafhussin/agent-skills/api-design-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Tool Misuse · line 119 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
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.00059 | $0.01526 |
| Opus 5.5 | $0.00024 | $0.00610 |
| Sonnet 5.5 | $0.00012 | $0.00305 |
| Haiku 4.5 | $0.00006 | $0.00153 |
Grade A, and why
api-design-patterns 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 1mo ago.
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 — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Design Patterns
RESTful API design principles for building consistent, developer-friendly APIs. Contains 38 rules across 7 categories covering resource design, error handling, security, pagination, versioning, response format, and documentation.
Metadata
- Version: 2.0.0
- Rule Count: 38 rules across 7 categories
- License: MIT
When to Apply
Reference these guidelines when:
- Designing new API endpoints
- Reviewing existing API structure
- Implementing error handling and validation
- Setting up pagination, filtering, and sorting
- Planning API versioning strategy
- Configuring API security (auth, CORS, rate limiting)
- Writing API documentation (OpenAPI/Swagger)
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Resource Design | CRITICAL | rest- |
| 2 | Error Handling | CRITICAL | error- |
| 3 | Security | CRITICAL | sec- |
| 4 | Pagination & Filtering | HIGH | page-, filter-, sort- |
| 5 | Versioning | HIGH | ver- |
| 6 | Response Format | MEDIUM | resp- |
| 7 | Documentation | MEDIUM | doc- |
Quick Reference
1. Resource Design (CRITICAL)
rest-nouns-not-verbs- Use nouns for endpoints, not verbsrest-plural-resources- Use plural resource namesrest-http-methods- Correct HTTP method usage (GET, POST, PUT, PATCH, DELETE)rest-nested-resources- Proper resource nesting (max 2 levels)rest-status-codes- Appropriate HTTP status codesrest-idempotency- Idempotent operations with idempotency keysrest-hateoas- Hypermedia links for discoverabilityrest-resource-actions- Non-CRUD actions as sub-resources
2. Error Handling (CRITICAL)
error-consistent-format- Consistent error response structureerror-meaningful-messages- Helpful, actionable error messageserror-validation-details- Field-level validation errorserror-error-codes- Machine-readable error codeserror-no-stack-traces- Never expose stack traces in productionerror-request-id- Include request IDs for debugging
What ships with it
43 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.
- AGENTS.md 190 KB
- metadata.json 1.7 KB
- README.md 1.8 KB
- rules/_sections.md 2.3 KB
- rules/_template.md 866 B
- rules/doc-changelog.md 4.7 KB
- rules/doc-examples.md 4.9 KB
- rules/doc-openapi.md 7.0 KB
- rules/error-consistent-format.md 8.1 KB
- rules/error-error-codes.md 8.2 KB
- rules/error-meaningful-messages.md 7.7 KB
- rules/error-no-stack-traces.md 7.4 KB
- rules/error-request-id.md 7.0 KB
- rules/error-validation-details.md 7.9 KB
- rules/filter-query-params.md 2.4 KB
- rules/page-consistent-params.md 2.1 KB
- rules/page-cursor-based.md 2.1 KB
- rules/page-metadata.md 2.2 KB
- rules/page-offset-based.md 2.1 KB
- rules/resp-compression.md 3.7 KB
- rules/resp-consistent-structure.md 3.2 KB
- rules/resp-json-conventions.md 3.3 KB
- rules/resp-partial-responses.md 3.9 KB
- rules/rest-hateoas.md 6.5 KB
- rules/rest-http-methods.md 5.4 KB
- rules/rest-idempotency.md 6.1 KB
- rules/rest-nested-resources.md 4.9 KB
- rules/rest-nouns-not-verbs.md 2.6 KB
- rules/rest-plural-resources.md 3.4 KB
- rules/rest-resource-actions.md 7.2 KB
- rules/rest-status-codes.md 5.5 KB
- rules/sec-authentication.md 8.3 KB
- rules/sec-authorization.md 8.2 KB
- rules/sec-cors-config.md 6.5 KB
- rules/sec-https-only.md 7.0 KB
- rules/sec-input-validation.md 8.0 KB
- rules/sec-rate-limiting.md 7.3 KB
- rules/sec-sensitive-data.md 7.1 KB
- rules/sort-flexible.md 2.5 KB
- rules/ver-backward-compatible.md 2.4 KB
- rules/ver-deprecation.md 2.9 KB
- rules/ver-header-based.md 2.6 KB
- rules/ver-url-path.md 2.0 KB
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.
- 1mo ago First seen · 194 lines · 59 tokens per session scan A 9762b4a7c69a
api-design-patterns is a skill published in the GitHub repository AsyrafHussin/agent-skills (93 stars, last pushed 1mo ago), licensed MIT. It adds 59 tokens to every session and 1,526 once invoked, about $0.0002 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-08-30.
Other skills, from other repositories
patterns-of-enterprise-application-architecture
Apply Martin Fowler-inspired enterprise architecture rules when choosing layers, service layers, transaction scripts, domain models, repositories, mappers, or DTOs.
clean-architecture
Apply Robert C. Martin-inspired architecture rules when separating business policy from frameworks, databases, UI, or infrastructure details.
designing-data-intensive-applications
Apply Martin Kleppmann-inspired data-system rules when designing reliability, scalability, consistency, replication, transactions, streams, or schema evolution.
domain-driven-design-distilled
Apply Vaughn Vernon-inspired lightweight DDD rules when using bounded contexts, subdomains, context maps, and tactical modeling without excess ceremony.
domain-driven-design
Apply Eric Evans-inspired DDD rules when modeling a complex domain, defining bounded contexts, protecting ubiquitous language, or designing aggregates.
implementing-domain-driven-design
Apply Vaughn Vernon-inspired implementation DDD rules when building aggregates, domain events, repositories, application services, or context integrations.