Repository navigation
Document the agent skill and the script_path guarantee #153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| --- | ||
| title: Coding agents | ||
| description: Let Claude Code, Codex, Cursor, OpenCode and other agents drive the CLI through the agent skill. | ||
| --- | ||
|
|
||
| Reverse API Engineer ships an [agent skill](https://github.com/kalil0321/reverse-api-engineer/tree/main/skills/reverse-api-engineer) | ||
| that tells coding agents how to drive the CLI. Install it in your project: | ||
|
|
||
| ```bash | ||
| npx skills add kalil0321/reverse-api-engineer | ||
| ``` | ||
|
|
||
| Then ask your agent for what you need, for example "get me a typed client for | ||
| the job search on this careers page". The skill only supplies instructions: the | ||
| agent still runs `reverse-api-engineer`, so the CLI must be installed (see | ||
| [Installation](/docs/installation)). | ||
|
|
||
| ## What the agent does | ||
|
|
||
| 1. **Checks the install** with `reverse-api-engineer --version`. | ||
| 2. **Reuses an earlier capture** when `list` and `show --json` find one with a | ||
| client, instead of browsing again. | ||
| 3. **Runs a preflight** with `agent --dry-run --json`, including the Chrome | ||
| auto-connect check for `chrome-mcp`. | ||
| 4. **Captures in the background** with `agent --json-stream`, then waits for | ||
| the final `result` event. | ||
| 5. **Verifies the client** by running it before handing it over. | ||
| 6. **Iterates on the same capture** with `engineer <run_id>` when the run kept | ||
| a HAR (`auto`, `agent-browser` and manual runs). | ||
| 7. **Hands it over** by copying the client into your project and summarizing | ||
| what it wraps, how it authenticates and what it did not test. | ||
|
|
||
| ## Your Chrome or a separate browser | ||
|
|
||
| For public data the skill adds `--headless`, so your own Chrome is never | ||
| touched. When a site needs your login, it uses `chrome-mcp` in your Chrome: | ||
| tell the agent it may, keep Chrome open with auto-connect enabled at | ||
| `chrome://inspect/#remote-debugging`, and accept the connection prompt Chrome | ||
| shows when the run starts. If nobody accepts it, the run times out without a | ||
| client. | ||
|
|
||
| See [Scripted usage](/docs/cli/scripted-usage) for the JSON contract the skill | ||
| relies on. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "title": "CLI reference", | ||
| "pages": ["commands", "scripted-usage"] | ||
| "pages": ["commands", "scripted-usage", "coding-agents"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,8 @@ description: Drive the CLI from another agent or a wrapper script with --no-inte | |
| The CLI can be driven by another agent, a CI job, or a wrapper script. Use | ||
| `agent --json` or `engineer --json` for a single machine-readable result, | ||
| `list --json` and `show --json` for history inspection, and `run --json` to | ||
| execute generated scripts without contaminating stdout. | ||
| execute generated scripts without contaminating stdout. For coding agents, the | ||
| [agent skill](/docs/cli/coding-agents) wraps this contract. | ||
|
|
||
| When `--json` is set: | ||
|
|
||
|
|
@@ -105,7 +106,7 @@ reverse-api-engineer run <run_id> --file api_client.py \ | |
| | `url` | `string \| null` | Optional starting URL. | | ||
| | `mode` | `string \| null` | Provider (`"auto"`, `"chrome-mcp"`, `"agent-browser"`). | | ||
| | `har_path` | `string \| null` | Absolute path to the captured HAR (`recording.har`). | | ||
| | `script_path` | `string \| null` | Absolute path to the generated client when reverse engineering ran. | | ||
| | `script_path` | `string \| null` | Absolute path to the generated client. It exists whenever `status` is `"ok"`; a run that ends without writing it reports `engine_failure`. | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The guarantee also covers Artifacts
Prompt To Fix With AIThis is a comment left during a code review.
Path: website/content/docs/cli/scripted-usage.mdx
Line: 109
Comment:
**Dry runs generate no client**
The guarantee also covers `agent --dry-run --json`, which returns `status: "ok"` with `script_path: null` when its checks pass. This page documents that command just above the table. Wrapper authors could therefore mistake a successful setup check for proof that a client exists. This is a non-blocking documentation mismatch: limit the guarantee to completed capture or engineering runs, and qualify the matching `README.md` row too.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For Useful? React with 👍 / 👎. |
||
| | `usage` | `object` | Normalized token plus cost usage (`input_tokens`, `output_tokens`, `cache_read_tokens`, `cache_write_tokens`, `total_cost_usd`) plus raw SDK usage under `raw`. | | ||
| | `error` | `string \| null` | Human-readable error message when `status == "error"`. | | ||
| | `error_kind` | `string \| null` | Machine-readable error category such as `misuse`, `network`, or `engine_failure`. | | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2:
agent --jsoncan still returnstatus: "ok"withscript_path: null, so this documents an invariant the CLI does not enforce. Make the null-path case anengine_failurebefore documenting this guarantee, or soften the table entry.Prompt for AI agents