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.
npx agentmods add skills/kimyongari/harness-factory/debuggingnpx skills add Kimyongari/harness-factory --skill debugginggit clone --depth 1 https://github.com/Kimyongari/harness-factoryWrote 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.
[](https://agentmods.dev/skills/kimyongari/harness-factory/debugging)<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>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.
| Model | Per session | Once 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 |
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.
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)
- Read the error to the end. Stack traces from the bottom (origin) up. The answer is often already there.
- 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.
- 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. - 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.
- 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.
- 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 |
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.
- 6d ago First seen · 48 lines · 73 tokens per session scan A 443f55b4eeb4
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.
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.
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.
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.
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.
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.
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.