Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/filip-podstavec/claude-leverage/flaky-testgit clone --depth 1 https://github.com/Filip-Podstavec/claude-leverageWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/filip-podstavec/claude-leverage/flaky-test)<a href="https://agentmods.dev/commands/filip-podstavec/claude-leverage/flaky-test"><img src="https://agentmods.dev/badge/commands/filip-podstavec/claude-leverage/flaky-test.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00039 | $0.01036 |
| Opus 5 | $0.00019 | $0.00518 |
| Sonnet 5 | $0.00008 | $0.00207 |
| Haiku 4.5 | $0.00004 | $0.00104 |
Grade A, and why
flaky-test scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Project framework hints (computed before delegation)
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"
Your role
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.
Defaults and caps
| 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) |
Pre-flight workflow
-
Parse
$ARGUMENTS:- First positional argument: the test target (file path, test name, or framework-specific pattern).
--runs N: optional, integer.--timeout SECONDS: optional, integer.
-
Validate the target. If
$ARGUMENTSis 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. -
Apply caps silently.
- If
--runs> 50, set to 50 and tell the user: "Capped --runs to 50." - If
--timeout> 300, set to 300 and tell the user: "Capped --timeout to 300 seconds per run." - If
--runs< 1 or--timeout< 1, reject and ask the user for a valid value.
- If
-
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.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 65 lines · 39 tokens per session scan A 3132c3631353
flaky-test is a command published in the GitHub repository Filip-Podstavec/claude-leverage (68 stars, last pushed 1mo ago), licensed MIT. It adds 39 tokens to every session and 1,036 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
octo-loop
Your first output line MUST be: 🐙 Octopus Loop Mode.
octo-debug
Systematic debugging with methodical problem investigation.
doctor
Check OCR installation and verify all dependencies are available.
bugfix
TDD-driven bugfix workflow: tester writes failing test (RED) → developer fixes (GREEN) → developer refactors (REFACTOR) → reviewer validates. Accepts issue number, description, or both. Auto-creates PR unless --no-pr flag is passed.
trace-claude-code
Control Opik tracing for your Claude Code sessions.
fec-tdd
Use front-end TDD workflow to implement functions, fix bugs, or refactor logic: first write failing tests, then implement minimal code, and then refactor.