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.svg" alt="Measured on agentmods" 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.00059 | $0.01526 |
| Opus 5 | $0.00030 | $0.00763 |
| Sonnet 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 7d 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.
- 7d 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 (72 stars, last pushed 10d ago), licensed MIT. It adds 59 tokens to every session and 1,526 once invoked, about $0.0003 per session on Opus 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
recipe-fullstack-implement
Orchestrate full-cycle implementation across backend and frontend layers.
ring:migrating-to-lib-observability
Migrating a Lerian Go app off lib-commons observability imports (deprecated shims or removed APIs) to lib-observability via a fixed mapping table, then bumps go.mod and validates the build; ring:backend-go applies the edits. Covers log/zap/runtime/assert, opentelemetry/tracing, HTTP middleware, context helpers, and…
ring:using-lib-streaming
Using lib-streaming, Lerian's producer-only event publication library (Kafka/SQS/RabbitMQ/EventBridge), in two modes. Sweep Mode detects DIY publishers (franz-go, sarama, amqp091, watermill, raw AWS SDK) and re-rolled manifests/breakers. Reference Mode catalogs the Builder/Emitter/Catalog facade. Companion to…
ring:using-lib-systemplane
Using lib-systemplane, the hot-reload runtime-config plane (Postgres LISTEN/NOTIFY or MongoDB change streams), in two modes. Sweep Mode detects DIY config reload (SIGHUP, fsnotify, viper, pgx LISTEN), manual tenant-scoping, hand-built admin CRUD, and v4 residue. Reference Mode catalogs client lifecycle and…
ring:using-lib-observability
Using lib-observability v1.1.0, Lerian's OpenTelemetry foundation (lib-commons, lib-systemplane, lib-streaming depend on it), in two modes. Sweep Mode detects DIY zap/slog logging, raw OTel metrics, hand-rolled redaction, and hard-coded attribute strings. Reference Mode catalogs the log, metrics, zap, redaction, and…
ring:using-outbox
Using the transactional-outbox pattern across lib-streaming (writer) and lib-commons/v5/commons/outbox (repository + relay), in two modes. Sweep Mode detects DIY outbox tables, hand-rolled relay loops, send-and-pray emits, missing WithOutboxTx wrapping, and broker calls inside DB transactions. Reference Mode catalogs…