Skip to main content

Reqbook makes agents API-capable.

Agents are great at writing code but struggle with API work — they can’t reliably run requests from inside the session, produce API specs that stay in sync with the code, or review results in a structured way. Reqbook gives agents the building blocks they need: markdown files they can read and write, tools that return structured results, and playbooks that know when to call the CLI and when to use LLM reasoning.

Skills

A single markdown playbook that teaches agents the spec format, file layout, and decision trees — installed to the directory each agent reads from automatically.

Slash commands

Two /rqb commands for the complex, LLM-native tasks: spec creation and enrichment, flow building, and debugging.

MCP server

Ten structured tools for MCP-compatible agents — exec, diagnose, flow, author, vars, search, context, history, session, and exec_batch. Surgical context by default.

Shared source

Every agent change is a markdown file in api-docs/. Reviewable, diffable, committable. No hidden state.

The division of labor

The key design decision: not every operation needs an agent. Simple, deterministic operations belong in the terminal. Agents add value when a task requires reasoning about your codebase, your domain model, or the relationships between data.
OperationWhereWhy
Init, serve, validate, exec, mockTerminalFast, composable, no LLM needed
Scan routes and create specs/rqbNeeds to read source types and infer realistic field values
Enrich expected responses and tests/rqb enrichNeeds to understand field semantics, volatile vs stable values, domain edge cases
Build a workflow pipeline/rqb flowNeeds to reason about data dependencies between steps
Debug a failing endpoint or flow/rqb-debugMulti-step diagnosis with contextual interpretation
Execute a spec (structured result)rqb_exec MCPReturns compact JSON — pass verbose: true for full payloads
Diagnose a failed endpointrqb_diagnose MCPReturns likely cause, next action, inspect targets, and verify commands before broad source reading
Dry-run (resolve vars, don’t send)rqb_exec + dry_run: trueCatches missing variables before hitting the network
Check variable readinessrqb_vars MCPShows what’s resolved and what’s missing before exec
Search specs by method/tag/pathrqb_search MCPCompact index — no file reading required
Build surgical API contextrqb_context MCPGives the agent method/path, bounded body fields, response fields, error cases, assertions, and verify commands instead of many source files
Run a pipeline (structured result)rqb_flow MCPReturns per-step state for programmatic debugging
Author a spec (with write guard)rqb_author MCPValidates before writing, refuses silent overwrites
Check execution trendrqb_history MCPStable/improving/regressing over recent runs
Set session defaultsrqb_session MCPSet env + vars once; all exec/flow calls inherit
Run multiple specsrqb_exec_batch MCPSummary table — not N full JSON objects

Skills — all agents

Skills are the “always-on” layer: installed to each agent’s config directory, they activate automatically when API-related topics come up in the conversation. No explicit command needed. One skill covers the full workflow:
  • rqb — Project layout, endpoint spec format, Assertions operators, pipeline capture patterns, MCP tool reference, and routing rules for when to use each slash command.
Installed via rqb skills install to agent-specific locations (.claude/skills/, .cursor/rules/, .github/instructions/, etc.).

Slash commands — Claude Code and Codex CLI

Two commands covering the tasks where LLM reasoning produces better results than a fixed script:
CommandWhat it does
/rqbCreates specs, enriches expected responses, and builds/runs pipelines — routes based on your argument
/rqb-debugDiagnoses failing endpoints and pipelines with contextual interpretation of each error

MCP server — MCP-compatible agents

Ten tools that return structured JSON or surgical context for the agent to act on programmatically:
ToolWhen to use
rqb_execExecute a spec and get a structured result with diff
rqb_diagnoseDiagnose a failed endpoint with likely cause, next action, inspect targets, and verify commands
rqb_flowRun a pipeline and get per-step state
rqb_authorWrite a spec with validation guard and overwrite protection
rqb_varsCheck variable resolution before exec
rqb_searchFind specs by method, path, or tag
rqb_contextBuild surgical or schema API context for a target, flow, or changed specs
rqb_historyCheck execution trend over recent runs
rqb_sessionSet env and vars once for all subsequent calls
rqb_exec_batchRun multiple specs and get a summary table
Spec and pipeline tools resolve variables the same way as the CLI: _shared/env.md, .env.local, RQB_* / MAD_*, session vars, then explicit tool vars.
1

Install skill and slash commands

rqb skills install --agent=claude-code
2

Register MCP

rqb install mcp --agent=claude-code
3

Open the web preview

rqb serve
Keep the preview open while the agent edits specs — review and run changed files immediately in the browser.
With all three active:
  • The agent knows Reqbook conventions and makes good decisions without prompting (skill)
  • You can trigger complex workflows precisely without writing long prompts (slash commands)
  • The agent gets structured results without parsing terminal output (MCP)
For implement, review, or debug runs, ask the agent to call rqb_context first with mode: "surgical", brief: true, max_fields: 12, include: "variables,request,response,errors,rules,verify", and an explicit intent such as "implement" or "debug". Use max_fields: 6 only for a known narrow lookup. If rqb_exec fails, call rqb_diagnose before reading backend source. This keeps the loop focused on the bounded contract, literal error codes, compact business rules, likely cause, inspect targets, and verify commands.

Supported agents

AgentSkillsSlash commandsMCP
Claude Code✓ (2 commands)
Codex CLI✓ (2 commands)
Cursor
GitHub Copilot
Antigravity
OpenCode
Windsurf

Next steps

Set up agent support

Install the skill, slash commands, and MCP in one command.

Slash commands reference

Full details on /rqb and /rqb-debug.

MCP server reference

All 9 tools with input/output schemas and examples.