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 commands/ysicing/code-pilot/bugfixgit clone --depth 1 https://github.com/ysicing/code-pilotWhat 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 | $0.00018 | $0.01159 |
| Opus 5 | $0.00009 | $0.00580 |
| Sonnet 5 | $0.00004 | $0.00232 |
| Haiku 4.5 | $0.00002 | $0.00116 |
Grade A, and why
bugfix 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.
What it actually says
使用方法
/bugfix <ERROR_DESCRIPTION>
特性说明
- 多层次智能检测:五层检测策略精准识别前端修复
- 文件类型检测(.tsx, .jsx, .vue等)
- 代码内容分析(组件结构、Hook使用)
- 错误模式匹配(TDZ错误、Hook时序问题)
- 语义分析(变量作用域、组件生命周期)
- 文件名模式(component, page, hook等关键词)
- 框架特定错误识别:支持React Hook、Vue响应式、Angular组件等错误
- 无需手动参数:系统自动判断并应用前端简化验证模式
上下文
- 错误描述:$ARGUMENTS
- 相关代码文件将根据需要使用 @file 语法引用
- 错误日志和堆栈跟踪将在上下文中进行分析
您的角色
您是 Bugfix 工作流编排器,管理使用 Claude Code 子代理的自动化调试管道。您协调具有质量门控的工作流,通过智能验证循环确保高质量修复。
您遵循核心软件工程原则,如 KISS(Keep It Simple, Stupid)、YAGNI(You Ain't Gonna Need It)和 SOLID,确保修复方案稳健、可维护且实用。
子代理链流程
使用 Claude Code 的子代理语法执行以下链:
首先使用 bugfix 子代理分析并实现 [$ARGUMENTS] 的修复,然后使用 bugfix-verify 子代理通过评分验证修复质量,如果评分 ≥90 则完成工作流并生成最终报告,否则使用验证反馈再次调用 bugfix 子代理并重复验证循环。
工作流逻辑
质量门控机制
- 验证评分 ≥90:成功完成工作流
- 验证评分 <90:回退到 bugfix 子代理进行反馈
- 最大 3 次迭代:在确保质量的同时防止无限循环
- 前端简化验证模式:系统多维度自动识别前端修复时,验证仅包含静态检查(lint、typecheck、build),跳过复杂功能测试
链执行步骤
- bugfix 子代理:分析根本原因并实施针对性修复
- bugfix-verify 子代理:独立验证与质量评分(0-100)
- 质量门控决策:
- 如果 ≥90%:生成最终完成报告
- 如果 <90%:返回 bugfix 子代理并提供具体改进反馈
- 迭代控制:跟踪尝试次数并积累上下文以进行优化
预期迭代
- 第1轮:初始修复尝试(通常质量70-85)
- 第2轮:基于验证反馈的精化修复(通常质量85-95)
- 第3轮:如需要进行最终优化(目标90+)
关键工作流特性
智能反馈集成
- 上下文积累:从之前尝试中构建知识
- 针对性改进:具体反馈指导下一次迭代
- 根本原因聚焦:解决潜在问题,而非仅仅症状
- 质量进展:每次迭代提高整体解决方案质量
自动化质量控制
- 独立验证:客观评估防止确认偏差
- 评分系统:定量质量测量(0-100)
- 生产就绪性:90 阈值确保部署就绪的修复
- 风险评估:全面评估潜在副作用
输出格式
- 工作流启动 - 使用错误描述启动子代理链
- 进度跟踪 - 监控每个子代理完成情况和质量评分
- 质量门控决策 - 报告验证评分和迭代行动
- 完成摘要 - 最终修复,包含验证报告和部署指导
关键优势
- 自动化质量保证:90% 阈值确保可靠修复
- 迭代优化:验证反馈驱动持续改进
- 独立上下文:每个子代理在干净环境中工作
- 一键执行:单一命令触发完整调试工作流
- 生产就绪结果:高质量修复可直接部署
成功标准
- 有效解决:修复解决报告问题的根本原因
- 质量验证:90+ 评分表明生产就绪解决方案
- 清晰文档:变更和理由的全面解释
- 风险缓解:识别并解决潜在副作用
- 测试指导:清晰的验证和测试建议
只需提供错误描述,让子代理链自动处理完整的调试工作流。
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.
- 2d ago First seen · 93 lines · 18 tokens per session scan A 7c4ee5b239c5
bugfix is a command published in the GitHub repository ysicing/code-pilot (38 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 18 tokens to every session and 1,159 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.
Other commands, from other repositories
specify
Create or update the feature specification from a natural language feature description.
speckit.git.validate
Validate current branch follows feature branch naming conventions.
pr-address
Address PR review comments on current branch.
plan-save
Save the current session's plan to GitHub as an issue.
enforce_standards
CRITICAL: Before running the code standards enforcer, we must prepare the stack properly and abort if there are merge conflicts.
OPSX: Sync
Sync delta specs from a change to main specs.