Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

fix-bug修复错误

Agent Skill

fix-bug 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

539

周安装

22

GitHub Stars

18

下载量

172
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:fix-bug(修复错误)
来源仓库:https://github.com/arjenschwarz/agentic-coding
仓库路径:skills/fix-bug
安装命令:
npx skills add https://github.com/arjenschwarz/agentic-coding --skill fix-bug
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/arjenschwarz/agentic-coding --skill fix-bug

简介

Fix Bug 系统化修复缺陷,复杂问题提供多种实现方案择优选用。

  • 自动关联 Jira 工单 T-num 并创建对应修复分支。
  • 确保修复后测试覆盖率不降低且文档同步更新。
  • 简单 bug 直接修复,复杂问题采用 A/B 实现对比。
  • 完成后自动移动工单状态并通知相关人员。fix-bug 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Bug Fix Workflow

Fix bugs systematically while ensuring proper test coverage and documentation. Simple bugs are fixed directly; complex bugs get multiple competing implementations to find the best solution.

Transit Integration

If a T-[number] ticket is mentioned (e.g., T-42), track it throughout the workflow:

  • Extract the display ID from the reference
  • Automatically create a branch named T-{number}/bugfix-{bug-name} (no user prompt needed)
  • Move the ticket to in-progress status after branch creation. Add a comment: "Starting bugfix — investigating on branch T-{number}/bugfix-{bug-name}"
  • Move the ticket to ready-for-review status after the PR is created. Add a comment: "Fix ready for review — PR #{pr-number}"

Use mcp__transit__update_task_status with the display ID to update status. Always include a comment when changing status.

If no Transit ticket is mentioned, skip all Transit-related steps.

Workflow

1. Bug Name

Determine a concise, descriptive bug name (kebab-case) for the report directory. Derive from the issue description or ask the user if unclear.

2. Branch Creation

When a Transit ticket is present: If the current branch already matches T-{number}/bugfix-* (e.g., in a worktree), skip branch creation. Otherwise, automatically create a branch named T-{number}/bugfix-{bug-name} and switch to it. Do not ask for permission. Move the ticket to in-progress status.

When no Transit ticket is present: Use AskUserQuestion to offer branch naming options:

  • bugfix/{bug-name} - Standard bugfix branch
  • Skip branch creation

3. Systematic Investigation

Invoke the systematic-debugger skill to perform structured root cause analysis:

  • Phase 1: Initial Overview (problem statement)
  • Phase 2: Systematic Inspection (identify defects)
  • Phase 3: Root Cause Analysis (Five Whys)
  • Phase 4: Solution & Verification (proposed fixes)

Capture findings for the bugfix report.

4. Create Regression Tests

Before implementing the fix, write tests that prove the bug exists:

  1. Write one or more failing tests that reproduce the bug
  2. Run the tests to confirm they fail as expected — this is the "red" in red/green TDD
  3. These tests become the acceptance criteria: the bug is fixed when they pass

The tests should:

  • Be minimal and focused on the specific bug
  • Include a descriptive name referencing the bug
  • Document the expected vs actual behaviour in comments

Do not implement the fix yet. The tests must fail at this point.

5. Generate Initial Bugfix Report

Create specs/bugfixes/<bug-name>/report.md using the template in references/report-template.md. At this stage the "Resolution" section will be empty — it gets filled in after the fix is implemented.

6. Commit Investigation Checkpoint

Commit everything so far (failing tests + report + any investigation artifacts) using the /commit skill. This creates a clean baseline that competing implementations can branch from.

The commit message should indicate this is the investigation phase, e.g.: T-42: Add investigation report and failing regression tests for {bug-name}

7. Assess Difficulty

Evaluate the bug's complexity based on the investigation findings. Consider:

  • Number of files affected — single file vs cross-cutting changes
  • Root cause clarity — straightforward logic error vs subtle interaction
  • Risk of side effects — isolated change vs changes near critical paths
  • Multiple valid approaches — one obvious fix vs several plausible strategies

Simple bugs (single clear fix, low risk, few files): proceed to Step 8A. Complex bugs (multiple possible approaches, higher risk, cross-cutting, or subtle root cause): proceed to Step 8B.

When in doubt, prefer the complex path — the overhead is small and you get better solutions compared to the risk of a naive fix for something subtle.

8A. Simple Fix (Direct Implementation)

For straightforward bugs:

  1. Implement the fix
  2. Run the regression tests to confirm they now pass (the "green")
  3. Run the full test suite to ensure no breakage
  4. Run linters/validators as per project conventions
  5. Skip to Step 10.

8B. Complex Fix (Competing Implementations)

For complex bugs, spawn multiple agents that independently implement the fix. Each agent works in an isolated worktree branched from the current commit (which has the failing tests).

8B.1 Prepare Implementation Brief

Write a concise implementation brief that all agents receive. Include:

  • The root cause from the investigation (Phase 3 findings)
  • The proposed solution(s) from Phase 4
  • Paths to the failing test files so agents can verify their fix
  • The project's test/lint commands (from Makefile or project conventions)
  • Any constraints or areas to avoid

8B.2 Spawn Competing Agents

Launch 3 agents in parallel, each in its own worktree. Use the exact tools specified below — do not substitute different tools or MCP agents for Agents 1 and 2.

Agent 1 — Primary approach: Call the Agent tool (not an MCP tool) with isolation: "worktree" and subagent_type: "general-purpose". This spawns a Claude subagent in an isolated git worktree. Prompt it to implement the fix following the primary approach from the investigation's Phase 4.

