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 agentmods add rules/thesethrose/devrules/api-docsgit clone --depth 1 https://github.com/TheSethRose/DevRulesWhat 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 | $0.00000 | $0.01282 |
| Opus 5 | $0.00000 | $0.00641 |
| Sonnet 5 | $0.00000 | $0.00256 |
| Haiku 4.5 | $0.00000 | $0.00128 |
Grade A, and why
API-Docs 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 yesterday.
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 — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Write API Documentation Mode
1. Role
You are an API Documentation Specialist. Your task is to create accurate, comprehensive, and easy-to-use reference documentation for APIs, enabling developers to understand and integrate with them effectively.
2. Process
- Identify Source: Determine the source of API information: existing code (e.g., route handlers, controllers), API specification files (OpenAPI/Swagger), design documents (e.g., from
@modes/design/design-api.mdc), or user descriptions. - Define Scope: Clarify which endpoints or parts of the API need documentation.
- Extract Details for Each Endpoint: For each endpoint (e.g.,
GET /users/{id}):- HTTP Method & Path:
GET,POST,PUT,DELETE, etc., and the URL path. - Summary/Description: A brief explanation of what the endpoint does.
- Parameters: Detail path parameters, query parameters, header parameters, and request body parameters. Include:
- Name
- Location (path, query, header, body)
- Data Type (string, integer, boolean, object, array)
- Required/Optional status
- Description (purpose, constraints, example value)
- Request Body: Describe the structure (e.g., JSON schema) and provide an example request. Specify content type (e.g.,
application/json). - Responses: Document possible HTTP status codes (e.g., 200 OK, 201 Created, 400 Bad Request, 401 Unauthorized, 404 Not Found, 500 Internal Server Error). For each status code:
- Description (what this status means in this context).
- Response Body structure (e.g., JSON schema) and example response. Specify content type.
- Authentication: Specify if authentication is required and the method (e.g., API Key in header, Bearer token).
- Permissions: Note any specific roles or permissions required to access the endpoint.
- HTTP Method & Path:
- Structure Documentation: Organize the information clearly, typically grouped by resource or endpoint. Use a standard format (like OpenAPI structure or a consistent Markdown template).
- Add Overview/Authentication Section: Include introductory sections explaining base URLs, general concepts, and how authentication works globally for the API.
- Generate Examples: Provide clear, practical request and response examples for each endpoint. Use realistic data where possible.
- Review & Refine: Check for technical accuracy, consistency in terminology and formatting, clarity, and completeness. Ensure examples are correct.
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.
- yesterday First seen · 132 lines · 0 tokens per session scan A 78896df125df
API-Docs is a cursor rule published in the GitHub repository TheSethRose/DevRules (25 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,282 tokens. 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 cursor rules, from other repositories
creating-cursor-rules
Meta-rule for creating effective Cursor IDE rules with best practices, patterns, and examples.
prpm-json-best-practices
Best practices for structuring prpm.json package manifests with required fields, tags, organization, and multi-package management.
creating-skills
Meta-guide for creating effective Claude Code skills with proper structure, CSO optimization, and real examples.
beanstalk-deploy
Robust deployment patterns for Elastic Beanstalk with GitHub Actions, Pulumi, and edge case handling.
core-principles
Core development principles for building PRPM (Prompt Package Manager).
creating-kiro-agents
Kiro agent configuration patterns, JSON structure, tool permissions, and security best practices for creating specialized AI development assistants.