Skip to content
Skillpedia
General coding8.5k · #12433

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.md

Copy 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

Use this skill to help me: https://github.com/kunchenguid/firstmate/blob/main/.agents/skills/diagnostic-reasoning/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

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

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills