Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/idoforgod/Dissertation-Simulator-AgenticWorkflownpx agentmods add commands/idoforgod/dissertation-simulator-agenticworkflow/predict-failuresWrote 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/idoforgod/dissertation-simulator-agenticworkflow/predict-failures)<a href="https://agentmods.dev/commands/idoforgod/dissertation-simulator-agenticworkflow/predict-failures"><img src="https://agentmods.dev/badge/commands/idoforgod/dissertation-simulator-agenticworkflow/predict-failures/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/idoforgod/dissertation-simulator-agenticworkflow/predict-failures"><img src="https://agentmods.dev/badge/commands/idoforgod/dissertation-simulator-agenticworkflow/predict-failures.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.00019 | $0.01515 |
| Opus 5.5 | $0.00008 | $0.00606 |
| Sonnet 5.5 | $0.00004 | $0.00303 |
| Haiku 4.5 | $0.00002 | $0.00152 |
Grade A, and why
predict-failures 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 2mo 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 — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/predict-failures — Predictive Failure Analysis
Performs a full codebase scan and predicts production failure areas using cross-domain patterns from other systems. Uses a P1-sandwich architecture to prevent hallucinations:
P1 Scan (grounding) → @failure-predictor (LLM) → P1 Validation → @failure-critic (LLM) → P1 Synthesis
Results persist in failure-predictions/ and are surfaced at every session start via RLM.
Orchestration (main context executes — do NOT delegate to sub-agent)
Announce to user: "Starting Predictive Failure Analysis — full scan. This involves two LLM agents and P1 validation steps."
Phase A: Code Structure Scan (P1 — establishes ground truth)
Run:
python .claude/hooks/scripts/scan_code_structure.py \
--project-dir <ACTUAL_PROJECT_DIR> \
--output .claude/context-snapshots/fp-code-map.json
Report to user:
- How many files were scanned
- Which F-categories have matches
- Any files with Critical-severity signals
If Phase A fails: Report the error to the user and STOP. Do not proceed without ground truth.
Phase B-1: Failure Prediction (@failure-predictor)
Invoke @failure-predictor via Agent tool:
subagent_type: failure-predictor
prompt: |
Read the code structure map at:
<ACTUAL_PROJECT_DIR>/.claude/context-snapshots/fp-code-map.json
Analyze the ENTIRE codebase for production failure risks using the F1-F7 taxonomy.
Apply cross-domain patterns from other production systems.
IMPORTANT:
- Only cite files and line numbers from the code map
- Output a JSON block with your predictions
- Minimum 3 predictions required
Save the agent's full text response to .claude/context-snapshots/fp-predictor-response.txt using the Write tool (preserves raw response for debugging).
Extract JSON deterministically (P1 — prevents hallucination at LLM→P1 handoff):
python .claude/hooks/scripts/extract_json_block.py \
--input .claude/context-snapshots/fp-predictor-response.txt \
--output .claude/context-snapshots/fp-draft.json
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.
- 2mo ago First seen · 164 lines · 19 tokens per session scan A aff33d18b66f
predict-failures is a command published in the GitHub repository idoforgod/Dissertation-Simulator-AgenticWorkflow (108 stars, last pushed 5mo ago), licensed MIT. It adds 19 tokens to every session and 1,515 once invoked, about $0.0001 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-09-03.
predict-failures compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| predict-failuresidoforgod/Dissertation-Simulator-AgenticWorkflow | Command | 108 | 5mo ago | MIT | A | 19 | Claude Code |
| qa-changesOpenHands/extensions | Command | 176 | yesterday | MIT | A | 63 | Claude Code |
| react-nativegetsentry/toolkit | Command | 957 | yesterday | none | A | 0 | Claude Code |
| auditar-cascadingluanpdd/kit-mcp | Command | 5 | 4d ago | MIT | A | 54 | Claude Code |
| http-serviceMadAppGang/magus | Command | 14 | yesterday | MIT | A | 27 | Claude Code |
| doctordoncheli/don-cheli-sdd | Command | 59 | 2mo ago | Apache-2.0 | A | 76 | Claude Code |
| doctorfatihkan/badi | Command | 7 | 1mo ago | MIT | A | 0 | Claude Code |