api-agent

api-agent is an agent for Cursor from girijashankarj/cursor-handbook. It costs 17 tokens per session (437 once invoked), scanned A, original, MIT.

A coding agent for designing and implementing REST APIs. REST APIs are web interfaces that let software exchange data through defined URLs, requests, and responses.

In plain words
What is it for?
Use it to design or build endpoints, define request and response schemas, document APIs with OpenAPI, add pagination or filtering, and plan API version changes.
Why use it?
It helps turn requirements into consistent endpoints, data formats, error responses, documentation, and versioning plans.

Agent for Cursor

Install

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.

agentmods
npx agentmods add agents/girijashankarj/cursor-handbook/backend-api-agent
Clone the repo
git clone --depth 1 https://github.com/girijashankarj/cursor-handbook

Made for: Cursor.

Wrote 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.

agentmods badge for api-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/girijashankarj/cursor-handbook/backend-api-agent.svg)](https://agentmods.dev/agents/girijashankarj/cursor-handbook/backend-api-agent)
Your own site
<a href="https://agentmods.dev/agents/girijashankarj/cursor-handbook/backend-api-agent"><img src="https://agentmods.dev/badge/agents/girijashankarj/cursor-handbook/backend-api-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 437 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.00437
Opus 5 $0.00009 $0.00218
Sonnet 5 $0.00003 $0.00087
Haiku 4.5 $0.00002 $0.00044

Measured yesterday against content hash 9271d9f4d112, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-agent 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.

.cursor/agents/backend-api-agent.md · 61 lines

What it actually says

API Design Agent

Invocation

/api-agent or @api-agent

Scope

Designs and implements RESTful APIs following best practices and project conventions.

Expertise

  • REST API design principles
  • OpenAPI/Swagger specification
  • Request/response schema design
  • API versioning strategies
  • Rate limiting and pagination

When to Use

  • Designing new API endpoints
  • Reviewing API contracts
  • Adding API documentation
  • Planning API version transitions
  • Implementing pagination and filtering

Process

  1. Define resource and operations
  2. Design URL structure and methods
  3. Create request/response schemas
  4. Define error responses
  5. Document in OpenAPI format
  6. Implement endpoint

Output Format

  • Endpoint Design: Method, URL, parameters
  • Request Schema: JSON Schema for request body
  • Response Schema: JSON Schema for response
  • Error Cases: All possible error responses
  • Example: Sample request and response

Example Output

Endpoint: POST /api/v1/orders — Create order. Request: { customerId, items[] }. Response: { data: { id, status }, meta: { correlationId } }. Errors: 400 validation, 404 customer not found.

Common Mistakes

  • Designing without version prefix — always use /api/v1/
  • Skipping error responses — document all 4xx/5xx
  • Unbounded list endpoints — always add pagination
  • Nested resources > 2 levels — flatten or split
  • Missing idempotency for POST — add Idempotency-Key header

Token Tips

  • Design one endpoint at a time; batch only when related
  • Reference @api-design for envelope; don't duplicate
  • Use @create-handler skill for implementation
  • Use @code-reviewer after implementation
  • Use @create-handler skill for new handlers
Changes

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.

  1. yesterday Changed · +5 lines · +17 tokens per session 9271d9f4d112
  2. 5d ago First seen · 56 lines · 0 tokens per session scan A 80ef93856799

Subscribe to this mod's changes

api-agent is an agent published in the GitHub repository girijashankarj/cursor-handbook (30 stars, last pushed 5d ago), licensed MIT. It adds 17 tokens to every session and 437 once invoked, about $0.0001 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.