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 timwukp/agent-skills-best-practice --skill api-designgit clone --depth 1 https://github.com/timwukp/agent-skills-best-practiceWrote 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/timwukp/agent-skills-best-practice/api-design)<a href="https://agentmods.dev/skills/timwukp/agent-skills-best-practice/api-design"><img src="https://agentmods.dev/badge/skills/timwukp/agent-skills-best-practice/api-design.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
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 →
- medium Data Exfiltration · line 126 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
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.00072 | $0.01930 |
| Opus 5 | $0.00036 | $0.00965 |
| Sonnet 5 | $0.00014 | $0.00386 |
| Haiku 4.5 | $0.00007 | $0.00193 |
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 8d 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 — 302 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Design
Instructions
Step 1: Gather Requirements
Ask:
- What resources does this API manage? (e.g., users, orders, products)
- What operations are needed? (CRUD, search, bulk operations, async jobs)
- Who consumes it? (internal services, public clients, mobile apps)
- Auth model? (API key, OAuth2, JWT)
- Output format preference? (OpenAPI 3.0 YAML, endpoint list, or both)
Step 2: Resource Naming
Apply these naming conventions:
| Rule | Good | Bad |
|---|---|---|
| Plural nouns | /users |
/user, /getUsers |
| Nested resources | /users/{id}/orders |
/getUserOrders |
| Lowercase with hyphens | /order-items |
/orderItems, /order_items |
| No verbs in URLs | /users/{id}/activate (POST) |
/activateUser |
| Max 3 levels deep | /users/{id}/orders |
/users/{id}/orders/{id}/items/{id}/reviews |
For deeply nested resources, promote to top-level with query filters:
GET /reviews?order_id=123&user_id=456
Step 3: HTTP Methods and Status Codes
Map operations to methods:
| Operation | Method | Success Code | Response Body |
|---|---|---|---|
| List/Search | GET | 200 | Collection |
| Get single | GET | 200 | Resource |
| Create | POST | 201 | Created resource + Location header |
| Full update | PUT | 200 | Updated resource |
| Partial update | PATCH | 200 | Updated resource |
| Delete | DELETE | 204 | Empty |
| Async operation | POST | 202 | Job status + Location header |
Error codes to use consistently:
- 400 - Malformed request (bad JSON, missing required field)
- 401 - Not authenticated
- 403 - Authenticated but not authorized
- 404 - Resource not found
- 409 - Conflict (duplicate, version mismatch)
- 422 - Valid JSON but failed business validation
- 429 - Rate limited
- 500 - Server error (never expose internals)
Step 4: Pagination, Filtering, and Sorting
Pagination (cursor-based preferred for large datasets):
GET /orders?cursor=eyJpZCI6MTAwfQ&limit=25
Response:
{
"data": [...],
"pagination": {
"next_cursor": "eyJpZCI6MTI1fQ",
"has_more": true
}
}
What ships with it
2 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.
- 8d ago First seen · 302 lines · 72 tokens per session scan A 567d727c51e7
api-design is a skill published in the GitHub repository timwukp/agent-skills-best-practice (10 stars, last pushed yesterday), licensed MIT. It adds 72 tokens to every session and 1,930 once invoked, about $0.0004 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-31.
Other skills, from other repositories
sns
AWS SNS notification service for pub/sub messaging. Use when creating topics, managing subscriptions, configuring message filtering, sending notifications, or setting up mobile push.
api-gateway
AWS API Gateway for REST and HTTP API management. Use when creating APIs, configuring integrations, setting up authorization, managing stages, implementing rate limiting, or troubleshooting API issues.
cognito
AWS Cognito user authentication and authorization service. Use when setting up user pools, configuring identity pools, implementing OAuth flows, managing user attributes, or integrating with social identity providers.
sqs
AWS SQS message queue service for decoupled architectures. Use when creating queues, configuring dead-letter queues, managing visibility timeouts, implementing FIFO ordering, or integrating with Lambda.
rust
Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use when writing new Rust code, reviewing or refactoring existing code, deciding between borrowing vs cloning or ownership patterns, implementing error handling with Result types, optimizing Rust code for performance, or writing…
prowler-test-api
Testing patterns for Prowler API: JSON:API, Celery tasks, RLS isolation, RBAC. Trigger: When writing tests for api/ (JSON:API requests/assertions, cross-tenant isolation, RBAC, Celery tasks, viewsets/serializers).