Restep2½

Tools · For AI agents · draft 6

Skills for agentsTeach your agent

Two skills in the SKILL.md format: one to design or change an API so it follows Restep, one to review a change against it. They carry the specification, restep-check and the schemas, and work offline.

Claude Code, Codex, Cursor and other agents · SKILL.md

Why use them

The spec, not a vague memory

Your agent has read a hundred API styles and mixes them. These skills send it to spec.md, the sections that apply, before it writes a line.

It checks its own work

restep-design is not done until restep-check exits with 0, and it tells you which warnings stay and why.

Findings with a section number

restep-review reports each finding with its section, MUST or SHOULD, the file and line, what the API does and what the section asks. Breaking changes included.

The spec offline, in any agent

Each skill carries the specification and the schemas, so it reads offline; the checker comes from npm. The SKILL.md format works in Claude Code, Codex, Cursor and others.

What the agent does with each one

An agent reads the description of every installed skill and loads the one that fits the request. restep-design comes in when you mention Restep or ask to make an API’s errors, pagination, filtering, retries or concurrency consistent. restep-review, when you ask whether an API follows Restep or to review one against it. You can also ask for either by name.

restep-design: build or change an API

  1. Map the API. Every collection and item resource with its methods, and every query parameter it already takes.
  2. Pick the profiles. core always; query if it filters or paginates, writes for retries or concurrent edits, cache for caching, relations for nested or linked resources, sync for clients that keep a local copy, with their dependencies. Then it reads, in full, sections 3 to 5 of spec.md and the section of each chosen profile.
  3. Build core and then each profile, from its section. The skill adds a checklist of the rules most often missed: next always present, unsupported_parameter instead of silence, decimals as strings, limit rejected rather than clamped, strong ETags, idempotency keys kept 24 hours, Cache-Control on every read, and so on.
  4. Verify with npx restep-check http://localhost:3000/ --writes against a local server with test data. It fixes every FAIL, fixes each WARN or explains why it stays, and finishes when the checker exits with 0.

restep-review: review a change

  1. Find what the API announces: its discovery document, or the code that builds it, and its Link: rel="profile" headers. Without a discovery document it assumes core and reports the missing document.
  2. Read the yardstick: sections 3 to 5 and the section of every announced profile and extension. Those are the promises the API has made, and only those.
  3. Check the change: every MUST, MUST NOT and SHOULD of those sections on every endpoint it touches, plus the list of breaking changes in 5.5. A rename without deprecation is a finding even if every endpoint conforms.
  4. Run the checker if a server is reachable, read only. --writes only against a test environment, and only if you agree.
  5. Report, most severe first: broken MUSTs, then breaking changes, then SHOULDs. It also says which requirements it could not check, and why.

Install

Both skills are on GitHub, in restep-spec/skills, so an agent can install and update them:

# Claude Code, Codex, Cursor and others, with the skills CLI
npx skills add restep-spec/skills
npx skills add restep-spec/skills --skill restep-design   # just one

# Claude Code, as a plugin
/plugin marketplace add restep-spec/skills
/plugin install restep@restep

To run the checker, the agent needs Node 18 or later: it calls npx restep-check.

What each skill carries

FileWhat it is
SKILL.mdThe instructions: when to use the skill and its steps. restep-design (7.5 KB) also has the checklist; restep-review is under 2 KB
spec.mdThe whole specification in Markdown, the same as /1/spec.md when the skill was published
schema/discovery.json, schema/problem.jsonThe JSON Schemas, for the API’s own tests

The skill tells the agent that the copy of spec.md is the reference offline, and that with network access the published one is the latest.

Examples

Things to ask, and what happens.

You askSkillWhat the agent does
“Make this Express API follow Restep.”restep-designLists resources and methods, proposes core plus the profiles the API already needs, reads their sections, adds the discovery document and problem+json errors, and runs restep-check until it passes
“Add filtering and pagination to /orders.”restep-designAdds query: declares filters, sort keys and max_limit in discovery, signed cursors, invalid_parameter for a limit out of range
“Two people editing the same invoice overwrite each other.”restep-designAdds writes: strong ETags, If-Match checked atomically, 412 precondition_failed
“Review this pull request against Restep.”restep-reviewReads what the API announces and checks only the touched endpoints against those sections
“We renamed total_price to total. Is that fine?”restep-reviewFlags a breaking change under 5.5: a renamed field has to be retired first, through deprecations, or wait for a new major version
“Does openapi.yaml follow Restep?”restep-reviewReviews the document as if it were the API, and lists what only a running server can show

A finding from restep-review has this shape (an illustration, not a real report):

6.4 MUST · GET /orders · src/routes/orders.js:42
  Does:     limit=500 is clamped to 100 and answered with 200.
  Requires: a limit outside 1..max_limit gives 400 invalid_parameter, never a silent clamp.

For any other agent

The specification is one file: /1/spec.md (and in Spanish). /llms.txt lists everything here for a model to find. A line in your AGENTS.md is enough to start:

This API follows Restep 1 (https://restep.wubytes.com/1/spec.md): read the sections of the
profiles it announces before changing an endpoint, and run restep-check before finishing.

Limits

  • They are in English, like the spec.md they carry. The agent can still answer you in your language.
  • The specification is long (about 100 KB): reading the sections a change needs takes a good part of a small model’s context.
  • restep-check covers core, query, writes, cache and relations, subcollections and the actions, oauth and inherit extensions. For sync and the other extensions, the agent has only the text of the specification to go on.
  • A skill steers the agent; it does not bind it. Read what it changed, and keep restep-check in CI.

All the tools