Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add pitimon/8-habit-ai-dev/plugin install 8-habit-ai-devWrote 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/skills/pitimon/8-habit-ai-dev/diagnose)<a href="https://agentmods.dev/skills/pitimon/8-habit-ai-dev/diagnose"><img src="https://agentmods.dev/badge/skills/pitimon/8-habit-ai-dev/diagnose.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.00172 | $0.02682 |
| Opus 5 | $0.00086 | $0.01341 |
| Sonnet 5 | $0.00034 | $0.00536 |
| Haiku 4.5 | $0.00017 | $0.00268 |
Grade C, and why
diagnose scanned grade C with 2 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 8d 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.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- The structured-output handoff block was removed in v2.21.39 (#375): it had no consumer (/post-mortem takes the diagnosis as prose; /cross-verify never globs a diagnose artifact), rendered as verbatim noise in Codex, Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- HTTP probe: `curl -sf https://endpoint | jq .field` returning known-bad output How it starts
The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/diagnose — Active Bug Investigation (6 Phases)
Habits: H1 (Be Proactive — prevent recurrence, not just patch the symptom) + H5 (Seek First to Understand — reproduce before fix)
When to Use
- A bug is reported and the root cause is not obvious
- A performance regression appeared; you need to localize what changed
- Tests passed locally but failed in CI, or vice versa
- A feature works for some inputs and fails for others — you need to find the boundary
- A previous fix didn't hold; the bug returned in a different form
This skill enforces the discipline build a fast feedback loop before you guess. Documented friction: a lesson in ~/.claude/lessons/2026-04-12-compression-worker-420-investigation.md notes that a 30-minute log-analysis session could have been a 5-minute SQL-comparison session if Phase 1 had been done first.
When to Skip
- Single-line bug with obvious root cause (typo, wrong constant, off-by-one in plain sight)
- Lint/format errors with a clear fix
- Rename refactors and dependency bumps with passing CI
- Stack trace points to a single line that you can read and immediately understand
For these, fix directly and run tests. Save the 6 phases for hard bugs.
Predecessor /research Brief (Optional Input)
If you ran /research before this — or have a saved brief from a prior session — paste its path now. Standard locations:
~/.claude/plans/*.md(Deep-mode briefs)docs/specs/<slug>/research.md(persisted briefs)
If no prior brief exists, this skill proceeds without it. The skill never auto-globs your filesystem; user agency drives context loading.
If the repo has CONTEXT.md, CONTEXT-MAP.md, DOMAIN.md, docs/agents/domain.md, or relevant ADRs, read them before naming hypotheses. Why: a bug hypothesis phrased in the wrong domain language anchors on the wrong seam and makes the repro look more general than it is.
The 6 Phases
Phase 1 — Build the Feedback Loop
Construct a fast, deterministic pass/fail signal. This is the critical phase — every other phase depends on it. Treat the loop as a product: optimize for speed, signal clarity, and determinism.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 8d ago First seen · 178 lines · 172 tokens per session scan C 43e2c86e3ddd
diagnose is a skill published in the GitHub repository pitimon/8-habit-ai-dev (3 stars, last pushed 1mo ago), licensed MIT. It adds 172 tokens to every session and 2,682 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it C with 2 findings (hidden instructions, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
diagnose-hard-bug
Hard-bug diagnosis: tight loop, ranked hypotheses.
diagnosing-bugs
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.
root-cause
Find the mechanism behind a failure instead of patching its symptom - reproduce first, one variable per experiment with the prediction written before the run, exit by naming the mechanism and pinning it with a failing test. Use for a bug, an unexplained red test, or a failure that will not reproduce.
joycraft-bugfix
Structured bug fix workflow — triage, diagnose, discuss with user, write a focused spec, hand off for implementation.
joycraft-add-fact
Invoked by session-end or the human after a fact surfaces — route it to the correct context document (production map, dangerous assumptions, decision log, institutional knowledge, troubleshooting).
stress-test
Use when a design, plan, or decision needs adversarial scrutiny before proceeding. Interrogates every branch of the decision tree, providing recommended answers and forcing explicit agreement or pushback. Triggers on "grill me", "stress test this", "poke holes", "challenge this design", or when…