Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ When it finishes, Codex should nudge you toward the right result. If not, `$cc:s
| `$cc:cancel` | Cancel an active background job |
| `$cc:setup` | Verify installation, auth, hooks, and review gate |

Quick routing rule:
- Use `$cc:review` for straightforward correctness review of the current diff.
- Use `$cc:adversarial-review` for riskier config/template/migration/design changes, or whenever you want stronger challenge on assumptions and tradeoffs.
- Use `$cc:rescue` when you want Claude Code to investigate, validate by changing code, or actually fix/implement something.

### `$cc:review`

Standard read-only review of your current work.
Expand Down
6 changes: 5 additions & 1 deletion skills/adversarial-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
---
name: adversarial-review
description: 'Run a design-challenging Claude Code review of local git changes in this repository. Args: --wait, --background, --base <ref>, --scope <auto|working-tree|branch>, --model <model>, [focus text]. Use when the user wants stronger scrutiny, tradeoff analysis, or custom review focus text.'
description: 'Run a design-challenging Claude Code review of local git changes in this repository. Args: --wait, --background, --base <ref>, --scope <auto|working-tree|branch>, --model <model>, [focus text]. Use when the user wants stronger scrutiny, tradeoff analysis, risky-change review, or custom review focus text.'
---

# Claude Code Adversarial Review

Use this skill when the user wants Claude Code to challenge the implementation approach, design choices, assumptions, or tradeoffs in this repository.

Prefer `$cc:adversarial-review` over `$cc:review` when the change touches configuration, infrastructure, templating, rollout mechanics, migrations, safety controls, or "this should remove mismatch/drift" style refactors.
Use it even without extra focus text when the real question is "did this actually eliminate the risk or just move it around?"
If the user wants Claude Code to go beyond review and perform investigation, validation edits, or implementation work, route to `$cc:rescue` instead.

Do not derive the companion path from this skill file or any cache directory. Always run the installed copy:
`node "<installed-plugin-root>/scripts/claude-companion.mjs" adversarial-review ...`

Expand Down
5 changes: 4 additions & 1 deletion skills/rescue/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: rescue
description: 'Delegate a substantial diagnosis, implementation, or follow-up task to Claude Code through the tracked-job runtime. Args: --background, --wait, --resume, --resume-last, --fresh, --write, --model <model>, --effort <low|medium|high|max>, --prompt-file <path>, [task text]. Use for deeper work, not for standard review or quick local questions.'
description: 'Delegate a substantial diagnosis, implementation, or follow-up task to Claude Code through the tracked-job runtime. Args: --background, --wait, --resume, --resume-last, --fresh, --write, --model <model>, --effort <low|medium|high|max>, --prompt-file <path>, [task text]. Use when Claude should investigate or change things, not when the user only wants review findings.'
---

# Claude Code Rescue
Expand All @@ -12,6 +12,9 @@ Foreground rescue responses must be that subagent's output verbatim.

Use this skill when the user wants Claude Code to investigate, implement, or continue substantial work in this repository.

Prefer `$cc:rescue` when the user wants Claude Code to diagnose the issue, validate a risky change by actually editing or testing, apply fixes from a prior review, or carry a task forward across multiple steps.
Do not use rescue for "just review this diff" unless the user also wants follow-through work beyond review findings.

Do not derive the companion path from this skill file or any cache directory. Always run the installed copy:
`node "<installed-plugin-root>/scripts/claude-companion.mjs" task ...`

Expand Down
6 changes: 5 additions & 1 deletion skills/review/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
---
name: review
description: 'Run a standard Claude Code review of local git changes in this repository. Args: --wait, --background, --base <ref>, --scope <auto|working-tree|branch>, --model <model>. Use for normal diff review requests, not staged-only review or custom focus text.'
description: 'Run a standard Claude Code review of local git changes in this repository. Args: --wait, --background, --base <ref>, --scope <auto|working-tree|branch>, --model <model>. Use for straightforward correctness-oriented diff review when the user wants findings only, not custom focus text, adversarial framing, or implementation work.'
---

# Claude Code Review

Use this skill when the user wants Claude Code to review the current working tree or a branch diff in this repository.

Choose `$cc:review` only for straightforward review requests where the user mainly wants correctness findings on the current diff.
If the user wants stronger challenge on design, rollout risk, migration risk, configuration behavior, template mismatch elimination, or any custom focus text, route to `$cc:adversarial-review` instead.
If the user wants Claude Code to investigate, validate by changing code, or actually fix/implement something, route to `$cc:rescue` instead.

Do not derive the companion path from this skill file or any cache directory. Always run the installed copy:
`node "<installed-plugin-root>/scripts/claude-companion.mjs" review ...`

Expand Down
8 changes: 8 additions & 0 deletions tests/skills-contracts.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ test("review skills keep background execution outside the companion command", ()
const installedRootPattern = /<installed-plugin-root>\/scripts\/claude-companion\.mjs/i;

assert.match(review, /Do not derive the companion path from this skill file or any cache directory/i);
assert.match(review, /Choose `\$cc:review` only for straightforward review requests where the user mainly wants correctness findings on the current diff/i);
assert.match(review, /If the user wants stronger challenge on design, rollout risk, migration risk, configuration behavior, template mismatch elimination, or any custom focus text, route to `\$cc:adversarial-review` instead/i);
assert.match(review, /If the user wants Claude Code to investigate, validate by changing code, or actually fix\/implement something, route to `\$cc:rescue` instead/i);
assert.match(review, installedRootPattern);
assert.match(review, /Treat `--wait` and `--background` as Codex-side execution controls only/i);
assert.match(review, /Strip them before calling the companion command/i);
Expand Down Expand Up @@ -60,6 +63,9 @@ test("review skills keep background execution outside the companion command", ()
assert.doesNotMatch(review, /claude-companion\.mjs" review \$ARGUMENTS/i);

assert.match(adversarial, /Do not derive the companion path from this skill file or any cache directory/i);
assert.match(adversarial, /Prefer `\$cc:adversarial-review` over `\$cc:review` when the change touches configuration, infrastructure, templating, rollout mechanics, migrations, safety controls, or "this should remove mismatch\/drift" style refactors/i);
assert.match(adversarial, /Use it even without extra focus text when the real question is "did this actually eliminate the risk or just move it around\?"/i);
assert.match(adversarial, /If the user wants Claude Code to go beyond review and perform investigation, validation edits, or implementation work, route to `\$cc:rescue` instead/i);
assert.match(adversarial, installedRootPattern);
assert.match(adversarial, /Treat `--wait` and `--background` as Codex-side execution controls only/i);
assert.match(adversarial, /Strip them before calling the companion command/i);
Expand Down Expand Up @@ -103,6 +109,8 @@ test("rescue skill keeps --background and --wait as host-side controls only", ()
const installedRootPattern = /<installed-plugin-root>\/scripts\/claude-companion\.mjs/i;

assert.match(rescue, /Do not derive the companion path from this skill file or any cache directory/i);
assert.match(rescue, /Prefer `\$cc:rescue` when the user wants Claude Code to diagnose the issue, validate a risky change by actually editing or testing, apply fixes from a prior review, or carry a task forward across multiple steps/i);
assert.match(rescue, /Do not use rescue for "just review this diff" unless the user also wants follow-through work beyond review findings/i);
assert.match(rescue, installedRootPattern);
assert.match(rescue, /`--background` and `--wait` are Codex-side execution controls only/i);
assert.match(rescue, /Never satisfy background rescue by launching `claude-companion\.mjs task` itself as a detached shell process/i);
Expand Down