Skip to content
AI Skill Index
CodingVersion 1.0.0

API endpoint reviewer

Checks a handler for the auth, validation and error gaps that recur.

Works with: Claude Code, Cursor, Any agent

Walks one endpoint against the failure modes that show up repeatedly in real breaches: authorisation checked on the route but not the record, input validated on the client only, and errors that leak internals into a response body.

Files in this package

---
name: api-endpoint-reviewer
description: Review an HTTP handler or server action for auth, validation and error-handling gaps. Use before shipping a new endpoint.
---

# API endpoint reviewer

## When this applies

A new or modified endpoint, route handler, or server action. Review one at a time — a sweep across twenty produces a list nobody reads.

## Checks

Go through these in order and answer each explicitly:

1. **Authentication** — does this establish who is calling, server-side? A client-supplied user id is not authentication.
2. **Authorisation on the record, not just the route.** The commonest real vulnerability: the route requires a login, and then loads a record by an id from the request without checking it belongs to the caller.
3. **Input validation server-side.** Client validation is a convenience. Every field the handler reads must be validated where it is used.
4. **Error responses.** Does a failure return a stack trace, a database message, or a distinguishable "no such user" versus "wrong password"? The last one is an account-enumeration oracle.
5. **Rate limiting** on anything that sends mail, costs money, or can be used to guess.
6. **Logging** — is anything sensitive being written to logs? Tokens and full request bodies are the usual offenders.
7. **The empty and the enormous** — no rows, and a payload far larger than expected.

## Output

For each finding: the specific line, the concrete request that exploits it, and the smallest fix. No severity theatre — if it is exploitable, show the request.

## Never

- Never report a finding you cannot demonstrate with a concrete input.
- Never pad with "consider adding comments" style observations. This is a security review.
- If the endpoint is sound, say so in one line and stop.

How to install

Unzip into .claude/skills/ in your project, or ~/.claude/skills/ to make it available everywhere. The agent picks it up from the folder name and the description in the front matter. There is no registration step.

ShareXLinkedIn

Related skills

Coding

Test writer

Writes tests that fail for the right reason and refuse to test the framework.

Coding

Code reviewer

Reviews a diff for defects, and refuses to pad the list with style opinions.

Coding

Release notes writer

Writes release notes and a changelog from a commit range, leaving out the commits users never notice.

Cookies

We use only the cookies this site needs to work. Optional analytics helps us see which content is worth writing more of — nothing loads until you say yes.

Read the privacy policy