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.
git clone --depth 1 https://github.com/rmolines/fractal-loopWrote 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/rmolines/fractal-loop/doctor)<a href="https://agentmods.dev/commands/rmolines/fractal-loop/doctor"><img src="https://agentmods.dev/badge/commands/rmolines/fractal-loop/doctor/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/rmolines/fractal-loop/doctor"><img src="https://agentmods.dev/badge/commands/rmolines/fractal-loop/doctor.svg" alt="Reviewed on agentmods" width="80" 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.00012 | $0.01225 |
| Opus 5.5 | $0.00005 | $0.00490 |
| Sonnet 5.5 | $0.00002 | $0.00245 |
| Haiku 4.5 | $0.00001 | $0.00122 |
Grade A, and why
doctor 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 1mo 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 — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/fractal:doctor
Human gates
Every time this skill needs human input (confirmation, choice, correction), use the AskUserQuestion tool instead of printing the question as text output.
Input: $ARGUMENTS — pass --fix to enable interactive cleanup mode.
Mode
- Default: read-only validation. Reports issues, changes nothing.
--fix: interactive cleanup. Asks for confirmation via AskUserQuestion before each fix.
On entry
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
FRACTAL_DIR="$REPO_ROOT/.fractal"
If .fractal/ does not exist → "Nenhuma árvore encontrada. Execute /fractal:init." STOP.
Checks — execute in order
Check 1: Tree presence
Count top-level dirs with root.md inside .fractal/.
- 0 trees →
[FAIL] Nenhuma árvore encontrada. - 1 tree →
[PASS] Uma árvore: <name> - N > 1 →
[INFO] Múltiplas árvores: <list>.Validate each tree independently.--fix: offer to archive trees where root status issatisfied.
Check 2: root.md integrity
Read .fractal/<tree>/root.md. Validate frontmatter:
predicateexists and is non-emptystatusis a valid value (pending | satisfied | pruned)active_nodeexistscreatedexists
Each missing/invalid field: [FAIL] root.md: campo '<field>' ausente ou invalido.
--fixfor active_node: reset to.--fixfor status: set topending
Check 3: active_node pointer
If active_node != .:
- Check that
.fractal/<tree>/<active_node>/directory exists - Check that
.fractal/<tree>/<active_node>/predicate.mdexists
If broken: [FAIL] active_node aponta para diretorio inexistente: <path>
--fix: resetactive_nodeto.in root.md
Check 4: predicate.md files
For every directory inside the tree (recursive), check:
predicate.mdexists (dirs without it are orphans)- Frontmatter has
predicate(non-empty) statusis valid (pending | satisfied | pruned)createdexists
Orphan dirs: [WARN] Diretorio orfao (sem predicate.md): <path>
--fix: ask to remove
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.
- 1mo ago First seen · 142 lines · 12 tokens per session scan A 7d6cfd08e2cb
doctor is a command published in the GitHub repository rmolines/fractal-loop (14 stars, last pushed 7mo ago), licensed MIT. It adds 12 tokens to every session and 1,225 once invoked, about $0.0000 per session on Opus 5.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-31.
Other commands, from other repositories
refactor-clean
Refactor provided code for cleanliness, maintainability, and alignment with SOLID principles and modern best practices — no over-engineering.
error-analysis
Analyze errors and incidents to find root causes and fixes.
doctor
Diagnose a broken llm-router setup.
verify-upgrade
Verify Spring Boot project upgrade readiness with parallel multi-skill analysis.
relationships
Explore dependencies and relationships for a file or code pattern.
audit
Audit closed tickets for regressions against today's code (unchanged, evolved, implemented wrong, not implemented), plus duplicate and groupable open ones.