Skip to content
Agentmart
Submit a tool

oracle-debug

Disciplined debugging methodology.

Skill by martinffx

IndexedMIT★ 48
Write a review

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/martinffx-oracle-debug

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.

We use your email only for this newsletter. Privacy

About

Disciplined debugging methodology. Triggers on bug reports, test failures, "debug this", "diagnose this", unexpected behavior, build failures, integration issues, or performance regressions. Find root cause before a permanent corrective fix; contain urgent harm safely first.

Use cases: testing

No 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 and code. 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/oracle-debug

What's inside

Skill name
oracle-debug
Description
Disciplined debugging methodology. Triggers on bug reports, test failures, "debug this", "diagnose this", unexpected behavior, build failures, integration issues, or performance regressions. Find root cause before a permanent corrective fix; contain urgent harm safely first.
License
MIT
Instructions
220 lines in SKILL.md · view on GitHub

Files (3)

  • SKILL.md
  • bug-patterns.md · references/
  • techniques.md · references/

SKILL.md (first lines)

# Oracle Debug

Random fixes waste time and create new bugs. Quick patches mask underlying issues.

**Core principle:** find root cause before a permanent corrective fix. Temporary containment is
appropriate when needed to limit security, production, or data-loss impact.

**Violating the letter of this process is violating the spirit of debugging.**

## The Iron Law

```
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
```

If you haven't completed Phase 1, you cannot propose fixes.

## When to Use

Use for any technical issue:

- Test failures
- Bugs in production
- Unexpected behavior
- Performance regressions
- Build or integration failures
- Intermittent failures

**Use this especially when:**

- Under time pressure
- "Just one quick fix" seems obvious
- You've already tried multiple fixes
- The previous fix didn't work
- You don't fully understand the issue

## The Four Phases

You must complete each phase before proceeding to the next.

---

## Phase 1 — Root Cause Investigation

**Before attempting any fix:**

Use the project's domain glossary and ADRs to build a clear mental model of the
relevant modules before tracing.

1. **Read error messages carefully.** Read the full stack trace, line numbers, file paths, and error codes. Don't skip warnings.
2. **Build a fast feedback loop.** If you don't have a fast, deterministic, pass/fail signal for the bug, no amount of code-reading will save you. Spend disproportionate effort here.

   Try these in order:
   - Failing test at the seam that reaches the bug
   - Curl / HTTP script against a running dev server
   - CLI invocation with fixture input
   - Headless browser script (Playwright/Puppeteer)
   - Replay a captured trace (network payload, event log)
   - Throwaway harness (minimal subset of the system)
   - Property/fuzz loop for "sometimes wrong" bugs
   - Bisection harness (e.g., `git bisect run`)
   - Differential loop (old vs new version)
   - HITL bash script (last resort — structure the human clicks)

   Iterate on the loop: make it faster, sharper, and more deterministic. A 30-second flaky loop is barely better than no loop.

3. **Reproduce the bug.** Run the loop when safe. Confirm the failure matches what the user
   described and capture the exact symptom. When reproduction is unsafe or impossible, use
   historical artifacts, static evidence, or targeted telemetry instead.
4. **Check recent changes.** `git diff`, recent commits, new dependencies, config changes, environment differences.
5. **Trace data flow.** In multi-component systems, add diagnostic instrumentation at each boundary:
   - Record only the minimum fields needed at each component boundary
   - Redact credentials, authorization data, session identifiers, personal data, and payloads
   - Verify environment/config propagation
   - Check state at each layer

   Run once to gather evidence, then narrow to the failing component.
6. **Trace backward through the call stack.** Where does the bad value originate? What called this with the bad value? Trace up until you find the source. Fix at the source, not at the symptom.

### Non-deterministic bugs

The goal is not a clean repro but a **higher reproduction rate**. Narrow timing windows and vary
one condition at a time. Treat added delay or load as a perturbation, not proof. Do not replay
state-changing traffic, stress production, or collect sensitive artifacts without explicit
authorization and a safe operational plan.

### When you genuinely cannot build a loop

Stop and say so explicitly. Ask the user for:

- Access to the environment that reproduces it
- A captured artifact (HAR, log dump, core dump, screen recording)
- Permission to add temporary production instrumentation

**Do not claim root cause without evidence you can explain.** A safe loop is preferred, but
artifact-based investigation is valid when a loop is unavailable.

---

## Phase 2 — Pattern Analysis

Find the pattern before fixing. Finding working examples across a large codebase can be
delegated to a read-only subagent (see Delegation in atelier-orchestrator). Phases 1, 3 and 4
stay in the main thread.

1. **Find working examples.** Locate similar working code in the same codebase.
2. **Compare against references.** If implementing a known pattern, read the reference implementation completely.
3. **Identify differences.** List every difference between working and broken, however small.
4. **Understand dependencies.** What components, config, settings, and assumptions does this code rely on?

---

## Phase 3 — Hypothesis and Testing

Use the scientific method.

1. **Generate 3–5 ranked hypotheses.** Single-hypothesis generation anchors on the first plausible idea. Each hypothesis must be falsifiable: state the prediction it makes. **Show the ranked list to the user before testing** — they often have domain knowledge that re-ranks instantly.

   > Format: "If `<X>` is the cause, then `<changing Y>` will make the bug disappear / `<changing Z>` will make it worse."

From martinffx/atelier, MIT.

More from martinffx/atelier

Signals

Stars
48
Forks
5
Open issues
0
Last commit (this folder)
Oct 9, 2026 (19 days ago)
Last release
Oct 18, 2026 (10 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from martinffx

Cite this page

oracle-debug skill. Agent Mart. https://agentmart.dev/skills/martinffx-oracle-debug (last updated 2026-10-24)