Skills

Piv Investigate Issue

Investigate a GitHub issue, fan out parallel exploration, find the root cause (5 Whys...

Install

npx skills add coleam00/skills --skill piv-investigate-issue -g -a claude-code -y
Repository
coleam00/skills726
Category
Git and review
Updated
5d ago
License
MIT
Context cost
Mediumabout 1,724 tokens
Runs scripts
No, instructions only

What it does

Investigate a GitHub issue, fan out parallel exploration, find the root cause (5 Whys, evidence-backed), and write a reviewable RCA artifact (then post a summary to the issue). The investigate step before piv-implement-issue. Use to diagnose a bug/issue before fixing it.

Investigate Issue #$ARGUMENTS (Root-Cause Analysis)

Objective

Investigate GitHub issue #$ARGUMENTS from this repository, identify the root cause, and document findings for future implementation.

Prerequisites:

  • Working in a local Git repository with GitHub origin
  • GitHub CLI installed and authenticated (gh auth status)
  • Valid GitHub issue ID from this repository

Investigation Process

1. Fetch GitHub Issue Details

Use GitHub CLI to retrieve issue information:

gh issue view $ARGUMENTS

This fetches:

  • Issue title and description
  • Reporter and creation date
  • Labels and status
  • Comments and discussion

2. Explore the Codebase, fan out in parallel

Dispatch specialized agents in parallel (one message, multiple Task calls) so exploration is fast and the noisy search stays out of your main context:

  • codebase-analyst, trace HOW the affected code works end-to-end: integration points, data flow, state/side effects, error handling. Return precise file:line references, no suggestions.
  • research-agent (a second explorer), find WHERE the relevant code lives + patterns to mirror: the error strings from the issue, related functions/modules, similar implementations, existing test patterns.

Merge their findings into a short map (file:line + why each matters) before forming the root cause. (This is the parallel-subagent fan-out, applied to diagnosis.)

3. Review Recent History, when was it introduced?

Check recent changes to the affected areas, and pin down when the bug entered: !git log --oneline -20 -- [relevant-paths]

git blame -L <start>,<end> <affected-file>   # who/when introduced the suspect lines

Decide: a recent regression vs a long-standing bug vs original behavior, it changes both the fix and the risk.

4. Investigate Root Cause, the 5 Whys, with evidence

Read the whole SKILL.md on GitHub

More in Git and review