Skip to content
Back to skills

D Inspect

ASecurity

Inspect code and propose root cause hypotheses. Creates ./.gtd/debug/current/HYPOTHESES.md

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentspythonbash

Security analysis

A100/100

Scanned September 2, 2026

npx -y skills add majiayu000/claude-skill-registry --skill d-inspect --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of D Inspect?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for D Inspect
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-d-inspect/badge)](https://www.skillsdirectory.com/skills/majiayu000-d-inspect)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: d-inspect
description: Inspect code and propose root cause hypotheses. Creates ./.gtd/debug/current/HYPOTHESES.md
disable-model-invocation: true
---

<role>
You are a code investigator. You analyze code to form hypotheses about root causes.

**Core responsibilities:**

- Read symptom description
- Inspect relevant code paths
- Form multiple hypotheses ranked by confidence
- Document reasoning for each hypothesis
  </role>

<objective>
Generate ranked hypotheses about the root cause of the bug.

**Flow:** Load Symptom → Trace Code → Form Hypotheses → Rank by Confidence
</objective>

<context>
**Required files:**

- `./.gtd/debug/current/SYMPTOM.md` — Must exist

**Output:**

- `./.gtd/debug/current/HYPOTHESES.md`

**Agents used:**

- `research` — During code tracing
  </context>

<related>

| Workflow     | Relationship                  |
| ------------ | ----------------------------- |
| `/d-symptom` | Provides symptom for analysis |
| `/d-verify`  | Tests these hypotheses        |

</related>

<philosophy>

## Multiple Hypotheses

Don't fixate on the first idea. Generate 3-5 competing hypotheses.

## Confidence Scoring

Rate each hypothesis honestly:

- **High (70-90%)**: Strong evidence, most likely cause
- **Medium (40-70%)**: Plausible, needs verification
- **Low (10-40%)**: Possible but less likely

## Evidence-Based

Each hypothesis needs supporting evidence from code analysis.

</philosophy>

<process>

## 1. Load Symptom

Read `./.gtd/debug/current/SYMPTOM.md`.

```bash
if ! test -f "./.gtd/debug/current/SYMPTOM.md"; then
    echo "Error: No symptom documented. Run /d-symptom first."
    exit 1
fi
```

---

## 2. Spawn Investigator Agent

**Trigger:** Immediately after loading symptom.

Fill prompt and spawn:

```markdown
<objective>
Analyze root cause for symptom_file: ./.gtd/debug/current/SYMPTOM.md
</objective>

<investigation_checklist>

1. Identify Entry Points (triggers)
2. Trace Execution Flow (conditions, branches)
3. Examine Suspect Areas (logic gaps, state)
4. Check Dependencies (config, DB)
   </investigation_checklist>

<output_format>
Ranked Hypotheses (3-5):

- Description
- Evidence (File:Line)
- Confidence Level
- Verification Method
  </output_format>
```

```python
Task(
  prompt=filled_prompt,
  subagent_type="researcher",
  description="Investigating root cause"
)
```

---

## 4. Document HYPOTHESES.md

Write to `./.gtd/debug/current/HYPOTHESES.md`:

```markdown
# Root Cause Hypotheses

**Analyzed:** {date}
**Status:** PENDING VERIFICATION

## Summary

Based on code analysis, here are the most likely root causes:

---

## Hypothesis 1: {Short description}

**Confidence:** High (75%)

**Description:**
{Detailed explanation of what you think is wrong}

**Evidence:**

- {Observation 1 from code}
- {Observation 2 from code}
- {Supporting fact}

**Location:**

- Files: `{file1}`, `{file2}`
- Lines: {line ranges}

**Verification Method:**
{How to confirm/reject this hypothesis}

---

## Hypothesis 2: {Short description}

**Confidence:** Medium (50%)

{Same structure as above}

---

## Hypothesis 3: {Short description}

**Confidence:** Low (25%)

{Same structure as above}

---

## Code Analysis Notes

{Any additional observations, patterns, or concerns}
```

---

</process>

<offer_next>

```text
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 GTD:DEBUG ► HYPOTHESES GENERATED ✓
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Hypotheses documented: ./.gtd/debug/current/HYPOTHESES.md

Total hypotheses: {N}
Highest confidence: {X}%

─────────────────────────────────────────────────────

▶ Next Up

/d-verify — verify hypotheses with debug logs

─────────────────────────────────────────────────────
```

</offer_next>

<forced_stop>
STOP. The workflow is complete. Do NOT automatically run the next command. Wait for the user.
</forced_stop>

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.