api-design-rules

api-design-rules is a cursor rule for Cursor from MN-Lizard-Team/aiyu-multi-agent. It costs 0 tokens per session (1,150 once invoked), scanned A, original, Apache-2.0.

A set of rules for designing web APIs, which are interfaces that let software systems exchange data and actions.

In plain words
What is it for?
Use it when naming routes, choosing HTTP methods and status codes, and defining consistent API behaviour.
Why use it?
It helps keep API endpoints predictable, documented, and compatible as an application grows.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when naming routes, choosing HTTP methods and status codes, and defining consistent API behaviour.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mn-lizard-team/aiyu-multi-agent/api-design-rules
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.

Clone the repo
git clone --depth 1 https://github.com/MN-Lizard-Team/aiyu-multi-agent

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-design-rules

README.md
[![agentmods](https://agentmods.dev/badge/rules/mn-lizard-team/aiyu-multi-agent/api-design-rules/github.svg)](https://agentmods.dev/rules/mn-lizard-team/aiyu-multi-agent/api-design-rules)
Your own site
<a href="https://agentmods.dev/rules/mn-lizard-team/aiyu-multi-agent/api-design-rules"><img src="https://agentmods.dev/badge/rules/mn-lizard-team/aiyu-multi-agent/api-design-rules/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.

agentmods 80×15 button for api-design-rules

Your own site · 80×15
<a href="https://agentmods.dev/rules/mn-lizard-team/aiyu-multi-agent/api-design-rules"><img src="https://agentmods.dev/badge/rules/mn-lizard-team/aiyu-multi-agent/api-design-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,150 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.01150
Opus 5.5 $0.00000 $0.00460
Sonnet 5.5 $0.00000 $0.00230
Haiku 4.5 $0.00000 $0.00115

Measured 2mo ago against content hash 8258cb0df463, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api-design-rules 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 2mo 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.

.cursor/rules/domain/api-design-rules.mdc · 187 lines

How it starts

The opening of the file, as written. The whole thing — 187 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Design Rules — Aiyu Agent Kit

APIs are contracts. Design them to last, document them to be useful.


🔴 CRITICAL: API Fundamentals

RESTful Resource Naming

✅ GOOD                          ❌ BAD
GET    /api/users                GET    /api/getUsers
POST   /api/users                POST   /api/createUser
GET    /api/users/:id            GET    /api/user?id=123
PUT    /api/users/:id            POST   /api/updateUser
DELETE /api/users/:id            POST   /api/deleteUser
GET    /api/users/:id/orders     GET    /api/getUserOrders?uid=123

Rules:

  • Nouns, not verbs — HTTP method provides the verb
  • Plural for collections — /users not /user
  • Nested resources for relationships — /users/:id/orders
  • Kebab-case for multi-word — /user-profiles not /userProfiles

HTTP Methods

Method Purpose Idempotent Safe
GET Read resource Yes Yes
POST Create resource No No
PUT Replace resource Yes No
PATCH Partial update No No
DELETE Remove resource Yes No

Status Codes

Code Meaning Use Case
200 OK Successful GET, PUT, PATCH
201 Created Successful POST
204 No Content Successful DELETE
400 Bad Request Invalid input
401 Unauthorized Missing/invalid auth
403 Forbidden Insufficient permissions
404 Not Found Resource doesn't exist
409 Conflict Duplicate resource
422 Unprocessable Entity Validation failure
429 Too Many Requests Rate limit exceeded
500 Internal Error Server failure

🟡 HIGH: Request/Response Design

Consistent Response Format

// Success
{
  "data": {
    "id": "usr_123",
    "email": "[email protected]",
    "name": "John Doe"
  },
  "meta": {
    "request_id": "req_abc123"
  }
}

// Collection
{
  "data": [...],
  "meta": {
    "total": 150,
    "page": 1,
    "per_page": 20,
    "total_pages": 8
  }
}

// Error
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid email format",
    "details": [
      {"field": "email", "message": "Must be a valid email address"}
    ]
  },
  "meta": {
    "request_id": "req_abc123"
  }
}

Read the full file on GitHub · 187 lines

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. 2mo ago First seen · 187 lines · 0 tokens per session scan A 8258cb0df463

Subscribe to this mod's changes

api-design-rules is a cursor rule published in the GitHub repository MN-Lizard-Team/aiyu-multi-agent (8 stars, last pushed 6mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,150 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-09-03.

Related

api-design-rules compared with cursor rules from other repositories

api-design-rules next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
api-design-rulesMN-Lizard-Team/aiyu-multi-agentCursor rule86mo agoApache-2.0A0Cursor
ponytailDietrichGebert/ponytailCursor rule202k9d agoMITA604Cursor
angular-20angular/angularCursor rule102k5d agoMITA0Cursor
dev-standardapache/supersetCursor rule76kyesterdayApache-2.0A1,147Cursor
prefer-assertions-over-defensive-checksprisma/ormCursor rule48ktodayApache-2.0A0Codex, Cursor
prefer-direct-imports-over-module-mocksprisma/ormCursor rule48ktodayApache-2.0A0Codex, Cursor
shared-plane-packagesprisma/ormCursor rule48ktodayApache-2.0A0Codex, Cursor