debugging

debugging is a skill for Claude Code, Codex from laonayan/tdd-mcp-server. It costs 28 tokens per session (567 once invoked), scanned A, original, MIT.

A structured method for finding the cause of failed tests, unexpected behaviour, or intermittent defects.

In plain words
What is it for?
Creating small reproductions, narrowing problems with logs or history searches, writing regression tests, making minimal fixes, and rerunning the full test suite.
Why use it?
It replaces guess-and-check changes with reproduction, isolation, root-cause analysis, and verification.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Creating small reproductions, narrowing problems with logs or history searches, writing regression tests, making minimal fixes, and rerunning the full test suite.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/laonayan/tdd-mcp-server/debugging
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.

Any agent
npx skills add laonayan/tdd-mcp-server --skill debugging
Clone the repo
git clone --depth 1 https://github.com/laonayan/tdd-mcp-server

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/laonayan/tdd-mcp-server/debugging/github.svg)](https://agentmods.dev/skills/laonayan/tdd-mcp-server/debugging)
Your own site
<a href="https://agentmods.dev/skills/laonayan/tdd-mcp-server/debugging"><img src="https://agentmods.dev/badge/skills/laonayan/tdd-mcp-server/debugging/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for debugging

Your own site · 80×15
<a href="https://agentmods.dev/skills/laonayan/tdd-mcp-server/debugging"><img src="https://agentmods.dev/badge/skills/laonayan/tdd-mcp-server/debugging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 567 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00028 $0.00567
Opus 5.5 $0.00011 $0.00227
Sonnet 5.5 $0.00006 $0.00113
Haiku 4.5 $0.00003 $0.00057

Measured 4d ago against content hash bb96d484c76f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 4d 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.

skills/debugging/SKILL.md · 68 lines

What it actually says

系统化调试指南

适用场景

测试失败、行为异常、间歇性缺陷。核心原则:先理解,再修复——禁止"试一下改改看"。

四阶段流程

Phase 1: 重现(Reproduce)

  • 建立最小可重现案例(剥离无关依赖)
  • 确认重现率:100%?偶发?与环境相关?
  • 证据:保存失败测试的完整输出

Phase 2: 定位(Isolate)

二分法缩小范围:

# 二分提交历史
git bisect start && git bisect bad && git bisect good <已知好提交>

# 二分输入数据(最小化触发输入)
  • 加临时日志/断点,观察真实状态而非推测状态
  • 证据:指出确切的文件与行号

Phase 3: 根因(Root Cause)

区分三类原因:

类型 特征 修复策略
实现错误 逻辑与意图不符 修正实现
规格缺失 意图本身不明 先补测试定义预期行为
环境问题 本地过/CI 挂 对齐环境,勿改产品代码迁就

问三次"为什么":直接原因 → 促成条件 → 系统性缺口。

Phase 4: 修复与验证(Fix & Verify)

  1. 先写一个会失败的测试复现该缺陷(回归测试)
  2. 确认测试失败(RED)
  3. 修复(最小改动)
  4. 确认新测试通过 + 全量测试通过(GREEN)
  5. 删除临时日志

防御加固(Defense in Depth)

修复后检查同类风险:

  • 相同模式还存在于哪些调用点?
  • 是否应该加一个校验/断言防止复发?
  • 是否值得在 AGENTS.md 或技能文档记录此坑?

反模式(禁止)

  • ❌ 不重现就改代码
  • ❌ 用 try/catch 吞掉异常让测试"变绿"
  • ❌ 放宽断言迁就错误行为
  • ❌ 修复后只跑单个测试不跑全量
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. 4d ago First seen · 68 lines · 28 tokens per session scan A bb96d484c76f

Subscribe to this mod's changes

debugging is a skill published in the GitHub repository laonayan/tdd-mcp-server (2 stars, last pushed yesterday), licensed MIT. It adds 28 tokens to every session and 567 once invoked, about $0.0001 per session on Opus 5.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-11-12.

Related

debugging compared with skills from other repositories

debugging next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
debugginglaonayan/tdd-mcp-serverSkill2yesterdayMITA28Claude Code, Codex
systematic-debuggingopen-metadata/OpenMetadataSkill16ktodayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7k2d agoMITA71Claude Code, Codex
cwv-optimizeradobe/skillsSkill329yesterdayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2ktodayApache-2.0A15Claude Code, Codex
self-healhristo2612/jinnSkill3293d agoMITA19Claude Code, Codex
diagnosing-missing-recordingsPostHog/posthogSkill41ktodaynoneA76Claude Code, Codex