Back to Skills

bug-hunt

verified

Investigate suspected bugs with git archaeology and root cause analysis. Triggers: "bug", "broken", "doesn't work", "failing", "investigate bug".

View on GitHub

Marketplace

agentops-marketplace

boshu2/agentops

Plugin

general-kit

productivity

Repository

boshu2/agentops
6stars

plugins/general-kit/skills/bug-hunt/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/boshu2/agentops/blob/main/plugins/general-kit/skills/bug-hunt/SKILL.md -a claude-code --skill bug-hunt

Installation paths:

Claude
.claude/skills/bug-hunt/
Powered by add-skill CLI

Instructions

# Bug Hunt Skill

Systematic bug investigation that produces root cause analysis and fix design.

## Overview

When a bug is suspected, this skill guides through:
1. Confirming the bug exists
2. Tracing when/how it was introduced
3. Understanding the root cause
4. Designing a complete fix

**Output**: `~/gt/.agents/<rig>/research/YYYY-MM-DD-bug-{slug}.md`

---

## Workflow

```
0. Rig Detection -> Determine target rig from code paths
1. Reproduce     -> Confirm bug exists, capture symptoms
2. Archaeology   -> Git blame/log/bisect to find introduction
3. Root Cause    -> Trace the failure cascade
4. Fix Design    -> Solution + test plan
5. Output        -> Structured document for PR/issue
```

---

## Phase 0: Rig Detection

**CRITICAL**: All `.agents/` artifacts go to `~/gt/.agents/<rig>/` based on the codebase with the bug.

**Detection Logic**:
1. Identify which rig's code has the bug (e.g., files in `~/gt/gastown/` → `gastown`)
2. If bug spans multiple rigs, use `_cross-rig`
3. If unknown/unclear, ask user

| Bug Location | Target Rig | Output Base |
|--------------|------------|-------------|
| `~/gt/athena/**` | `athena` | `~/gt/.agents/athena/` |
| `~/gt/daedalus/**` | `daedalus` | `~/gt/.agents/daedalus/` |
| `~/gt/chronicle/**` | `chronicle` | `~/gt/.agents/chronicle/` |
| Multiple rigs | `_cross-rig` | `~/gt/.agents/_cross-rig/` |

```bash
# Set RIG variable for use in output paths
RIG="daedalus"  # or athena, chronicle, _cross-rig
mkdir -p ~/gt/.agents/$RIG/research/
```

---

## Phase 1: Reproduce

**Goal**: Confirm the bug is real and capture exact symptoms.

```bash
# Run the failing command/operation
# Capture exact error message
# Note environment (version, config, etc.)
```

**Checklist**:
- [ ] Bug reproduces consistently?
- [ ] Exact error/symptom captured?
- [ ] Environment noted (versions, config)?
- [ ] Minimal reproduction steps?

**If can't reproduce**: Stop - may be config issue or already fixed.

---

## Phase 2: Git Archaeology

**Goal**: F

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
6364 chars