bugfix
Diagnose and fix bugs using hypothesis-driven debugging, diagnostic instrumentation, architecture-aware analysis, and evidence-based root cause identification
Skill by thoreinstein
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/thoreinstein-bugfix
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/bugfix
What's inside
- Skill name
bugfix- Description
- Diagnose and fix bugs using hypothesis-driven debugging, diagnostic instrumentation, architecture-aware analysis, and evidence-based root cause identification
- License
- MIT
- Metadata
- author: thoreinstein · version: 1.0.0
- Instructions
- 160 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- compatibility: must be text of at most 500 characters
- allowed-tools: must be a space-separated string
Files (6)
- SKILL.md
- bugfix-phases.md · references/
- context.md · references/templates/
- diagnosis-report.md · references/templates/
- diagnostic-logs.md · references/templates/
- resolution.md · references/templates/
SKILL.md (first lines)
# Bugfix
Intelligently diagnose and fix bugs through a systematic, evidence-based approach that prioritizes understanding over guessing.
## When to Use
- Production bug reports where root cause is unclear
- Intermittent failures that are hard to reproduce
- Complex multi-layer bugs spanning database, service, API, and UI
- Any bug where initial fix attempts have failed
- Situations requiring careful diagnosis before action
## Workflow Overview
```mermaid
flowchart TD
START[User Reports Bug] --> CHECK{Architecture docs exist?}
CHECK -->|No| GEN[Generate architecture docs]
CHECK -->|Yes| READ[Read architecture docs]
GEN --> READ
READ --> CONTEXT[Gather bug context]
CONTEXT --> LOGS[Add diagnostic logs/instrumentation]
LOGS --> REPRODUCE[Attempt to reproduce bug]
REPRODUCE --> ANALYZE[Analyze log output]
ANALYZE --> HYPOTHESIS[Generate 5-7 hypotheses]
HYPOTHESIS --> DISTILL[Distill to 1-2 most likely causes]
DISTILL --> VALIDATE[Validate with diagnostic data]
VALIDATE --> PRESENT[Present diagnosis to user]
PRESENT --> CONFIRM{User confirms diagnosis?}
CONFIRM -->|No| LOGS
CONFIRM -->|Yes| FIX[Implement fix]
FIX --> TEST[Test fix thoroughly]
TEST --> VERIFY[Verify bug resolved]
VERIFY --> CLEANUP[Remove diagnostic logs]
CLEANUP --> DOCS[Document root cause]
DOCS --> COMPLETE[Bug Fixed]
style START fill:#fbb,stroke:#333,stroke-width:2px
style COMPLETE fill:#bfb,stroke:#333,stroke-width:2px
style CONFIRM fill:#ffb,stroke:#333,stroke-width:2px
```
## Phase Summary
| Phase | Name | Time | Description |
|-------|------|------|-------------|
| 1 | Context Gathering | 5-10 min | Read architecture docs, gather bug context |
| 2 | Diagnostic Instrumentation | 10-15 min | Add targeted logging across affected layers |
| 3 | Reproduce & Analyze | 10-15 min | Reproduce bug, collect and analyze diagnostic data |
| 4 | Hypothesis Generation | 10-15 min | Generate 5-7 hypotheses, distill to 1-2 most likely |
| 5 | User Confirmation | MANDATORY | Present diagnosis, wait for explicit approval |
| 6 | Implement Fix | Variable | Fix code, add tests (ONLY after confirmation) |
| 7 | Testing & Verification | 10-15 min | Verify fix, run test suite, check for regressions |
| 8 | Documentation | 10 min | Document root cause and resolution |
See `references/bugfix-phases.md` for detailed phase instructions.
## Key Principles
1. **Diagnostic-First**: ALWAYS add instrumentation before attempting fixes
2. **Hypothesis-Driven**: Generate multiple theories, validate with data
3. **User Confirmation**: NEVER implement fix without explicit approval
4. **Architecture-Aware**: Use architecture documentation for deep context
5. **Evidence-Based**: All conclusions must be backed by diagnostic data
6. **Thorough Testing**: Comprehensive tests for fix and edge cases
7. **Clean Cleanup**: Remove ALL temporary diagnostic code after fix
## Constraints
- **STOP at Phase 5** and wait for user confirmation before implementing any fix
- **Remove ALL diagnostic instrumentation** after fix is verified
- **Generate 5-7 hypotheses** before distilling to most likely causes
- **Document root cause** and prevention strategy in resolution document
- **Never guess** - if diagnostic data is insufficient, add more instrumentation
## Templates
- `references/templates/context.md` - Bug context documentation
- `references/templates/diagnostic-logs.md` - Diagnostic log format
- `references/templates/diagnosis-report.md` - Diagnosis presentation to user
- `references/templates/resolution.md` - Bug resolution documentation
## Example
```
Bug Diagnosis: Null Pointer in User Service
Architecture Check:
- Read /docs/architecture/data-model.md
- Identified User entity and relationships
- Found service layer patterns
Phase 1: Adding Diagnostics
- Added 8 diagnostic log points
- Added error boundaries
- Added state tracking
Phase 2: Reproduction
- Bug reproduced (100% success rate)
- Diagnostic data collected
- Timeline: Error at T+45ms
Phase 3: Hypothesis Generation
Generated 5 hypotheses:
1. Missing eager loading (HIGH)
2. Null validation missing (MEDIUM)
3. Race condition (MEDIUM)
4. Cache issue (LOW)
5. Permission issue (LOW)From thoreinstein/agents, MIT.
More from thoreinstein/agents
- 0.454score
core-web-vitals
addyosmani
Optimize Core Web Vitals (LCP, INP, CLS) for better page experience and search ranking.
SkillDFreshness: D★ 3Claude Code +9 - 0.449score
performance
addyosmani
Optimize web performance for faster loading and better user experience.
SkillDFreshness: D★ 3Claude Code +9 - 0.443score
code-review
thoreinstein
Comprehensive code review with security, performance, and maintainability focus.
SkillDFreshness: D★ 3Claude Code +9 - 0.443score
debug
thoreinstein
Guide systematic debugging through hypothesis generation, evidence collection, and verification.
SkillDFreshness: D★ 3Claude Code +9 - 0.443score
analyze
thoreinstein
Deep analysis mode - thorough multi-phase investigation with expert consultation for complex problems requiring careful examination
SkillDFreshness: D★ 3Claude Code +9 - 0.443score
runbook
thoreinstein
Generate operational runbooks for services, procedures, or incident response with step-by-step procedures, troubleshooting guides, and escalation paths
SkillDFreshness: D★ 3Claude Code +9 - 0.443score
deploy-checklist
thoreinstein
Generate deployment checklists with pre-flight checks, rollout strategy, and verification steps.
SkillDFreshness: D★ 3Claude Code +9 - 0.443score
refactor
thoreinstein
Analyze code and suggest refactoring opportunities with blast radius assessment, risk evaluation, and recommended order of operations
SkillDFreshness: D★ 3Claude Code +9 - 0.443score
implement
thoreinstein
Full implementation mode - end-to-end feature implementation with phased execution, parallel work streams, verification gates, and atomic commits per phase
SkillDFreshness: D★ 3Claude Code +9 - 0.443score
content-writer
thoreinstein
Research-driven content writing with citations, iterative outlines, and real-time feedback.
SkillDFreshness: D★ 3Claude Code +9 - 0.443score
research
thoreinstein
Research the codebase to find and explain specific topics, answering questions about architecture, configuration, data flows, and implementation details
SkillDFreshness: D★ 3Claude Code +9 - 0.442score
figma-design
thoreinstein
Interact with Figma design files via the web browser using the Figma Plugin API.
SkillDFreshness: D★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jan 20, 2026 (9 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.0.0
- License
- MIT
- Repository
- github.com/thoreinstein/agents
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from thoreinstein
- 0.776score
journal
thoreinstein
Use when the user wants to work with their daily note — view today's entry, add a log, do a daily review, or capture quick thoughts.
SkillAFreshness: A★ 102Claude Code +9 - 0.649score
vault
thoreinstein
Use when the user wants to set, change, or create their Obsidian vault, or says "vault", "set vault", "change vault", "create vault", or "new vault".
SkillAFreshness: A★ 102Claude Code +9 - 0.597score
vault-lint
thoreinstein
Use when the user wants a health audit of the vault — stale content, provenance drift, frontmatter compliance, or MOC coverage gaps.
SkillDFreshness: D★ 102Claude Code +9 - 0.597score
moc-update
thoreinstein
Use after creating a new Engineering/ note to suggest which Maps of Content (MOCs) it belongs in.
SkillDFreshness: D★ 102Claude Code +9 - 0.597score
research
thoreinstein
Use when the user asks a question about their vault, wants to explore a topic across notes, or says "research", "find out", "what do I know about", or…
SkillDFreshness: D★ 102Claude Code +9 - 0.597score
wiki-ingest
thoreinstein
Use when the user wants to ingest external sources into the vault — PDFs, markdown files, transcripts, Readwise exports, or any document.
SkillDFreshness: D★ 102Claude Code +9
Cite this page
bugfix skill. Agent Mart. https://agentmart.dev/skills/thoreinstein-bugfix (last updated 2026-10-24)