debug-agent

A debugging workflow that uses runtime logs—records produced while a program runs—to test possible causes of a bug and identify the confirmed root cause.

In plain words
What is it for?
Use it to investigate bugs in applications, services, command-line tools, or browser behavior. It helps create reproductions, add temporary NDJSON logs, analyze results, and iterate toward a proven cause.
Why use it?
It reduces guesswork when code inspection alone cannot explain unexpected behavior. Evidence from a reproduction shows which explanation is actually correct.

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/millionco/debug-agent/skill
Any agent
npx skills add millionco/debug-agent --skill skill
Clone the repo
git clone --depth 1 https://github.com/millionco/debug-agent

Made for: Claude Code, Codex.

Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,018 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.00060 $0.03018
Opus 5 $0.00030 $0.01509
Sonnet 5 $0.00012 $0.00604
Haiku 4.5 $0.00006 $0.00302

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

Security

Grade A, and why

debug-agent 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 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.

Makes network callslowCapability

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

- **If reproduction is straightforward** (e.g., a single CLI command, a curl request, a simple script): write and run an ad hoc reproduction script yourself. Tailor it to the runtime — Playwright/Puppeteer for browser bu
packages/debug-agent/skill/SKILL.md · 233 lines

How it starts

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

Debug Mode

You are now in DEBUG MODE. You must debug with runtime evidence.

Why this approach: Traditional AI agents jump to fixes claiming 100% confidence, but fail due to lacking runtime information. They guess based on code alone. You cannot and must NOT fix bugs this way — you need actual runtime data.

Your systematic workflow:

  1. Generate 3-5 precise hypotheses about WHY the bug occurs (be detailed, aim for MORE not fewer)
  2. Instrument code with logs (see Logging section) to test all hypotheses in parallel
  3. Reproduce the bug.
    • If a failing test already exists: run it directly.
    • If reproduction is straightforward (e.g., a single CLI command, a curl request, a simple script): write and run an ad hoc reproduction script yourself. Tailor it to the runtime — Playwright/Puppeteer for browser bugs, a Node/Python/shell script for backend bugs, etc.
    • Otherwise: ask the user to reproduce it. Provide clear, numbered steps. Remind them to restart apps/services if instrumented files are cached or bundled. Offer: "If you'd like me to write a reproduction script instead, let me know."
    • Once the user confirms a reproduction pathway (manual or automated), reuse it for all subsequent iterations without re-asking.
  4. Analyze logs: evaluate each hypothesis (CONFIRMED/REJECTED/INCONCLUSIVE) with cited log line evidence
  5. Fix only with 100% confidence and log proof; do NOT remove instrumentation yet
  6. Verify with logs: ask user to run again, compare before/after logs with cited entries
  7. If logs prove success and user confirms: remove all instrumentation by searching for #region debug log / #endregion markers and deleting those blocks (see Cleanup section). If failed: FIRST remove any code changes from rejected hypotheses (keep only instrumentation and proven fixes), THEN generate NEW hypotheses from different subsystems and add more instrumentation
  8. After confirmed success: explain the problem and provide a concise summary of the fix (1-2 lines)

Critical constraints:

  • NEVER fix without runtime evidence first
  • ALWAYS rely on runtime information + code (never code alone)
  • Do NOT remove instrumentation before post-fix verification logs prove success and user confirms that there are no more issues
  • Fixes often fail; iteration is expected and preferred. Taking longer with more data yields better, more precise fixes

Read the full file on GitHub · 233 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 · 233 lines · 60 tokens per session scan A 86cdbb0fea28

Subscribe to this mod's changes

debug-agent is a skill published in the GitHub repository millionco/debug-agent (302 stars, last pushed 3mo ago), licensed MIT. It adds 60 tokens to every session and 3,018 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

edulab

面向中高考数学的可视化解题工具:空间几何题生成可交互 3D 解题演示(建系向量法 + sympy 校验 + Three.js),函数表达式生成参数可控的 2D 图形(滑块实时联动)。触发词 /edulab。.

renky1025/agent-skills · 76 tokens

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a…

jihe520/social-push · 108 tokens

perplexity-webui-search

Use when the user asks to search Perplexity, query Perplexity through the web UI, perform web research with Perplexity, save a Perplexity answer as Markdown, or retrieve a Perplexity answer through browser automation.

sofianbll/pplx-web-query · 55 tokens

social-push

使用 agent-browser 帮用户将内容发到社交媒体上。当用户需要发布内容、推送文章、上传文章、发帖到社交平台时使用此 skill。.

jihe520/social-push · 42 tokens

taoguba-crawler

This skill should be used when the user asks to "crawl taoguba", "crawl tgb", "scrape taoguba articles", "run the crawler", "crawl bbs", "crawl home page", "generate article HTML", or needs to run the Taoguba (tgb.cn) web crawlers.

lisniuse/taoguba-crawler-skill · 72 tokens

dashi-ppt

制作 PPT、演示文稿、幻灯片、汇报材料时使用。Dashi PPT 基于预置视觉主题组合页面,生成可离线打开、可在浏览器编辑的 HTML 演示,支持导出 PPTX / PDF 文件。.

johnson7788/skill-ppt-agents · 61 tokens