Use when user reports an error, bug, or something not working. Search-first troubleshooting with diagnostic phase. Triggers: debug, error, broken, not working, failing, crash, exception.
80%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./skills/software-engineering/troubleshoot/SKILL.mdSearch-first diagnostic workflow. Human executes commands.
CRITICAL: After EVERY AskUserQuestion call, check if answers are empty/blank. Known harness bug: outside Plan Mode, AskUserQuestion silently returns empty answers without showing UI.
If answers are empty: DO NOT proceed with assumptions. Instead:
0.Load → 1.Search → 2.Qualify → 3.Diagnose → 4.Investigate → 5.Persist → 6.LearnIf a project-level learnings file exists (e.g., learnings.yaml in the project root or a known location), read it and apply known patterns before searching.
80% of bugs solved online.
[error] [stack] [framework] on SO, GitHub, Docs, Reddit"Type 'string | undefined' is not assignable to type 'string'" typescriptAskUserQuestion:
See references/protocols/diagnose.md for details.
git bisect start
git bisect bad HEAD
git bisect good <last-known-good-sha>Pattern matches → suggest fix, skip OODA
Only if diagnosis inconclusive.
Exit when root cause confirmed and fix verified.
MUST execute after root cause confirmed and fix verified. DO NOT skip. DO NOT wait for user to ask.
If a persistent thinking store is configured (e.g., via an environment variable pointing to a notes directory), write the diagnostic session there. Skip silently if no store is configured.
Content (required sections):
This is the active thinking trail — distinct from any learnings file which captures distilled, reusable conclusions.
After resolution, AskUserQuestion: "Save this learning?"
scope: project:<name>WHY: Reproduction confirms you are solving the actual problem, not a symptom; untested fixes introduce regressions.
BAD: "Roll back the SDK upgrade" on the strength of a support ticket. GOOD: Reproduce the failure first, then change one variable and observe.
WHY: Vague "somewhere in the auth module" diagnoses cannot be verified or code-reviewed.
BAD: "The problem is in the user service."
GOOD: "Root cause at src/api/auth.ts:142: token expiry not caught."
WHY: Fixing the correlated symptom leaves the root cause intact.
BAD: Blame the deploy because errors started the same afternoon.
GOOD: Isolate with a swapped variable or git bisect before naming a cause.
WHY: About 80% of bugs have documented answers; skipping search wastes diagnostic cycles.
BAD: Ask five qualifying questions before running any search. GOOD: WebSearch the error, stack and framework first, then qualify.
WHY: Premature writes capture incomplete hypotheses as conclusions, and misleading notes repeat the misdiagnosis in future sessions.
BAD: Write the artifact mid-investigation because someone wants a write-up. GOOD: Write it once the root cause is confirmed and the fix is verified.
WHY: An empty answer means the question was never shown, so any assumption replaces the user's reply.
BAD: Treat blank answers as "no recent changes" and continue. GOOD: Present a numbered text list and wait for the user's choice.
WHY: Pattern matching, isolation and root cause drilling resolve many bugs cheaply; OODA costs the user a round trip per loop.
BAD: Ask the user to run a new command as the first step. GOOD: Run mental models, isolation and the root cause drill first, and hand to OODA only when they are inconclusive.
WHY: The workflow is human-executed; the user holds the access and must see what runs in their environment.
BAD: Claim to have restarted the service or run the migration. GOOD: Give the command and ask the user to run it and paste the output.
WHY: Complex problems cannot be diagnosed in advance, so forcing a root-cause hunt produces confident but wrong answers.
BAD: Declare a cause for a problem whose three competing theories have all failed before. GOOD: Reclassify as Complex, note the Cynefin transition and route to a probe.
Investigating a silent API failure:
# Skill prompts: reproduce → isolate → check logs → locate source
# Output: "Root cause at src/api/auth.ts:142 — token expiry not caught"Triaging a flaky test:
# Skill prompts: classify domain (Clear/Complicated/Complex)
# Routes to probe skill if Complex domain detectedDiagnosing a performance regression after a deploy:
# Skill prompts: qualify stack/environment/recent changes → Wolf Fence bisect
# Output: "Regression introduced in commit abc123 — N+1 query in UserService.list()"Before responding to user, verify:
| Topic | Reference | When to Use |
|---|---|---|
| Isolation and root cause | references/reference.md | Wolf Fence, Swap One Variable, Minimal Repro, 5 Whys, Fishbone, OODA loop |
| Diagnose protocol | references/protocols/diagnose.md | Mental model matching, isolation sequence, OODA handoff conditions |
| Multi-source search | references/protocols/search-multi-source.md | Query construction, source priority and the no-result fallback |
| Handoff to framing | references/troubleshoot-to-frame-problem-llm.md | Passing an unresolved problem to frame-problem |
pantheon-org/tekhne
c8416e9
Also appears in
last in sync Aug 28, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.