agentsclimarketplace

Api error audit

Skill vaibhavsaxena022/skills/api-error-audit

AI-agent skills for software engineering — works with Claude Code, Codex, Cursor

Install
npx -y skills add vaibhavsaxena022/skills --skill api-error-audit

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 23 days oldThe repository was created 23 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Audit a REST API layer for consistent, correct, and safe error handling. Use when reviewing controllers/handlers or when error responses look inconsistent. Checks status codes, error-response shape, validation handling, and leakage of internal details.

SKILL.md

1.7 KB, as published. Nobody here has run it

API Error Audit

Review the API's error handling for consistency and safety.

Checklist

  • Status codes — correct semantics: 400 validation, 401 vs 403, 404 vs 409, 422 unprocessable. No 200 with an error body.
  • Consistent shape — one error schema across all endpoints (e.g. code, message, details, traceId).
  • Central handling — errors handled in one place (@ControllerAdvice / middleware), not scattered per-controller try/catch.
  • Validation — bean-validation failures mapped to 400 with field-level detail.
  • No leakage — stack traces, SQL, and internal messages go to logs, never to the client response.
  • Edge cases — duplicate/absent resources handled consistently; timeouts and upstream failures mapped to sane codes.

Output

  1. Findings — each as: location → issue → fix.
  2. A recommended single error-response shape if the API lacks one.

Rules

  • Prefer a central handler over scattered try/catch.
  • Never expose internal exception detail to clients.
  • Don't change public error contracts without flagging it as a breaking change.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.