diagnose is agent-read markdown (skill) from pedrohcgs/claude-code-my-workflow: Root-cause a failing or wrong empirical result with a disciplined reproduce → minimise → hypothesise → instrument → fix loop, instead of guessing-and-poking. Use when the user says "why is my regression wrong", "this number changed", "my script errors out", "the result won't reproduce", "debug this", "this estimate looks wrong", or "it worked yesterday". Tuned for research code (R/Stata/Python): type coercion, NA/merge blow-ups, factor levels, clustering/SE choices, weighting, collinearity/conve.
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified before it reaches your agent: the main file against the SHA-256 recorded here, the others against the git hashes of its source commit. The deterministic audit below grades the latest version, and the same checks always give the same file the same grade.
What the file says
# /diagnose — Root-Cause a Wrong or Failing Result
Find *why* an analysis errors, returns the wrong number, or won't reconcile — with a structured debugging loop rather than scattershot edits. Adapted from the `diagnose` pattern in [mattpocock/skills](https://github.com/mattpocock/skills), reshaped for empirical research code where the bug is usually a *silent* wrong number, not a crash.
The discipline: **never edit before you can reproduce, and never fix before you can explain.** A guessed fix that makes the symptom disappear without a named root cause is how a wrong number gets *laundered* into a published table.
## When to use
- A regression / estimate returns a value you can't explain, or one that changed when nothing should have.
- A script errors out and the stack trace doesn't point at the real cause.
- A result "won't reproduce" — different number on re-run, on another machine, or after a package update.
- A replication claim fails `/audit-reproducibility` and you need to localize *which* step drifted.
**Diagnose is symptom-driven and single-target: ONE wrong number / ONE failing run.** Use a sibling instead when the job is different:
…
Pin to a label to follow the author's releases, or to a sha256 for exact bytes. Either way the resolved hash is written to mdr.lock, and mdr install fetches those bytes again and checks them, so it installs them exactly or fails.
GET https://markdownregistry.com/api/v1/artifacts/art_n4zlteb5clw4pyqd
GET https://markdownregistry.com/api/v1/resolve?ref=pedrohcgs/claude-code-my-workflow/diagnose
GET https://markdownregistry.com/api/v1/blob/c0a33e097a3c2cd9c1be6ab1f8a08052c74606786f4cd2254770022d2ca41f36
Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
pedrohcgs/claude-code-my-workflow · .claude/skills/adjudicate-review/SKILL.md · Turn an incoming set of findings — from an AI reviewer, a referee report, a code review, a linter, or a second model —…
pedrohcgs/claude-code-my-workflow · .claude/skills/audit-reproducibility/SKILL.md · Enforce the replication-protocol.md rule by cross-checking numeric claims in a manuscript against the actual R / Stata…
pedrohcgs/claude-code-my-workflow · .claude/skills/blast-radius/SKILL.md · Before and after changing anything shared — a function's return value, a signature, a schema, a label set, a config…
pedrohcgs/claude-code-my-workflow · .claude/skills/capture-environment/SKILL.md · Snapshot the computational environment for a replication package — detects the analysis stack (R / Stata / Python) and…
pedrohcgs/claude-code-my-workflow · .claude/skills/challenge/SKILL.md · Stress-test a finding against the choices you did not make. Enumerates the discrete forks a competent analyst could…
pedrohcgs/claude-code-my-workflow · .claude/skills/checkpoint/SKILL.md · Save a structured state snapshot before stopping or handing off. Captures the active plan, recent decisions, file…
pedrohcgs/claude-code-my-workflow · .claude/skills/coauthor-brief/SKILL.md · Generate a co-author / collaborator handoff brief for a multi-author, multi-machine project — summarizing what changed…
pedrohcgs/claude-code-my-workflow · .claude/skills/commit/SKILL.md · Stage, commit, push, open a PR, and merge to main. Use ONLY on explicit commit intent — user says "commit", "ship it"…
pedrohcgs/claude-code-my-workflow · .claude/skills/compile-latex/SKILL.md · Compile a Beamer LaTeX slide deck with XeLaTeX (3 passes + bibtex). Use when user says "compile", "build the slides"…
pedrohcgs/claude-code-my-workflow · .claude/skills/compress-session/SKILL.md · Distill the current conversation into a structured note (decisions made, open questions, file pointers with line…
pedrohcgs/claude-code-my-workflow · .claude/skills/context-status/SKILL.md · Show current context status and session health.
Use to check how much context has been used, whether auto-compact…
pedrohcgs/claude-code-my-workflow · .claude/skills/create-lecture/SKILL.md · Create a new Beamer lecture `.tex` from source papers and materials, with notation consistency checks and the project's…
github/awesome-copilot · skills/diagnose/SKILL.md · Perform a systematic diagnostic scan of an AI workflow across 5 quality dimensions — prompt quality, context…
terrylica/cc-skills · plugins/floating-clock/skills/diagnose/SKILL.md · Print a compact health report for FloatingClock. Covers binary info, code-sign status, running process, and test-suite…
mycelium-hq/ai-brain-starter · skills/diagnose/SKILL.md · Use when an AI Brain vault needs a health check or something feels off: Claude ignores CLAUDE.md, journal entries…
toongri/oh-my-toong-playground · skills/diagnose/SKILL.md · Use when asked to analyze architecture, debug issues, identify root cause, or provide technical recommendations…