forge-bugfix

forge-bugfix is a skill for Claude Code from yike-gunshi/forge-skills. It costs 153 tokens per session (3,825 once invoked), scanned A, original, MIT.

A structured bug-fixing process that investigates one problem at a time, records evidence, tests the fix, and waits for the user's final acceptance.

In plain words
What is it for?
Use it to investigate, repair, test, document, and hand over individual bugs while keeping unrelated findings in a separate backlog.
Why use it?
It prevents guesswork, mixed-up fixes, and undocumented changes by requiring root-cause analysis, isolated workspaces, test evidence, quality checks, and separate tracking for newly discovered issues.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the TodoWrite tool.

Good fit Use it to investigate, repair, test, document, and hand over individual bugs while keeping unrelated findings in a separate backlog.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yike-gunshi/forge-skills/forge-bugfix
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 yike-gunshi/forge-skills --skill forge-bugfix
Clone the repo
git clone --depth 1 https://github.com/yike-gunshi/forge-skills

Made for: Claude Code.

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 forge-bugfix

README.md
[![agentmods](https://agentmods.dev/badge/skills/yike-gunshi/forge-skills/forge-bugfix/github.svg)](https://agentmods.dev/skills/yike-gunshi/forge-skills/forge-bugfix)
Your own site
<a href="https://agentmods.dev/skills/yike-gunshi/forge-skills/forge-bugfix"><img src="https://agentmods.dev/badge/skills/yike-gunshi/forge-skills/forge-bugfix/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 forge-bugfix

Your own site · 80×15
<a href="https://agentmods.dev/skills/yike-gunshi/forge-skills/forge-bugfix"><img src="https://agentmods.dev/badge/skills/yike-gunshi/forge-skills/forge-bugfix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 153 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,825 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.00153 $0.03825
Opus 5 $0.00077 $0.01912
Sonnet 5 $0.00031 $0.00765
Haiku 4.5 $0.00015 $0.00382

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

Security

Grade A, and why

forge-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 10d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/get-session-id.sh, scripts/validate-bugfix-report.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/forge-bugfix/SKILL.md · 179 lines

How it starts

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

文档落地路径:遵循 forge-doc-policy 规范。完整白名单 + frontmatter schema 见 ~/.claude/skills/forge-doc-policy/doc-paths.md当前文档加载顺序:先读项目 CLAUDE.mddocs/README.mddocs/INDEX.mddocs/QA.md / docs/ENGINEERING.md 相关当前真相源,再读活跃 BF 报告和 backlog。 历史 BF 报告在 docs/archive/raw/bugfix-reviews/,只作追溯证据。 详细规则见 ~/.claude/skills/_shared/current-doc-loading.md

/forge-bugfix:一次一 bug + Bug 修复验收报告

设计哲学

短会话、单 bug 隔离、结构化证据、可追溯、可丢弃。

核心机制:

  • Bug 修复验收报告:每个 bug 从登记/领取开始就创建活跃报告 docs/bugfix/reviews/BF-XX.mdstatus: draft
    • 发现时:记录来源、现象、初始截图/日志、关联 Feature Spec
    • 修复时:记录 worktree、TDD 红绿证据、根因、commit、涉及文件
    • QA 时:forge-qa 回填前后端地址、环境身份校验、逐步截图、深度断言
    • 人工验收时:用户只看"人工验收指南"和同一组验收地址,填最终结论
    • 结案后:移动到 docs/archive/raw/bugfix-reviews/status: archive),backlog 保留链接
  • 两种验收节奏
    • 单 bug 模式:QA 全过后立即进入 P6.5,等用户验收该 bug
    • QA 自动闭环 / 批量模式:单 bug QA 通过后标记 qa-pass-pending-final-review,最后由批次汇总统一交给用户验收
  • 新发现必须分流(禁止顺手修):
    • 原 bug 未 Pass 前:只记录为“待确认新发现”,不进入当前修复
    • 原 bug 已 Pass 后:先明确告知用户“本次 bug 修复已完成”,再询问是否写入文档
    • 用户确认后,独立 bug → docs/bugfix/backlog.md 的待修区,分配 BF-XX 编号
    • 用户确认后,新需求 → docs/bugfix/backlog.md 的新需求区,建议 /forge-prd 立项
    • 用户确认后,模糊反馈 → docs/bugfix/backlog.md 的待澄清区
    • 同根(并入当前修复)→ AI 必须举证(同文件/同函数/同数据流的具体证据),举证不通过默认独立 bug
  • Pass 边界接力
    • 只要原 bug 已 Pass,不论新问题来自用户验收、QA 发现,还是 AI 在修复中发现的衍生问题,都不得继续修
    • AI 必须先说清楚:原 bug 已收敛、证据是什么、当前修复到此关闭
    • 再问用户:是否把新问题更新到 docs/bugfix/backlog.md / 报告中
    • 用户确认后,AI 完成 P7.5 分流,并给一段简短接力 prompt,让用户开另一个会话继续
  • 下一个 bug 默认建议新会话或 /clear、/compact
    • 上下文干净 + 边界清晰 + 避免长会话的 scope 蔓延
    • 除非用户明确要共因地一起修

演进历史和设计决策背景见 forge-cookbook/docs/forge-bugfix-changelog.md

铁律

  1. 不做根因分析,就不写修复代码。 直觉再强也要先验证。
  2. 每次只修 1 bug,或 1-2 个经 P4.5 确认共因的 bug。其余进 docs/bugfix/backlog.md
  3. 每个 bug 独立 worktree + 独立 TDD + 独立 commit + 独立 QA 回归。批量只做编排,不合并工程单元。
  4. 修完不自动合并,必须等用户填完单 bug 或批次最终验收结论。
  5. 没有活跃 Bug 修复验收报告不算完。每个 BF 编号必须先有 docs/bugfix/reviews/BF-XX.md,经 forge-qa 和用户/批次两层验收后才进 P7;P8 结案时归档到 docs/archive/raw/bugfix-reviews/
  6. 新发现的 bug / 新需求 / 模糊反馈 → 原 bug Pass 后询问是否写入 docs/bugfix/backlog.md,绝不在当前修复内夹带。
  7. 同根判定必须举证。AI 声称"这条新发现是当前 bug 同根"时,必须列出具体证据(同文件、同函数、同数据流),证据不足默认为独立 bug。
  8. 并行协调必须登记(v6.0)。P2 确认范围 + P3 创建 worktree 之后,必须在项目根 .forge/active.md 追加一行会话登记;P2 推荐前必须读 .forge/active.md 做功能域判重;P7 合并前必须跑 git merge --no-commit --no-ff 预演。清理 active 的责任在 forge-fupan 或 /forge-status,不在 forge-bugfix 自己。
  9. 自动闭环有上限。同一 bug 连续回修失败 3 次,或遇到需求/设计/环境身份不确定,必须标记 blocked-human 并让用户判断,禁止无限循环。
  10. 生产写面先取授权(账本复发 5 次后固化,2026-07-17)。P2 范围确认时同步枚举本次修复预计触碰的仓库外写面(DB 写 / 部署 / 第三方账号写 / self-merge;判断标准:动作对象不在本仓库工作区内),一次性列清单向用户取点名授权,需要时请用户亲手在 .claude/settings.local.json 预置 allow 规则(AI 代改会被反自授权拦截);禁止逐次撞权限门后原样重试。

Read the full file on GitHub · 179 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. 10d ago First seen · 179 lines · 153 tokens per session scan A ecf30f23caf1

Subscribe to this mod's changes

forge-bugfix is a skill published in the GitHub repository yike-gunshi/forge-skills (13 stars, last pushed 1mo ago), licensed MIT. It adds 153 tokens to every session and 3,825 once invoked, about $0.0008 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

paired-probe

Refuse a verdict a probe did not earn. Runs a check where the fault IS present and where it is NOT, and blocks the answer when both arms print the same thing, because a check that cannot disagree with you has measured nothing. Also catches the zero-sample sweep that reads as "clean" and the swallowed error that reads…

yonatangross/orchestkit · 100 tokens

repair-rpc-regression

Input: an observed bug with actual and expected wire values, optionally the method name and the protocol/reference behavior.

evmts/tevm · 0 tokens

conformance-triage

Input: a failing Guillotine Mini fixture identifier and optional suite.

evmts/tevm · 0 tokens

autonomous-tdd-debugger

Empowers the agent to autonomously run tests, read terminal stack traces, and self-heal code until tests pass. Transforms the agent from a passive coder to an active CI pipeline debugger.

roedyrustam/vibes-plug · 46 tokens

crucible-audit

Forensic test-quality audit that detects test fraud — hollow assertions, coverage-omit gaming, mock proliferation, dead/gated tests, untested entry points, and README badge inflation that produce false green signals. Use when asked to "run a CRUCIBLE audit", "check/audit test quality", "find silent failures", "find…

nxtg-ai/forge-plugin · 120 tokens

Runtime Validation

Catch the bugs a green test suite misses by observing REAL runtime behavior — tail application logs during test/server runs, validate API responses against their schema contracts, and assert data-integrity invariants (density ≤ 1.0, %≤100, referential integrity). Use when unit tests pass 100% but the running app still…

nxtg-ai/forge-plugin · 132 tokens