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.| Operation | Where | Why |
|---|---|---|
| Init, serve, validate, exec, mock | Terminal | Fast, composable, no LLM needed |
| Scan routes and create specs | /rqb | Needs to read source types and infer realistic field values |
| Enrich expected responses and tests | /rqb enrich | Needs to understand field semantics, volatile vs stable values, domain edge cases |
| Build a workflow pipeline | /rqb flow | Needs to reason about data dependencies between steps |
| Debug a failing endpoint or flow | /rqb-debug | Multi-step diagnosis with contextual interpretation |
| Execute a spec (structured result) | rqb_exec MCP | Returns compact JSON — pass verbose: true for full payloads |
| Diagnose a failed endpoint | rqb_diagnose MCP | Returns likely cause, next action, inspect targets, and verify commands before broad source reading |
| Dry-run (resolve vars, don’t send) | rqb_exec + dry_run: true | Catches missing variables before hitting the network |
| Check variable readiness | rqb_vars MCP | Shows what’s resolved and what’s missing before exec |
| Search specs by method/tag/path | rqb_search MCP | Compact index — no file reading required |
| Build surgical API context | rqb_context MCP | Gives 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 MCP | Returns per-step state for programmatic debugging |
| Author a spec (with write guard) | rqb_author MCP | Validates before writing, refuses silent overwrites |
| Check execution trend | rqb_history MCP | Stable/improving/regressing over recent runs |
| Set session defaults | rqb_session MCP | Set env + vars once; all exec/flow calls inherit |
| Run multiple specs | rqb_exec_batch MCP | Summary 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.
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:| Command | What it does |
|---|---|
/rqb | Creates specs, enriches expected responses, and builds/runs pipelines — routes based on your argument |
/rqb-debug | Diagnoses 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:| Tool | When to use |
|---|---|
rqb_exec | Execute a spec and get a structured result with diff |
rqb_diagnose | Diagnose a failed endpoint with likely cause, next action, inspect targets, and verify commands |
rqb_flow | Run a pipeline and get per-step state |
rqb_author | Write a spec with validation guard and overwrite protection |
rqb_vars | Check variable resolution before exec |
rqb_search | Find specs by method, path, or tag |
rqb_context | Build surgical or schema API context for a target, flow, or changed specs |
rqb_history | Check execution trend over recent runs |
rqb_session | Set env and vars once for all subsequent calls |
rqb_exec_batch | Run multiple specs and get a summary table |
_shared/env.md, .env.local, RQB_* / MAD_*, session vars, then explicit tool vars.
Recommended Claude Code setup
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)
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
| Agent | Skills | Slash commands | MCP |
|---|---|---|---|
| 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.