debug

A methodical debugging command that starts by defining a software problem, then forms possible causes and tests them using evidence.

In plain words
What is it for?
Use it to investigate reproducible or intermittent bugs, compare hypotheses, trace errors to their root cause, and verify a fix with tests.
Why use it?
It reduces guesswork by separating the observed symptom from the expected behavior and narrowing the problem before changing code.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/primeline-ai/evolving-lite/debug
Clone the repo
git clone --depth 1 https://github.com/primeline-ai/evolving-lite
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 940 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00008 $0.00940
Opus 5 $0.00004 $0.00470
Sonnet 5 $0.00002 $0.00188
Haiku 4.5 $0.00001 $0.00094

Measured yesterday against content hash 6c1e1985eefa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debug scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/debug.md · 173 lines

How it starts

The opening of the file, as written. The whole thing — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a systematic debugging expert. You work methodically: understand symptoms, form hypotheses, gather evidence, find root cause.


Step 0: Intake Gate

Input: $ARGUMENTS

If empty or vague:

What are we debugging today?

Please describe:
1. **Symptom**: What's happening (not what you expect)?
2. **Context**: Where/when does it occur?
3. **Reproducible?**: Always / Sometimes / Once

If sufficient -> Continue to Step 1


Step 1: Problem Definition

Document the symptom

## Bug Report

**Symptom**: {what happens}
**Expected**: {what should happen}
**Context**: {where/when}
**Reproducible**: {yes/no/sometimes}
**Since when**: {if known}
**What changed**: {if known}

Narrow scope

Questions to narrow down:

  • Does it only occur in specific situations?
  • Did it work before?
  • Are there error messages?
  • Which components are involved?

Step 2: Form Hypotheses

Generate 3-5 hypotheses based on:

  • Symptom analysis
  • Common failure patterns
  • Context information
## Hypotheses (by probability)

| # | Hypothesis | Probability | Test |
|---|-----------|------------|------|
| 1 | {hypothesis} | High | {how to test} |
| 2 | {hypothesis} | Medium | {how to test} |
| 3 | {hypothesis} | Low | {how to test} |

Prioritization:

  • Start with highest probability
  • Prefer quickly testable hypotheses
  • Occam's Razor - simplest explanation first

Step 3: Evidence Gathering

For each hypothesis

Collect evidence:

  1. Check logs and error output
  2. Read suspected code files
  3. Search for similar patterns in codebase
  4. Check configuration and environment
  5. Attempt reproduction

Evidence Matrix

## Evidence for Hypothesis {N}

| Evidence | Found | Supports hypothesis? |
|----------|-------|---------------------|
| {what was searched} | {yes/no} | {yes/no/neutral} |

Step 4: Root Cause Analysis

If hypothesis confirmed

## Root Cause Found

**Problem**: {concrete cause}
**Why**: {explanation}
**Evidence**: {evidence confirming it}

### Affected Components
- {Component 1}: {how affected}

Read the full file on GitHub · 173 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 173 lines · 8 tokens per session scan A 6c1e1985eefa

Subscribe to this mod's changes

debug is a command published in the GitHub repository primeline-ai/evolving-lite (48 stars, last pushed 15d ago), licensed MIT. It adds 8 tokens to every session and 940 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.