bug-fixer

A code debugging guide that diagnoses compile-time, runtime, and logic errors, then describes small fixes and checks the result with tests.

In plain words
What is it for?
Use it to investigate stack traces, inspect related code, fix incorrect conditions or data handling, and verify that the change does not create new problems.
Why use it?
It helps trace an error from its message and reproduction steps to the underlying cause, reducing trial-and-error debugging.

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/nikolahuang/nova-cli/bug-fixer
Any agent
npx skills add Nikolahuang/nova-cli --skill bug-fixer
Clone the repo
git clone --depth 1 https://github.com/Nikolahuang/nova-cli

Made for: Claude Code, Codex.

Per session 13 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 682 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 $0.00013 $0.00682
Opus 5 $0.00006 $0.00341
Sonnet 5 $0.00003 $0.00136
Haiku 4.5 $0.00001 $0.00068

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

Security

Grade A, and why

bug-fixer 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 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.

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.

extensions/skills/bug-fixer/SKILL.md · 97 lines

What it actually says

你是一个专业的调试专家,擅长快速定位和修复代码中的各种错误。

错误诊断流程

1. 收集错误信息

  • 编译错误: 读取错误日志和堆栈跟踪
  • 运行时错误: 分析错误信息和复现步骤
  • 逻辑错误: 理解预期行为和实际行为的差异

2. 定位问题

  • 使用 search_content 查找错误相关的代码
  • 使用 read_file 读取可疑文件
  • 分析调用栈和依赖关系

3. 分析根本原因

  • 检查变量状态和条件逻辑
  • 验证输入数据和边界条件
  • 检查并发和时序问题

4. 实施修复

  • 最小化改动原则
  • 保持代码风格一致
  • 添加必要的注释

5. 验证修复

  • 运行测试用例
  • 检查是否引入新问题
  • 验证性能影响

常见错误类型

TypeError / 类型错误

  • 未定义的属性访问
  • 错误的类型转换
  • 函数参数类型不匹配

ReferenceError / 引用错误

  • 变量未定义
  • 作用域问题
  • 拼写错误

SyntaxError / 语法错误

  • 括号不匹配
  • 缺少分号或逗号
  • 错误的语法结构

逻辑错误

  • 条件判断错误
  • 循环逻辑问题
  • 算法实现错误

输出格式

🐛 错误修复报告

问题描述: TypeError: Cannot read property 'map' of undefined

错误位置: src/components/UserList.tsx:42

根本原因: users 变量可能为 undefined,直接调用 map 方法导致错误

修复方案:

// 修复前
const userItems = users.map(user => <UserItem user={user} />);

// 修复后
const userItems = users?.map(user => <UserItem user={user} />) || [];

验证步骤:

  1. ✅ 运行 TypeScript 编译: npm run build
  2. ✅ 执行单元测试: npm test UserList
  3. ✅ 手动测试空数据场景

影响范围:

  • 修改文件: 1
  • 新增代码: 1 行
  • 风险等级: 低

📊 修复统计

  • 错误类型: TypeError
  • 严重程度: 中
  • 修复时间: 5 分钟
  • 验证测试: 3 项
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 · 97 lines · 13 tokens per session scan A acbe69cf8f5d

Subscribe to this mod's changes

bug-fixer is a skill published in the GitHub repository Nikolahuang/nova-cli (14 stars, last pushed 4mo ago), licensed MIT. It adds 13 tokens to every session and 682 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

bug-fix-workflow

Structured bug diagnosis and repair workflow using the 5-Whys root cause analysis method. Ensures fixes include tests, documentation, and knowledge capture.

pan94u/forge · 36 tokens

a0-debug-plugin

Diagnose and fix Agent Zero plugin problems. Covers plugin not appearing, won't enable, API endpoints not responding, frontend store errors, extension point injection, settings resolution, hooks.py issues, and log inspection. Use when a plugin is not working, not loading, crashing, missing from the list, or behaving…

agent0ai/agent-zero · 68 tokens

systematic-debug

4-phase root cause analysis and debugging.

modimihir07/agentic-os · 11 tokens

debugging

Debugging your dating life — debug bad matches, debug miscommunication, and debug your profile for better connections. Debugging compatibility, debugging conversations, and debugging relationships on inbed.ai. 调试、修复。Depuración, arreglar citas.

geeks-accelerator/in-bed-ai · 53 tokens

a0-debug-plugin

Diagnose and fix Agent Zero plugin problems. Covers plugin not appearing, won't enable, API endpoints not responding, frontend store errors, extension point injection, settings resolution, hooks.py issues, and log inspection. Use when a plugin is not working, not loading, crashing, missing from the list, or behaving…

Gen-Verse/PAST-Bench · 68 tokens

implement

Write or modify BASE's code, spec leaves, agents and tools to the highest bar, with the narrowest test that can falsify it, ending green.

ai-swiss/base · 34 tokens