Agent 2 — Alternative approach: Call the Agent tool (not an MCP tool) with isolation: "worktree" and subagent_type: "general-purpose". This spawns a Claude subagent in an isolated git worktree. Prompt it to implement the fix using an alternative strategy — if Phase 4 identified alternatives, use one; otherwise instruct it to find its own approach that differs from Agent 1's.

Agent 3 — Kiro (independent perspective): This is the only agent that uses an MCP tool. Call mcp__devtools__kiro-agent with agent: "kiro" and yolo-mode: true. The agent: "kiro" parameter gives Kiro access to all its skills rather than just the default agent. Since Kiro operates in the current working directory, first create a worktree manually for it:

git worktree add ../{repo-name}-worktrees/fix-{bug-name}-kiro -b fix-{bug-name}-kiro HEAD

Then pass a prompt that includes the implementation brief and instructs Kiro to work in the worktree directory, implement the fix, run the regression tests, and run the full test suite.

To be explicit: Agents 1 and 2 use the Agent tool (subagent_type: "general-purpose", isolation: "worktree"). Only Agent 3 uses mcp__devtools__kiro-agent. Do not use mcp__devtools__codex-agent, mcp__devtools__gemini-agent, or any other MCP agent tool for Agents 1 and 2.

Each agent's prompt should follow this structure:

You are implementing a fix for a bug. Work in {worktree_path}.

## Bug Summary
{root cause from investigation}

## Your Approach
{specific approach for this agent}

## Failing Tests
The following tests reproduce the bug and must pass after your fix:
{test file paths and how to run them}

## Requirements
1. Implement the fix
2. Run the regression tests — they must pass
3. Run the full test suite — no regressions allowed
4. Run linters/validators: {lint commands}
5. Commit your changes with a descriptive message

8B.3 Compare Solutions

After all agents complete, evaluate each solution. Read the diffs and test results from each worktree.

Evaluation criteria (in priority order):

  1. Correctness — do the regression tests pass? Does the full test suite pass?
  2. Minimality — fewer changed lines and files is better, all else being equal
  3. Code quality — readable, follows project conventions, no hacks or workarounds
  4. Safety — low risk of side effects, no changes to unrelated code
  5. Maintainability — would a future developer understand this change easily?

Disqualify any solution where:

  • The regression tests don't pass
  • The full test suite has new failures
  • Linting errors were introduced

If all solutions are disqualified, fall back to Step 8A (implement directly using the best partial solution as guidance).

8B.4 Select and Report

Write a short comparison report at specs/bugfixes/<bug-name>/solution-comparison.md:

# Solution Comparison: {bug-name}

## Candidates

### Agent 1 (primary approach)
- **Files changed:** {list}
- **Lines changed:** +X / -Y
- **Tests:** {pass/fail}
- **Approach:** {one-line summary}

### Agent 2 (alternative approach)
- **Files changed:** {list}
- **Lines changed:** +X / -Y
- **Tests:** {pass/fail}
- **Approach:** {one-line summary}

### Agent 3 (Kiro — independent perspective)
- **Files changed:** {list}
- **Lines changed:** +X / -Y
- **Tests:** {pass/fail}
- **Approach:** {one-line summary}

## Selected: Agent {N}

**Reason:** {2-3 sentences explaining why this solution was chosen}

8B.5 Integrate Chosen Solution

Cherry-pick or rebase the winning agent's commits onto the working branch:

# From the main working directory (not a worktree)
git cherry-pick <commit-hash-from-winning-worktree>

If the winning solution has multiple commits, use:

git cherry-pick <first-commit>^..<last-commit>

After integrating, verify everything still works:

  1. Run the regression tests
  2. Run the full test suite
  3. Run linters/validators

8B.6 Cleanup Worktrees

Remove all competition worktrees:

git worktree remove ../{repo-name}-worktrees/fix-{bug-name}-kiro
# Agent tool worktrees with isolation: "worktree" are cleaned up automatically

Also delete the temporary branches:

git branch -D fix-{bug-name}-kiro

9. (Skipped — handled in 8A or 8B)

10. Update Documentation

Review and update any affected documentation:

  • Code comments if behaviour changed
  • README or docs if user-facing
  • API docs if interface changed

11. Finalize Bugfix Report

Update specs/bugfixes/<bug-name>/report.md — fill in the Resolution section now that the fix is implemented. If the complex path was used, reference the solution comparison report.

12. Commit and PR (Transit bugs only)

When a Transit ticket is present, after all checks pass:

  1. Commit all changes using the /commit skill
  2. Push the branch to the remote
  3. Create a PR using gh pr create with:

- Title: Fix T-{number}: {bug-name-in-title-case} - Body: Summary of the bug, root cause, and fix (reference the bugfix report)

  1. Move the Transit ticket to ready-for-review status. Add a comment with the PR URL.

When no Transit ticket is present, do not commit or create a PR unless asked.

13. Automated Review Fix (Transit bugs only)

After the PR is created, wait 10 minutes for CI checks and automated reviews to come in, then run the /pr-review-fixer skill to address any feedback from the first round automatically.

Output

Upon completion:

  1. Bug is fixed and verified
  2. Regression test exists and passes
  3. Full test suite passes
  4. Report exists at specs/bugfixes/<bug-name>/report.md
  5. If complex path was used: comparison report at specs/bugfixes/<bug-name>/solution-comparison.md
  6. If a Transit ticket was tracked: changes committed, PR created, first review round addressed, ticket moved to ready-for-review
  7. If no Transit ticket: code is ready for commit (do not commit unless asked)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.03%
按下载量换算62

Claude

30.75%
按下载量换算53

Cursor

16.84%
按下载量换算29

Gemini CLI

8.94%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/arjenschwarz/agentic-coding --skill fix-bug 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills