review-openapi
Review an OpenAPI spec as the product it is — documentation for an external API consumer — and fix what fails that reader.
Skill by thrawn01
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/thrawn01-review-openapi
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, design, backend, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/review-openapi
What's inside
- Skill name
review-openapi- Description
- Review an OpenAPI spec as the product it is — documentation for an external API consumer — and fix what fails that reader. Catches internal-context leaks (framework names, repo doc paths, ticket/design-doc ids, 'per <framework>' justifications), spec-splained self-correction machinery (did-you-mean 404s, teaching-error rules), condition-specific vocabulary on shared schemas that renders under every status, union error vocabularies that advertise codes an endpoint cannot return, and missing or incoherent request/response examples. Use when the user says 'review the openapi', 'review-openapi', 'audit the API docs', 'review the spec', or after contract changes. This is the API-consumer counterpart to review-for-reader (which reviews code comments/docs for the next maintainer); it is NOT a schema/breaking-change checker (use review-behavior-change) and NOT a linter substitute (duh lint still runs).
- License
- MIT
- Instructions
- 135 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- allowed-tools: must be a space-separated string
Files (1)
- SKILL.md
SKILL.md (first lines)
# Review OpenAPI
Review an OpenAPI spec the way its **actual reader** experiences it: an external API consumer —
human or LLM agent — who has this one document, no access to the repo, no knowledge of the
company's frameworks, tickets, or design history. The spec is a product for that reader. This
skill finds and fixes the prose and examples that fail them.
It reviews **the documentation quality of the contract** — descriptions, error vocabularies,
examples. It does not judge schema design or flag breaking changes (`review-behavior-change`),
and it does not replace the spec linter (`duh lint` in DUH-RPC repos) — it runs the linter as a
gate around its own edits.
## The core test: the Consumer Test
> For every description, example, and error vocabulary: **does it serve someone integrating
> against this API from the outside, with only this document?** If understanding a sentence
> requires knowing an internal framework, reading a repo doc, or having watched the design happen,
> it fails. If a rendered endpoint page shows information that endpoint cannot produce, it fails.
## 1. Resolve the spec
- Explicit argument → use it.
- Otherwise: specs touched by the current diff (`git diff --name-only <base>...HEAD | grep
-i 'openapi.*\.ya?ml$'`), else `**/api/**/openapi.yaml` in the repo. Multiple hits with no
argument → review each in turn.
- Locate the implementation's error emitters for Rule 4 (in this repo's Go services: the
`NewServiceError` / `NewServiceErrorWithCode` call sites and the handlers that reach them).
## 2. The audit rules
Audit the whole spec against each rule. Fix findings in place.
### Rule 1 — Self-contained: no internal context leaks
The reader has never heard of your RPC framework, your monorepo, or your tickets. Remove or
rewrite, anywhere in the spec:
- **Internal framework/protocol names** used as explanation ("Standard DUH-RPC error body",
"DUH paths are static").
- **Repo document references** ("see docs/duh-rpc-cheatsheet.md").
- **Ticket / design-doc / roadmap ids and internal shorthand** ("(D12)", "ENG-132", "slice 6",
"the wire transport", invariant labels like "(I3)").
- **Deferred justifications** — "retryable per DUH" tells the reader nothing. State the actual,
consumer-relevant reason: *"Safe to retry: every operation is read-only."*
- **Roadmap talk** — "lifecycle metadata arrives in slice 6" is internal planning. Describe what
the API is today; omit what it isn't.
Rewrite test: every sentence must be justifiable to an external integrator using only concepts
the spec itself defines (its schemas, its endpoints, HTTP, and the domain — e.g. git plumbing for
a git API is fine; the house RPC framework is not).
### Rule 2 — Don't spec-splain the API's self-correction machinery
Convenience behaviors that exist to rescue callers who *have not read the spec* — did-you-mean
suggestions on unknown endpoints, teaching 400s that spell out the schema, endpoint listings in
error bodies — do **not** belong in the spec. The spec reader already has the endpoint list and
the schemas; documenting the recovery machinery is teaching them how the API works internally,
not how to use it. Keep the behaviors implemented and surface-tested; delete their documentation
from the spec, including cross-references they leave dangling (details fields, code lists,
"see the top-level description" pointers).
What stays: error facts a spec-reading consumer acts on — status codes, the code discriminator
values, what `details` carries, retry semantics.
### Rule 3 — Shared schemas stay generic; specifics live where they apply
A shared error schema (`Reply`-style: code/message/details) is referenced by **every** error
response on **every** endpoint. Any condition-specific enumeration in its property descriptions —
"the codes are REPO_NOT_FOUND, REF_NOT_FOUND, … (all HTTP 404)" — renders under a 500 on an
unrelated endpoint. The shared schema states only the general rule (what the field is, how to
branch on it, where the specific values are listed); the specific vocabularies live on the
response definitions they belong to.
### Rule 4 — Per-endpoint exhaustive error vocabularies, verified against the code
Shared response components document the **union** of what all endpoints can return — so a
`repos.get` renders `PATH_NOT_FOUND` it can never produce. Fix by splitting response components
by *actual* vocabulary and wiring each endpoint to the variant matching exactly what its
implementation emits:
1. **Derive the truth from the error emitters, never from the existing spec prose.** Walk each
handler's reachable error paths (in Go: which `err*` constructors each endpoint's call graph
reaches). Watch for structural facts: an endpoint without pagination cannot return a
cursor-expired code; a name-anchored cursor cannot expire; a filter-not-deny endpoint has no
404.
2. Define one response component per distinct vocabulary (`NotFoundRepo`, `NotFoundRev`,
`NotFoundRevCursor`, `BadRequest`, `BadRequestWrongType`, …), same wire schema throughout.
3. Each component's description lists its codes **exhaustively and says so** ("the only code
here", "the code is one of: …") with a one-clause meaning per code.
4. Rewire every endpoint's responses to its exact variants.
This is documentation-only: the wire schema and generated code must not change (see Verify).
### Rule 5 — Worked request/response example pairs in one consistent world
Every operation carries a request example and a 200 example, where **the request example is the
call that produces the response example**. All examples across the spec share **one example
world** (one fictional repo/tenant/dataset) so values cross-reference between endpoints: the id
one endpoint returns is the id another endpoint's example queries.
Coherence is load-bearing — the example world's facts must actually hold:
- Graph/relational claims are real: a merge-base example yields what the example history implies;
ahead/behind counts match the listed items; a "more pages exist" flag is impossible after a
terminal item (e.g. a root commit).
- Weave in teaching cases: an optional field **absent** where the API omits it (not null-filled),
a realistic opaque cursor paired with `has_next_page: true`, input-format variety across
requests (each accepted form — symbolic name, short name, raw id — appears at least once).
- Binary/streaming endpoints get a small literal example on their media type.
- Examples are illustrations, not contract: keep them typical-shaped, not exhaustive.
## 3. Verify (gate every edit batch)
1. **Spec lints**: the repo's spec linter (`duh lint <spec>` here) passes.
2. **Codegen-neutral**: regenerate/build the generated target (`bazel build …:generated` or the
repo's `duh-gen` task). Doc-only changes must produce no schema/proto/fieldmap churn.
3. **Contract tests pass**: any tests that read the spec (vocabulary censuses, teaching-error
surface tests) still pass — Rule 2 removes *documentation*, never behavior.From thrawn01/claude-dotfiles, MIT.
More from thrawn01/claude-dotfiles
- 0.632score
review-tests
thrawn01
Review whether a feature's existing tests actually cover the acceptance criteria, scenarios, and correctness constraints documented in its Blueprint…
SkillAFreshness: A★ 11Claude Code +9 - 0.628score
linear-resume
thrawn01
Resume in-flight work tracked in Linear by reading the latest handoff and surfacing where things stand + the reasoned next step.
SkillAFreshness: A★ 11Claude Code +9 - 0.607score
herdr
thrawn01
Control Herdr, a terminal multiplexer for coding agents.
SkillAFreshness: A★ 11Claude Code +9 - 0.592score
html-explainer
thrawn01
Create a standalone HTML explainer that teaches a thing visually, from the outside in — leading with the perspective of the person who uses or calls it (a…
SkillBFreshness: B★ 11Claude Code +9 - 0.592score
lazy
thrawn01
Write the fewest words that carry the facts — terse, plain, human, not lawyerly.
SkillBFreshness: B★ 11Claude Code +9 - 0.592score
writing-style
thrawn01
Write or edit long-form prose in the user's essayist voice.
SkillBFreshness: B★ 11Claude Code +9 - 0.592score
writing-prose
thrawn01
Write explanatory prose for a smart reader meeting the subject for the first time: newcomer explainers, concept sections, 'how it works' docs, the explanatory…
SkillBFreshness: B★ 11Claude Code +9 - 0.592score
no-ai-slop
thrawn01
Load and apply the No AI Slop output style — direct, opinionated answers with zero filler and a real point of view.
SkillBFreshness: B★ 11Claude Code +9 - 0.543score
babysit-pr
thrawn01
Monitor and fix automated review comments (Copilot, SonarCloud) and CI failures on the current branch's PR.
SkillCFreshness: C★ 11Claude Code +9 - 0.542score
review-behavior-change
thrawn01
Review code changes for undocumented behavioral/surface changes.
SkillCFreshness: C★ 11Claude Code +9 - 0.542score
bug-detector
thrawn01
Detects bugs, logic errors, and edge case handling issues in code.
SkillCFreshness: C★ 11Claude Code +9 - 0.542score
handoff
thrawn01
Write a brief capturing the current state of in-flight work so it can be resumed in a fresh context window.
SkillCFreshness: C★ 11Claude Code +9
Signals
- Stars
- 11
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 10, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/thrawn01/claude-dotfiles
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from thrawn01
- 0.632score
review-tests
thrawn01
Review whether a feature's existing tests actually cover the acceptance criteria, scenarios, and correctness constraints documented in its Blueprint…
SkillAFreshness: A★ 11Claude Code +9 - 0.628score
linear-resume
thrawn01
Resume in-flight work tracked in Linear by reading the latest handoff and surfacing where things stand + the reasoned next step.
SkillAFreshness: A★ 11Claude Code +9 - 0.607score
herdr
thrawn01
Control Herdr, a terminal multiplexer for coding agents.
SkillAFreshness: A★ 11Claude Code +9 - 0.592score
lazy
thrawn01
Write the fewest words that carry the facts — terse, plain, human, not lawyerly.
SkillBFreshness: B★ 11Claude Code +9 - 0.592score
writing-prose
thrawn01
Write explanatory prose for a smart reader meeting the subject for the first time: newcomer explainers, concept sections, 'how it works' docs, the explanatory…
SkillBFreshness: B★ 11Claude Code +9 - 0.592score
writing-style
thrawn01
Write or edit long-form prose in the user's essayist voice.
SkillBFreshness: B★ 11Claude Code +9
Cite this page
review-openapi skill. Agent Mart. https://agentmart.dev/skills/thrawn01-review-openapi (last updated 2026-10-24)