API Discipline

Validator-clean REST/OpenAPI specs with a mandatory cross-endpoint consistency audit.

Tested · Works

Test report

Verdict
Tested · Works
Score
8.8/10
Tested
Jul 11, 2026
Environment
Claude Code 2.x (agent harness)
Upstream re-checked
Aug 10, 2026 · fde08a8

Our own skill — tested under the same protocol, disclosed. Across 7 API design/review tasks scored with real validators (Redocly, Spectral, oasdiff), the skill eliminated OpenAPI structural errors (0 vs 18 combined on two greenfield specs), cross-endpoint consistency violations (0 vs 6), and HTTP-semantics errors (0 vs 3) against a bare-agent baseline. Two real caveats are published in verdict.md rather than hidden: the skill lost the T6 seeded-violation review by one seed (9/10 vs 10/10, missing a 201-without-Location finding the bare agent caught), and the T4 breaking-change task is excluded from the win claim because the skill arm was found to have seen a ground-truth hint before analyzing. Protocol test caught real issues in our own repos (dead benchmark links, strict-YAML frontmatter) — fixed and re-verified same day.

Scored on four weighted criteria — install, triggering, output vs. baseline, docs. How scoring works

  • Installs cleanly 5/5
  • Triggers reliably 5/5
  • Output vs. baseline 7/10
  • Docs & honesty 5/5

What API Discipline does

Enforces REST/OpenAPI design discipline on greenfield designs, endpoint additions, and spec reviews: plural-noun resource naming, one shared RFC 9457 error model, pagination/versioning conventions declared once and reused, correct PUT/PATCH/POST/DELETE semantics, a breaking-change diff on every edit, and a mandatory 10-point consistency audit before delivery. Benchmarked against a bare Claude agent on 7 tasks with mechanical validators (Redocly, Spectral, oasdiff) rather than self-reported scoring.

API Discipline before / after — same task, with and without

Without the skill

A bare agent designing an API adds one endpoint with `page_size` where every other list uses `limit`, documents a 500 for a validation error, ships a verb-in-path route like `/cancelOrder`, and returns a spec with a broken `$ref` — nothing forced a check, and redocly counted 12 and 6 structural errors on the two greenfield tasks.

With API Discipline

With the skill loaded, conventions are declared once and reused everywhere: a single pagination pair, one RFC 9457 error schema `$ref`'d from every 4xx/5xx, plural noun-only paths, correct create/delete status codes, and a mandatory 10-point consistency audit before delivery — 0 validator errors and 0 consistency/semantics violations across all four design tasks.

How to install API Discipline

git clone https://github.com/Skillproofdev/api-discipline ~/.claude/skills/api-discipline

Skills live in ~/.claude/skills/ (global) or .claude/skills/ (per-project). Restart Claude Code after installing.

Commands — how to trigger API Discipline

  • /api-discipline Validator-clean REST/OpenAPI specs with a mandatory cross-endpoint consistency audit.

It also activates on plain-language prompts like these:

  • Design a REST API for a project management tool with users, projects, and tasks.
  • Add an endpoint to cancel an order in our existing OpenAPI spec — here's the current spec.yaml.
  • Should I use PUT or PATCH to update a single field on a user resource?

Frequently asked questions

Is the API Discipline skill free?
Yes. The skill itself is free from Skillproofdev/api-discipline. SkillProof publishes the install command and an independent test verdict at no cost.
Does API Discipline work with Claude Code?
We tested it with Claude Code 2.x (agent harness) on Jul 11, 2026. Verdict: Tested · Works. Our own skill — tested under the same protocol, disclosed. Across 7 API design/review tasks scored with real validators (Redocly, Spectral, oasdiff), the skill eliminated OpenAPI structural errors (0 vs 18 combined on two greenfield specs), cross-endpoint consistency violations (0 vs 6), and HTTP-semantics errors (0 vs 3) against a bare-agent baseline. Two real caveats are published in verdict.md rather than hidden: the skill lost the T6 seeded-violation review by one seed (9/10 vs 10/10, missing a 201-without-Location finding the bare agent caught), and the T4 breaking-change task is excluded from the win claim because the skill arm was found to have seen a ground-truth hint before analyzing. Protocol test caught real issues in our own repos (dead benchmark links, strict-YAML frontmatter) — fixed and re-verified same day.
What is the API Discipline SkillProof Score?
8.8/10 — installs cleanly 5/5, triggers reliably 5/5, output vs. baseline 7/10, docs & honesty 5/5.
How do I install API Discipline?
Copy the install command from this page, run it in your terminal, and restart Claude Code. Skills live in ~/.claude/skills/ (global) or .claude/skills/ inside a project.
Can I use API Discipline with Cursor, Copilot, Gemini CLI, Codex or other AI tools?
The SKILL.md format is native to Claude (Claude Code, Desktop, claude.ai). The instructions inside adapt to other assistants: Cursor rules, GitHub Copilot instructions, Windsurf rules, Custom GPTs, AGENTS.md for OpenAI Codex, and GEMINI.md for Google Gemini CLI — our conversion guides cover each, and the free converter on the tools page does the wrapping for you.