Plugin
Slash commands for driving Claude Code from Claude Code.
Install
# In any Claude Code session:
/plugin marketplace add renatodarrigo/claw-drive
/plugin install claw-drive@claw-drive
The first line registers the marketplace catalog from the GitHub repo; the second installs the plugin from it. Run /reload-plugins after install to activate without restarting.
The plugin is a UX layer. It assumes the claw-drive CLI is on your PATH — see Install.
Slash commands
/claw-drive-init
Idempotently registers claw-drive in the current project's .mcp.json. Run once per project.
/claw-drive-init [--policy <path>]
Verifies the CLI is on PATH (else prints the install one-liner and stops). Adds the "claw-drive" entry under mcpServers, preserving any existing entries. With --policy <path>, also drops the conservative starter policy at the given path (skips if the file already exists).
After init, restart Claude Code (or run /mcp) to see claw-drive in the MCP list.
/claw-drive-start
Spawns Session B and starts the Monitor flow.
/claw-drive-start <cwd> [--brief <file>] [--policy <file>] [--verbose]
<cwd>— absolute or~-relative path to a project. Must exist and not equal the parent session's cwd.--brief <file>— scenario brief. If omitted, the skill asks for one inline.--policy <file>— policy JSON. If omitted, claw-drive uses the conservative starter.--verbose— bypass both the sentinel-token wrapper injection (B never sees the contract) and the watch-side sentinel filter (everyturn_completedsurfaces). Equivalent tostart_session({wrapper: false})+claw-drive watch <id> --no-token-filter. Use this if you orchestrate based on rawturn_completedevents rather than B's[TOKEN]signals.
The skill calls start_session via MCP, sends the brief as the first user turn, and starts the Monitor on the watch_command. By default, Session B receives a system-prompt wrapper teaching a tiny two-token vocabulary: end an attention-needing turn with [NEEDS-INPUT] on its own line when human input is required, or [DONE] when the task is complete. Emit nothing otherwise. Monitor surfaces turn_completed only when one of those two trailing tokens is present; other actionable events (decisions, failures, session stops) always fire.
If no surfaced activity arrives for a stretch — long-running build, B simply stuck — watch emits a synthetic idle event. The default threshold is 600 seconds; tune via claw-drive watch <id> --idle-after SECONDS (or set 0 to disable). The skill passes the watch_command through unchanged, so this default applies out of the box.
See Driving patterns → Sentinel tokens for the full token contract and watch-side flags.
/claw-drive-resolve
Resolves a paused tool call.
/claw-drive-resolve <call_id> <action> [--remember] [--reason <text>] [--stdout <text>] [--exit <n>]
<call_id>— from atool_decision_requirednotification.<action>—approve,reject, ordefer.--remember— append a derived rule to the session's policy. Narrow-by-default for non-Bash tools (matches only the exact arg shape).--reason <text>— recorded in the audit event.--stdout <text>+--exit <n>— for the defer-with-output round-trip. The skill switches fromresolve_tool_calltoprovide_tool_output.
See Driving patterns → Defer round-trip for the full mechanism.
Scope
The plugin is a UX layer. It does NOT:
- Install the CLI binary. Run the curl-pipe install first.
- Auto-register the MCP server in every project. Run
/claw-drive-initper project (idempotent).
Plugin version tracks the CLI version: v0.5.6 plugin works with v0.5.x CLI.