debugging-before-fixes

A debugging procedure for when a test, build, required check, or runtime behavior fails or is unexpected. It requires reproducing the problem reliably and finding its underlying cause before changing the code.

In plain words
What is it for?
Use it to reproduce failures with tests, commands, API calls, scripts, captured inputs, fuzzing, or comparison with an earlier working version. It also covers recording debugging evidence and hypotheses.
Why use it?
A quick patch can hide the real problem or create another bug. A repeatable failure loop provides evidence for investigating and verifying the eventual fix.

Skill for Claude CodeCodex

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 skills/bartoszarendt/agenticloop/debugging-before-fixes
Any agent
npx skills add bartoszarendt/agenticloop --skill debugging-before-fixes
Clone the repo
git clone --depth 1 https://github.com/bartoszarendt/agenticloop

Made for: Claude Code, Codex.

Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,076 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00077 $0.01076
Opus 5 $0.00039 $0.00538
Sonnet 5 $0.00015 $0.00215
Haiku 4.5 $0.00008 $0.00108

Measured 2d ago against content hash ffee49788dac, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debugging-before-fixes scanned grade A with 1 finding 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 2d ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

3. A `curl` or API smoke call against the dev stack.
skills/debugging-before-fixes/SKILL.md · 101 lines

How it starts

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

Debugging before fixes

No fix without a root cause first. Patching symptoms burns review iterations and often adds a second bug. Guess-and-check thrashing is how tasks end blocked or review-exhausted under [[blocked-state]].

Step 1: build the feedback loop

Before investigating or fixing, stand up a fast, deterministic, agent-runnable loop that reproduces the failure on demand. Reach for the highest item on this list that actually reproduces the failure:

  1. A failing unit, integration, or browser test.
  2. The targeted command from the task record's Required Checks.
  3. A curl or API smoke call against the dev stack.
  4. A small CLI or script run against a checked-in fixture.
  5. Replaying a captured payload, request, or log line through the failing code.
  6. A throwaway harness in .agenticloop/tmp/ that calls the failing unit directly.
  7. A fuzz or property loop when the triggering input is unknown.
  8. git bisect or a differential loop when a previously passing behavior regressed.

Prefer the cheapest deterministic loop that still fails for the real reason. Capture the exact command: it becomes RED proof for [[tdd-implementation]] and evidence for [[verification-evidence]].

Phase 2: investigate

  • Read the entire error message and stack trace.
  • Run the Step 1 loop and watch the real failure.
  • Diff what changed.
  • Trace the bad value or state back to where it originates.

Phase 3: compare

Find code in this repo that does the same kind of thing and works. Read the reference fully, then list concrete differences between it and the broken path.

Phase 4: hypothesize and test

Calibrate effort to the failure:

  • If the output fully explains a trivial error, fix it directly.
  • If the failure is non-obvious, not fully explained, or already survived one fix attempt, write 3-5 ranked falsifiable hypotheses before changing code.

Put each hypothesis in this form:

If X is the cause, then observing or changing Y should produce Z.

Test hypotheses in rank order with the smallest observation or change that discriminates. Wrong hypotheses are reverted and recorded as ruled out.

Read the full file on GitHub · 101 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. 2d ago First seen · 101 lines · 77 tokens per session scan A ffee49788dac

Subscribe to this mod's changes

debugging-before-fixes is a skill published in the GitHub repository bartoszarendt/agenticloop (2 stars, last pushed 12d ago), licensed MIT. It adds 77 tokens to every session and 1,076 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

consulting-analysis

Use this skill when the user requests to generate, create, or write professional research reports including but not limited to market analysis, consumer insights, brand analysis, financial analysis, industry research, competitive intelligence, investment due diligence, or any consulting-grade analytical report. This…

bytedance/deer-flow · 110 tokens

skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

bytedance/deer-flow · 64 tokens

ppt-generation

Use this skill when the user requests to generate, create, or make presentations (PPT/PPTX). Creates visually rich slides by generating images for each slide and composing them into a PowerPoint file.

bytedance/deer-flow · 44 tokens

deerflow-maintainer-orchestrator

Use when a DeerFlow maintainer needs comment-only GitHub issue or PR handling: resolve issue/PR scopes with gh, analyze issues, post or draft issue comments, perform PR review comments, review PR or issue batches, compare competing PRs that target the same issue, give fix strategy, risk classification, and validation…

bytedance/deer-flow · 88 tokens

systematic-literature-review

Use this skill when the user wants a systematic literature review, survey, or synthesis across multiple academic papers on a topic. Also covers annotated bibliographies and cross-paper comparisons. Searches arXiv and outputs reports in APA, IEEE, or BibTeX format. Not for single-paper tasks — use academic-paper-review…

bytedance/deer-flow · 73 tokens

code-documentation

Use this skill when the user requests to generate, create, or improve documentation for code, APIs, libraries, repositories, or software projects. Supports README generation, API reference documentation, inline code comments, architecture documentation, changelog generation, and developer guides. Trigger on requests…

bytedance/deer-flow · 88 tokens