debugging

debugging is a skill for Claude Code, Codex from Kimyongari/harness-factory. It costs 73 tokens per session (647 once invoked), scanned A, original, MIT.

A structured method for finding the cause of bugs, errors, and failing or unreliable tests.

In plain words
What is it for?
Use it to investigate stack traces, recent regressions, environment changes, flaky tests, and failures across multiple system layers.
Why use it?
It prevents guesswork by requiring a reproducible failure, evidence, one testable explanation at a time, and a regression test.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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/kimyongari/harness-factory/debugging
Any agent
npx skills add Kimyongari/harness-factory --skill debugging
Clone the repo
git clone --depth 1 https://github.com/Kimyongari/harness-factory

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for debugging

README.md
[![agentmods](https://agentmods.dev/badge/skills/kimyongari/harness-factory/debugging.svg)](https://agentmods.dev/skills/kimyongari/harness-factory/debugging)
Your own site
<a href="https://agentmods.dev/skills/kimyongari/harness-factory/debugging"><img src="https://agentmods.dev/badge/skills/kimyongari/harness-factory/debugging.svg" alt="Measured on agentmods" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 647 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.1 $0.00073 $0.00647
Opus 5 $0.00036 $0.00324
Sonnet 5 $0.00015 $0.00129
Haiku 4.5 $0.00007 $0.00065

Measured 6d ago against content hash 443f55b4eeb4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

debugging 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 6d 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.

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.

template/en/.skills/debugging/SKILL.md · 48 lines

How it starts

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

Debugging

Iron law: no fixes before the root cause is established. Symptom patches are failure — and under time pressure, guess-and-patch thrashing is slower than working systematically.

Procedure (in order)

  1. Read the error to the end. Stack traces from the bottom (origin) up. The answer is often already there.
  2. Reproduce first. Get the smallest command/input that re-triggers the failure and, when possible, pin it as a failing test — that becomes the definition of done. Can't reproduce? Don't fix; gather more evidence.
  3. Check recent changes. git diff, recent commits, dependencies, environment. If it worked yesterday, the environment (versions, PATH, env vars) changed more often than the code.
  4. Compare against a working example. Find similar code in this repo that works and list every difference. Don't filter with "that can't matter" — the filtered one usually does.
  5. One hypothesis → smallest test. Write it as a sentence: "X is the cause because Y." One variable at a time. If it fails, form a new hypothesis — never stack fixes on fixes. In multi-layer systems (API → service → DB), instrument each boundary and get evidence of which layer breaks before touching code.
  6. Say the root cause in one sentence, then apply the minimal fix and let the test from step 2 turn green. No drive-by cleanups.

Red flags — stop and return to step 1

  • "Let me just try this first and investigate later"
  • "It's probably X, let me fix that"
  • "Change a few places, run the tests once"
  • "I don't fully understand, but this might work"
  • Listing fixes before tracing the data flow

The three-strike rule

Stop after 3 failed fix attempts. It's time to question the architecture, not attempt fix #4 — when every fix surfaces a new symptom somewhere else, the hypothesis isn't wrong, the structure is. Write up hypotheses tried/refuted, report, and confirm direction.

Rationalization Reality
"Simple bug, the process is overkill" Simple bugs have root causes too; the process is fast when it's simple
"No time — patch first" The first patch sets the pattern. Thrashing is slower
"I'll write the test after the fix" A test you never saw fail verifies nothing

Read the full file on GitHub · 48 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. 6d ago First seen · 48 lines · 73 tokens per session scan A 443f55b4eeb4

Subscribe to this mod's changes

debugging is a skill published in the GitHub repository Kimyongari/harness-factory (5 stars, last pushed 29d ago), licensed MIT. It adds 73 tokens to every session and 647 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

incident-triage-harness

Production-style incident triage workflow for logs, metrics, code, safe mitigations, and M3 multimodal visual evidence (screenshots, screen recordings). Use when debugging alerts, regressions, outages, or suspicious runtime behavior.

madebyaris/advance-minimax-m3-cursor-rules · 53 tokens

debugging-strategies

Master systematic debugging techniques, profiling tools, and root cause analysis to efficiently track down bugs across any codebase or technology stack. Use when investigating bugs, performance issues, or unexpected behavior.

wshobson/agents · 43 tokens

sql-optimization-patterns

Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.

wshobson/agents · 44 tokens

parallel-debugging

Debug complex issues using competing hypotheses with parallel investigation, evidence collection, and root cause arbitration. Use this skill when debugging bugs with multiple potential causes, performing root cause analysis, or organizing parallel investigation workflows.

wshobson/agents · 44 tokens

error-handling-patterns

Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.

wshobson/agents · 43 tokens

spark-optimization

Optimize Apache Spark jobs with partitioning, caching, shuffle optimization, and memory tuning. Use when improving Spark performance, debugging slow jobs, or scaling data processing pipelines.

wshobson/agents · 37 tokens