quality-review-api

quality-review-api is a cursor rule for Cursor from oakensoul/nextjs-cursor-prompts. It costs 22 tokens per session (1,207 once invoked), scanned A, original, MIT.

A guide for creating or reviewing API endpoints in Next.js 15, the part of the framework that handles server-side web requests.

In plain words
What is it for?
Use it to build or inspect routes with the Next.js App Router, validate requests with Zod, handle HTTP methods, and review security, testing, errors, and documentation.
Why use it?
It helps avoid inconsistent routes, weak input checks, unclear responses, and common security or error-handling gaps.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to build or inspect routes with the Next.js App Router, validate requests with Zod, handle HTTP methods, and review security, testing, errors, and documentation.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/oakensoul/nextjs-cursor-prompts/quality-review-api
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/oakensoul/nextjs-cursor-prompts

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 quality-review-api

README.md
[![agentmods](https://agentmods.dev/badge/rules/oakensoul/nextjs-cursor-prompts/quality-review-api.svg)](https://agentmods.dev/rules/oakensoul/nextjs-cursor-prompts/quality-review-api)
Your own site
<a href="https://agentmods.dev/rules/oakensoul/nextjs-cursor-prompts/quality-review-api"><img src="https://agentmods.dev/badge/rules/oakensoul/nextjs-cursor-prompts/quality-review-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,207 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.00022 $0.01207
Opus 5 $0.00011 $0.00603
Sonnet 5 $0.00004 $0.00241
Haiku 4.5 $0.00002 $0.00121

Measured 7d ago against content hash 98c375869dd8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

quality-review-api 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.

.cursor/prompts/quality/quality-review-api.mdc · 197 lines

How it starts

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


title: API Endpoint Review & Creation description: Comprehensive prompt for creating and reviewing API routes following Next.js 15 App Router standards tags: [prompt, api-routes, next.js, typescript, testing, security, validation] version: 1.0.0 lastUpdated: 2025-06-02 usage: Use for creating new API endpoints or reviewing existing ones audience: [claude, ai-assistants] scope: [api-design, security, validation, testing, error-handling, documentation]

API Endpoint Review & Creation Request

Please create or review API endpoints following our Next.js 15 App Router standards and security best practices:

API Design Requirements

1. Route Structure

  • Use App Router convention: app/api/[endpoint]/route.ts
  • Follow RESTful patterns where appropriate
  • Use descriptive, resource-based URLs
  • Implement proper HTTP methods (GET, POST, PUT, DELETE, PATCH)

2. Request Handling

  • Implement proper request validation using Zod schemas
  • Handle all supported HTTP methods explicitly
  • Parse request bodies, query parameters, and path parameters correctly
  • Implement proper content-type handling

3. Response Format

  • Return consistent response structures
  • Use appropriate HTTP status codes
  • Include proper error messages and details
  • Implement standardized success/error response format

Security Implementation

4. Authentication & Authorization

  • Implement JWT token validation where required
  • Check user permissions for protected endpoints
  • Handle unauthenticated and unauthorized requests properly
  • Validate token expiration and integrity

5. Input Validation & Sanitization

  • Validate all input parameters using Zod schemas
  • Sanitize user input to prevent XSS attacks
  • Implement rate limiting where appropriate
  • Protect against SQL injection and other common attacks

6. CORS & Headers

  • Set appropriate CORS headers
  • Implement security headers (CSP, etc.)
  • Handle preflight OPTIONS requests
  • Set proper cache control headers

Error Handling

Read the full file on GitHub · 197 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. 7d ago First seen · 197 lines · 22 tokens per session scan A 98c375869dd8

Subscribe to this mod's changes

quality-review-api is a cursor rule published in the GitHub repository oakensoul/nextjs-cursor-prompts (4 stars, last pushed 1y ago), licensed MIT. It adds 22 tokens to every session and 1,207 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-31.