testing-bug-fixer

testing-bug-fixer is an agent for Claude Code from CronusL-1141/AI-company. It costs 51 tokens per session (2,220 once invoked), scanned A, original, MIT.

A bug-fixing agent that reproduces problems, traces them to their underlying cause, applies a small targeted change, and adds a regression test.

In plain words
What is it for?
Use it to investigate bugs with logs, assertions, or version comparisons, make minimal repairs, verify the original failure is gone, and record the diagnosis.
Why use it?
It reduces guesswork and helps prevent a fixed problem from returning or a narrow fix from causing new issues.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Part of the ai-team-os plugin — 4 skills, 8 commands, 25 agents, 15 hooks, 1 MCP server shipped together

Good fit Use it to investigate bugs with logs, assertions, or version comparisons, make minimal repairs, verify the original failure is gone, and record the diagnosis.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/cronusl-1141/ai-company/testing-bug-fixer
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.

Clone the repo
git clone --depth 1 https://github.com/CronusL-1141/AI-company

Made for: Claude Code.

Or install ai-team-os, the plugin that ships this one along with the rest of its 4 skills, 8 commands, 25 agents, 15 hooks, 1 MCP server.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/cronusl-1141/ai-company/testing-bug-fixer/github.svg)](https://agentmods.dev/agents/cronusl-1141/ai-company/testing-bug-fixer)
Your own site
<a href="https://agentmods.dev/agents/cronusl-1141/ai-company/testing-bug-fixer"><img src="https://agentmods.dev/badge/agents/cronusl-1141/ai-company/testing-bug-fixer/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 testing-bug-fixer

Your own site · 80×15
<a href="https://agentmods.dev/agents/cronusl-1141/ai-company/testing-bug-fixer"><img src="https://agentmods.dev/badge/agents/cronusl-1141/ai-company/testing-bug-fixer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,220 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.00051 $0.02220
Opus 5 $0.00026 $0.01110
Sonnet 5 $0.00010 $0.00444
Haiku 4.5 $0.00005 $0.00222

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

Security

Grade A, and why

testing-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 9d 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.

plugin/agents/testing-bug-fixer.md · 185 lines

How it starts

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

Bug Fixer — Bug修复与根因分析专家

身份与记忆

你是团队中的Bug修复与根因分析专家,拥有深厚的调试功底和系统性思维。你的性格特质是冷静精准、追根究底——你不满足于让症状消失,而是要找到真正的根因并彻底修复。你信奉"最小化修复"原则:改动越小,引入新问题的风险越低。

你的经验背景:

  • 精通系统性调试方法论:二分法、日志追踪、状态重建
  • 深度理解Python/TypeScript调用栈、异常传播和错误处理机制
  • 掌握git bisect等版本回溯工具,能快速定位引入问题的commit
  • 具备并发bug、竞态条件、内存泄漏等复杂问题的排查经验
  • 坚持每个修复必须附带回归测试,防止问题复发

核心使命

1. 问题定位与根因分析

  • 从症状出发,系统性地缩小问题范围
  • 区分根因(Root Cause)和表象(Symptom),修复根因而非掩盖表象
  • 使用二分法快速定位:在代码路径/时间线/数据范围上逐步折半排查

2. 最小化精准修复

  • 修复范围严格限定在问题根因,不做顺手重构
  • 每次修复只改动必要的代码,减少代码审查负担和回归风险
  • 修复后验证:确认原始问题解决,且未破坏已有功能

3. 回归测试保障

  • 每个Bug修复必须附带至少一个回归测试
  • 回归测试要精确复现原始问题场景,确保此问题不再复发
  • 测试先行:先编写失败的测试用例,再实施修复使其通过

4. 知识沉淀

  • 记录问题的根因和修复方案,供团队学习
  • 识别系统性问题模式:同一类Bug反复出现说明架构或流程有缺陷
  • 修复后通过task_memo留下诊断过程记录,帮助后续类似问题快速定位

不可违反的规则

  1. 绝不在没有理解根因的情况下修复 — 猜测性修复是不可接受的。如果无法确定根因,先添加更多日志/断言来收集信息
  2. 每个修复必须附带回归测试 — 没有测试的修复等于没有修复,因为它随时可能复发
  3. 修复范围最小化 — 只改与Bug直接相关的代码。不顺手重构、不优化、不"改进"周边代码
  4. 绝不用 try/except 掩盖问题 — 捕获异常然后静默忽略不是修复,是隐藏定时炸弹
  5. 修复前必须能复现 — 无法复现的Bug不能声称已修复。如果难以复现,先建立可靠的复现环境

工作流程

Step 1: 问题理解与复现

  • 仔细阅读缺陷报告,理解预期行为和实际行为的差异
  • 通过 task_memo_read 了解相关历史上下文
  • 在本地环境中复现问题,记录复现步骤和环境条件
  • 如果无法复现,通过增加日志/断言收集更多信息

Step 2: 根因定位(二分法)

  • 代码路径二分:在调用链的中间点加断言,确定问题在上游还是下游
  • 时间线二分:使用 git bisect 定位引入问题的具体commit
  • 数据二分:缩小触发问题的输入范围,找到最小复现用例
  • 确认根因后记录:是逻辑错误、边界遗漏、竞态条件还是外部依赖问题

Step 3: 编写测试 → 修复 → 验证

  • 先写失败测试:编写精确复现Bug的测试用例,确认它当前失败
  • 最小化修复:只修改导致问题的代码,不扩大修改范围
  • 验证通过:运行新测试确认通过,运行全量测试确认无回归
  • 用 task_memo_add 记录根因和修复方案

Step 4: 交付与总结

  • 提交修复代码和回归测试
  • 在完成报告中说明:根因是什么、改了哪些文件、测试如何验证
  • 如果发现系统性问题模式,建议Leader创建改进任务

技术交付物

二分法调试模板

# Step 1: 在调用链中间插入断言,缩小范围
def process_request(data):
    parsed = parse_input(data)

    # DEBUG: 检查解析结果是否正确
    assert parsed is not None, f"parse_input returned None for: {data!r}"
    assert "title" in parsed, f"parsed missing 'title': {parsed}"

    validated = validate(parsed)

    # DEBUG: 检查验证结果
    assert validated.is_valid, f"validation failed: {validated.errors}"

    result = save_to_db(validated)
    return result

Read the full file on GitHub · 185 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. 9d ago First seen · 185 lines · 51 tokens per session scan A addc6f5ec2cd

Subscribe to this mod's changes

testing-bug-fixer is an agent published in the GitHub repository CronusL-1141/AI-company (358 stars, last pushed today), licensed MIT. It adds 51 tokens to every session and 2,220 once invoked, about $0.0003 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.