diagnostic-reasoning
What it does
This skill is a step-by-step method for understanding a reported bug before anyone tries to fix it. It is for people who want reliable bug fixes rather than guesses.
When to use it
- ✓When someone reports a bug and nobody can say exactly what triggers it.
- ✓When a diagnostic report suggests a cause that you want checked before acting.
- ✓When a bug appears only sometimes and you want to know why.
Skill link
https://github.com/kunchenguid/firstmate/blob/main/.agents/skills/diagnostic-reasoning/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Users say the checkout page breaks sometimes. Help me figure out what actually triggers it before we change anything.”
5 new skills a week. 1 minute to read.
How it works
The agent first reproduces the problem the way a real user would. It then separates three things: what starts the problem, what hides or exposes it, and what the user actually sees.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
diagnostic-reasoning
Use this procedure before scoping a reported bug and before acting on a diagnostic report. This skill is the single owner of Firstmate's bug-diagnosis reasoning procedure. Firstmate applies it when briefing delegated investigation and evaluating the resulting evidence, without taking over project-specific investigation itself.
Establish the observed behavior
Start from the end user's experience rather than an internal error string or an implementation hypothesis. Require an end-to-end reproduction aligned with the real user path whenever it is feasible and safe. If a faithful reproduction is not feasible, record the exact limitation and use the closest representative path without presenting it as equivalent evidence. Capture the expected behavior, observed behavior, setup, inputs, and repeatability before assigning a cause.
Separate these three facts explicitly:
- The initiating trigger is the event, input, or transition that starts the faulty behavior.
- The masking condition is the independent state, environment, timing, cache, configuration, or path difference that hides or exposes the fault.
- The visible symptom is what the end user or operator can actually observe.
Do not collapse those facts into one label. A masking condition may explain why a fault appears only sometimes without being the initiating cause, and the visible symptom may be several layers downstream from both.
Test the causal explanation
Inspect the failing path and a proven path where the intended behavior is known to work. Compare their inputs, state transitions, dependencies, timing, and control flow to find the earliest meaningful divergence. Inspect relevant history, including blame, commits, migrations, and prior implementations, when it can explain why the paths diverged or which invariant was intended. Do not treat the most recent nearby change as causal without evidence.
Identify the smallest counterfactual that should change the outcome if the leading explanation is true. Change one condition at a time where practical, and record whether the symptom appears, disappears, or remains unchanged. Seek disconfirming evidence deliberately: name what observation would falsify the leading explanation, run that check when feasible, and retain contradictory results instead of explaining them away. Compare the final explanation against the proven path and show why the proposed causal boundary accounts for both the failure and the success.
Scope and act on the result
A diagnosis brief should ask for the reproduction, trigger/mask/symptom separation, divergent and proven path comparison, relevant history, smallest counterfactual, and disconfirming evidence in the report. A diagnostic report should distinguish observed facts from hypotheses and state any unresolved uncertainty that could change the recommended scope. Before acting on the report, verify that its claimed cause explains the end-user reproduction and the proven path without relying on an untested masking condition. If a load-bearing element is missing, route a focused follow-up investigation instead of treating confidence or implementation detail as proof. A diagnosis or implementation-ready recommendation is evidence, not authorization to change code. Implementation still requires the captain's request or another existing lifecycle authority, and the reproduction should become the regression test when a fix is authorized.
FAQ
Why not fix the first error message?
An error message may not be the real cause, so the skill starts from what the user experiences.
What if I cannot reproduce the bug?
The agent records the limit and uses the closest safe test, without claiming it is the same as the real case.
Does it work for any kind of bug?
It is written as a general method, so it can be used for many kinds of reported problems.
Details
Original description by the author
Load before scoping a reported bug and before acting on a diagnostic report.
repo: kunchenguid/firstmate
Popularity
- GitHub stars
- 8.5k
- Ranking position
- #12433
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
afk
8.5kLets your agent keep working while you are away, holding decisions for your return and sending you a clear brief when you come back.
ahoy
8.5kLets your agent give you a short recap of what happened in the session and walk you through any decisions still waiting on you.
ask-user-authority
8.5kHelps your agent decide review questions on its own when they clearly fit the agreed plan, and ask you only when a question is unclear or risky.
away-quiet-supervision
8.5kSets safety rules for supervising work in away or quiet mode, so the agent keeps messages clear and holds decisions that need you.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.