ai-development-guide
Applies technical decision criteria, anti-pattern detection, debugging, and quality gates for backend and frontend code. Use when…
Investigate problem, verify findings, and derive solutions
Claude Code
$ npx -y skills add shinpr/claude-code-workflows --skill recipe-diagnose --agent claude-code
Codex
$ npx skills add shinpr/claude-code-workflows --skill recipe-diagnose -a codex -y
Cursor
$ npx skills add shinpr/claude-code-workflows --skill recipe-diagnose -a cursor -y
Gemini CLI
$ npx skills add shinpr/claude-code-workflows --skill recipe-diagnose -a gemini-cli -y
GitHub Copilot
$ npx skills add shinpr/claude-code-workflows --skill recipe-diagnose -a github-copilot -y
OpenCode
$ npx skills add shinpr/claude-code-workflows --skill recipe-diagnose -a opencode -y
Windsurf
$ npx skills add shinpr/claude-code-workflows --skill recipe-diagnose -a windsurf -y
name: recipe-diagnose description: Investigate problem, verify findings, and derive solutions disable-model-invocation: true
**Explicit User Instruction**: The user explicitly instructs and authorizes every subagent call named in this recipe. Execute each applicable call when its prerequisites are met.
Execute Skill: llm-friendly-context before writing Agent prompts, handoffs, or generated artifacts. Execute Skill: subagents-orchestration-guide before making workflow decisions, invoking agents, or resolving findings.
**Context**: Diagnosis flow to identify root cause and present solutions
Target problem: $ARGUMENTS
**Core Identity**: "I am an orchestrator."
**Local authority gate**: Make this recipe's workflow decisions and validate each returned result directly; delegate semantic deliverable production to the named specialist.
**Execution Method**:
Orchestrator invokes sub-agents and passes structured JSON between them.
At each Agent invocation below, build the prompt as a mechanical extraction: copy the named source values into the exact fields, apply only the declared serialization, then invoke immediately.
**Execution Gate**: Each step below establishes evidence required by the next decision. Complete Steps 0-7 in order, including every required investigation and verification retry. Advance only through the current step's stated quality or coverage condition; invoke solver only after coverage is closed.
Define a semantic scope envelope from the reported problem and repository evidence by recording:
The envelope bounds relevance. Keep every relationship above active throughout investigation, including after a plausible cause appears.
Resolve facts that change the investigation target from available evidence. Ask the user only for a target-changing fact that the investigation cannot obtain; continue unaffected investigation.
When the user corrects the symptom's location, expected behavior, timing, or conditions, update this envelope and return to path mapping for the corrected symptom. Re-evaluate affected exclusions and failure points through investigator and verifier before invoking solver. Retain evidence that remains valid; prior coverage closure applies only to the symptom and evidence it verified. When new information only adds evidence for the same symptom, reopen only the judgments it affects.
Problem → scope envelope → investigator → verifier
↑ │
└── named gaps ───┘
coverage closed → design decision gate when applicable → solver → Report
material evidence unavailable → limitation/block report**Context Separation**: Each specialist starts fresh with the current diagnosis scope envelope and the structured results named in its invocation. The envelope supplies the user's report independently of upstream interpretations.
**Agent tool invocation**:
subagent_type: investigator description: "Investigate problem" prompt: | Comprehensively collect information related to the following phenomenon. diagnosisScopeEnvelope: [Current Step 0 semantic scope envelope]
**Expected output**: scopeAccounting, pathMap (execution paths per symptom), failurePoints (faults found at each node), impactAnalysis per failure point, unexplored areas, investigation limitations
Review investigation output:
**Quality Check** (verify JSON output contains the following):
**If quality insufficient**: Re-run investigator specifying missing items explicitly:
prompt: | Re-investigate with focus on the following gaps: - Missing: [unsatisfied Step 2 Quality Check items, copied as written] diagnosisScopeEnvelope: [Current Step 0 semantic scope envelope] Use these previous investigation results as context and investigate only the gaps listed above. Return one updated complete investigation JSON, retaining prior evide
Claude Code can explore a codebase deeply. On non-trivial work, the harder problem is convergence.
Applies technical decision criteria, anti-pattern detection, debugging, and quality gates for backend and frontend code. Use when…
Language-agnostic coding principles for maintainability, readability, and quality. Use when implementing features, refactoring…
Determines which of PRD, ADR, UI Spec, Design Doc, and Work Plan a change requires, and where each is stored. Use when deciding…
Records where resources outside the repository live (design source, design system, API schema, IaC source, secret store) and how…
Implementation strategy selection framework. Use when planning implementation strategy, selecting development approach, or…
Defines integration/E2E skeleton annotations, lane and file contracts, and route-parity review criteria. Use when generating or…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.