forge-fix

forge-fix is a skill for Claude Code from XRenSiu/claude-code-forge. It costs 134 tokens per session (4,620 once invoked), scanned A, original, MIT.

A focused workflow for fixing a known software bug: investigate possible causes, apply a test-driven fix, verify it independently, and repeat if needed. TDD means writing a failing test first, then changing the code until the test passes.

In plain words
What is it for?
Use it for a reported bug, an error log, or a file path that needs repair. It supports a quick route for simple bugs and repeated fix-and-check cycles for harder ones.
Why use it?
It gives a bug its own investigation and verification cycle instead of requiring the full product-development process. It helps with intermittent failures by testing competing explanations.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the forge-teams plugin — 7 skills, 20 agents shipped together

Good fit Use it for a reported bug, an error log, or a file path that needs repair. It supports a quick route for simple bugs and repeated fix-and-check cycles for harder ones.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xrensiu/claude-code-forge/fix-bug-loop
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 XRenSiu/claude-code-forge --skill fix-bug-loop
Clone the repo
git clone --depth 1 https://github.com/XRenSiu/claude-code-forge

Made for: Claude Code.

Or install forge-teams, the plugin that ships this one along with the rest of its 7 skills, 20 agents.

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-fix

README.md
[![agentmods](https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/fix-bug-loop/github.svg)](https://agentmods.dev/skills/xrensiu/claude-code-forge/fix-bug-loop)
Your own site
<a href="https://agentmods.dev/skills/xrensiu/claude-code-forge/fix-bug-loop"><img src="https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/fix-bug-loop/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-fix

Your own site · 80×15
<a href="https://agentmods.dev/skills/xrensiu/claude-code-forge/fix-bug-loop"><img src="https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/fix-bug-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,620 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.00134 $0.04620
Opus 5.5 $0.00054 $0.01848
Sonnet 5.5 $0.00027 $0.00924
Haiku 4.5 $0.00013 $0.00462

Measured 1mo ago against content hash 5f7b39f6d699, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

forge-fix 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 1mo 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.

plugins/forge-teams/skills/fix-bug-loop/SKILL.md · 511 lines

How it starts

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

Forge Fix - 独立 Bug 修复

描述 bug → 对抗调试定位根因 → TDD 修复 → 独立验证 → 循环直到修好。

这是 forge-teams 的独立 bug 修复入口。复用已有的对抗调试引擎(hypothesis-investigator、devils-advocate、evidence-synthesizer、issue-fixer),但提供独立编排、快速路径分流和三层迭代控制。

Announce at start: "I'm using the forge-fix skill to create an agent team that will locate and fix this bug through adversarial debugging and TDD."

前置条件: 需要启用 Agent Teams 实验性功能。 在 settings.json 中添加: "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" }

用法

/forge-fix <bug-description> [options]

参数说明

参数 说明 默认值
<bug-description> bug 描述(文本、文件路径、或错误日志) 必填
--loop <N> 最大修复-验证循环次数 3
--quick 快速路径:跳过对抗调试,直接用 issue-fixer 修复(适用于简单 bug) 不启用
--team-size <size> 假设调查团队规模(small=3 假设, medium=4, large=5) medium
--no-verify 修复后跳过独立验证(不推荐) 启用验证

示例

# 直接描述 bug
/forge-fix "支付回调间歇性超时,大约每10次失败2次"

# 简单 bug,快速路径
/forge-fix "登录页面 CSS 错位" --quick

# 复杂 bug,加大团队 + 增加循环
/forge-fix "高并发下 Redis 连接池泄漏" --team-size large --loop 5

# 从错误日志修复
/forge-fix "npm test 报错: TypeError: Cannot read property 'id' of undefined at src/user.ts:42"

输出目录

docs/forge-fix/
└── [bug-slug]-[timestamp]/
    ├── intake.md              # 问题信息收集
    ├── hypotheses.md          # 假设列表(非 quick 模式)
    ├── debate-log.md          # 对抗辩论记录(非 quick 模式)
    ├── verdict.md             # 根因判定
    ├── fix-report.md          # TDD 修复报告
    ├── verification.md        # 独立验证报告
    └── summary.md             # 最终修复摘要

Quick vs Full Path Decision (快速路径分流)

用户描述 bug
    │
    ├── --quick 指定 → 快速路径
    │
    └── 未指定 → Lead 评估复杂度
        │
        ├── 简单信号 → 建议快速路径(用户确认)
        │   - 单文件、单函数问题
        │   - 错误信息直接指向根因(如 TypeError at file:line)
        │   - 纯 UI/CSS 问题
        │   - typo 或明显逻辑错误
        │
        └── 复杂信号 → 完整对抗调试路径
            - 间歇性故障
            - 多个可能根因
            - 涉及并发/状态/竞态
            - 跨模块/跨服务
            - "时有时无"、"偶尔"、"不稳定"

Quick Path (快速路径)

Read the full file on GitHub · 511 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. 1mo ago First seen · 511 lines · 134 tokens per session scan A 5f7b39f6d699

Subscribe to this mod's changes

forge-fix is a skill published in the GitHub repository XRenSiu/claude-code-forge (2 stars, last pushed 29d ago), licensed MIT. It adds 134 tokens to every session and 4,620 once invoked, about $0.0005 per session on Opus 5.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-31.