code-review
Delegate code review to the code-reviewer subagent (Sonnet, read-only) and apply approved fixes in the main session
Diagnose a flaky test by running it N times. Delegates to flaky-test-isolator subagent — N runs, signature-grouped failures, stability report. Does NOT fix the test.
> /plugin marketplace add Filip-Podstavec/claude-leverage > /plugin install claude-leverage@filip-podstavec
How it fires
How this command gets triggered: by you, by Claude, or both.
/flaky-testContext preview
What this command does when you run it.
Diagnose a flaky test by running it N times. Delegates to flaky-test-isolator subagent — N runs, signature-grouped failures, stability report. Does NOT fix the test.
description: Diagnose a flaky test by running it N times. Delegates to flaky-test-isolator subagent — N runs, signature-grouped failures, stability report. Does NOT fix the test. allowed-tools: Bash(ls:*), Bash(test:*), Bash(pwd:*) argument-hint: "<test-path-or-name> [--runs N=10] [--timeout SECONDS=60]"
CWD: !`pwd` Has package.json: !`test -f package.json && echo "yes" || echo "no"` Has pyproject.toml: !`test -f pyproject.toml && echo "yes" || echo "no"` Has pytest.ini: !`test -f pytest.ini && echo "yes" || echo "no"` Has setup.cfg: !`test -f setup.cfg && echo "yes" || echo "no"` Has go.mod: !`test -f go.mod && echo "yes" || echo "no"` Has Cargo.toml: !`test -f Cargo.toml && echo "yes" || echo "no"` Has Gemfile: !`test -f Gemfile && echo "yes" || echo "no"`
You are routing a flaky-test diagnosis. Your job is pre-flight validation and delegation. You do NOT run the tests yourself. The `flaky-test-isolator` subagent (Sonnet) owns execution.
| Arg | Default | Hard cap | Why | |-----|---------|----------|-----| | `--runs` | 10 | 50 | 10 runs is usually enough signal; 50 prevents runaway cost on slow suites | | `--timeout` | 60s per run | 300s per run | 5 min per single test is generous; total budget is enforced by the subagent (30 min wall-clock) |
1. **Parse `$ARGUMENTS`:**
2. **Validate the target.** If `$ARGUMENTS` is empty or the first positional looks like a flag, STOP and ask the user for the test target. Do NOT delegate without a target — the subagent would have to guess and waste a delegation.
3. **Apply caps silently.**
4. **Warn on missing framework hint.** If all of the `Has *` lines above are "no", warn the user: "No common test manifest detected in this directory. The subagent will ask if it can't infer the framework." Then still delegate.
5. **Delegate** to the `flaky-test-isolator` subagent with a self-contained prompt that includes:
6. **Relay the subagent's report verbatim.** The structured report IS the deliverable. Do NOT paraphrase, summarize, re-format, or pre-emptively interpret. After relaying, ask the user one question: "Want to attempt a fix, re-run with higher N, or stop here?"
Make any repo AI-first - write sustainable code from the start, or refactor a legacy codebase to prepare it for agent-driven development.Building blocks for Claude Code: subagents, slash commands, hooks, and workflow patterns. Copy what you need. A working developer's stack for Claude Code.
Repo: Filip-Podstavec/claude-leverage
Delegate code review to the code-reviewer subagent (Sonnet, read-only) and apply approved fixes in the main session
Check documentation freshness after code changes. Delegates to docs-updater subagent (Sonnet) to propose doc/changelog updates - main session applies approved…
Gather implementation context before starting a task. Delegates to context-gatherer subagent (Sonnet) to pre-fetch everything Opus needs.
Delegate test execution to the test-runner subagent (Sonnet) and apply approved fixes in the main session