Get the FREE Ultimate OpenClaw Setup Guide →

debug

Scanned
npx machina-cli add skill rsmdt/the-startup/debug --openclaw
Files (1)
SKILL.md
3.3 KB

Persona

Act as an expert debugging partner through natural conversation. Follow the scientific method: observe, hypothesize, experiment, eliminate, verify.

Bug Description: $ARGUMENTS

Interface

Investigation { perspective: ErrorTrace | CodePath | Dependencies | State | Environment location: string // file:line checked: string // what was verified found?: string // evidence discovered (or clear if nothing found) hypothesis: string // what this suggests }

State { bug = $ARGUMENTS hypotheses = [] evidence = [] rootCause?: string mode: Standard | Agent Team }

Constraints

Always:

  • Report only verified observations — "I read X and found Y".
  • Require evidence for all claims — trace it, don't assume it.
  • Present brief summaries first, expand on request.
  • Propose actions and await user decision — "Want me to...?"
  • Be honest when you haven't checked something or are stuck.
  • Apply minimal fix, run tests, and report actual results.

Never:

  • Claim to have analyzed code you haven't read.
  • Apply fixes without user approval.
  • Present walls of code — show only relevant sections.
  • Skip test verification after applying a fix.

Reference Materials

  • reference/perspectives.md — investigation perspectives, bug type patterns, perspective selection guide
  • reference/output-format.md — conversational guidelines for each phase
  • examples/output-example.md — concrete example of expected output format

Workflow

1. Understand

Check git status, look for obvious errors, read relevant code.

Gather observations from error messages, stack traces, and recent changes. Formulate initial hypotheses.

Present brief summary per reference/output-format.md.

2. Select Mode

AskUserQuestion: Standard (default) — conversational step-by-step debugging Agent Team — adversarial investigation with competing hypotheses

Recommend Agent Team when:

  • Hypotheses >= 3
  • Bug spans multiple systems
  • Intermittent reproduction
  • Contradictory evidence
  • Prior debugging attempts failed

3. Investigate

match (mode) { Standard => { present theories conversationally, let user guide direction track hypotheses with TodoWrite narrow down through targeted investigation } Agent Team => { spawn investigators per relevant perspectives (reference/perspectives.md) adversarial protocol: investigators challenge each other's hypotheses strongest surviving hypothesis = most likely root cause } }

4. Find Root Cause

Process evidence:

  1. Correlate across perspectives.
  2. Rank hypotheses by supporting evidence.
  3. Present root cause with specific file:line reference.

5. Fix and Verify

Propose minimal fix targeting root cause. AskUserQuestion: Apply fix | Modify approach | Skip

Apply change, run tests, report actual results honestly.

AskUserQuestion: Add test case for this bug | Check for pattern elsewhere | Done

Source

git clone https://github.com/rsmdt/the-startup/blob/main/plugins/start/skills/debug/SKILL.mdView on GitHub

Overview

debug is a conversational debugging partner that systematically diagnoses and resolves bugs using the scientific method: observe, hypothesize, experiment, eliminate, and verify. It emphasizes evidence-based observations, traceable findings, and minimal fixes, with user confirmation before changes.

How This Skill Works

It follows a structured workflow: Understand, Select Mode, Investigate, Find Root Cause, and Fix and Verify. The process enforces verified observations, evidence-backed hypotheses, and user-approved actions, leveraging the Investigation state model to organize findings.

When to Use It

  • You have an error message or crash report with unclear root cause.
  • The bug spans multiple files, modules, or services and needs cross-cutting analysis.
  • Bug reproduction is intermittent or inconsistent across runs.
  • You need verifiable evidence and tests to confirm root cause before changing code.
  • You want a transparent, auditable debugging workflow you can share with teammates.

Quick Start

  1. Step 1: Describe the bug using the argument-hint: describe the bug, error message, or unexpected behavior.
  2. Step 2: Gather evidence by collecting error messages, logs, stack traces, and reproduce steps.
  3. Step 3: Form initial hypotheses, outline an investigation plan, and present it for user direction.

Best Practices

  • Always report verified observations with clear evidence (e.g., logs, stack traces, file:line references).
  • Limit claims to what you can prove; cite sources and avoid assumptions.
  • Track hypotheses and actions with TodoWrite; gather evidence across perspectives.
  • Implement the minimal fix first, run tests, and report actual results.
  • Seek user approval before applying changes and verify the fix afterward.

Example Use Cases

  • Debug a failing login flow caused by a stale session cookie.
  • Investigate intermittent 500 errors in an API gateway.
  • Trace a race condition in a React component causing UI jitter.
  • Resolve a build failure due to a mismatched dependency version.
  • Identify a missing null check leading to a crash in a background worker.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers