一键导入
bug-fix-workflow
Fix bugs using the two-commit structure with failing test first. Use when fixing bugs, addressing issues, or correcting incorrect behavior.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Fix bugs using the two-commit structure with failing test first. Use when fixing bugs, addressing issues, or correcting incorrect behavior.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Watch a PR's CI checks and iteratively fix failures until green. Use after opening or pushing to a PR, or when CI is failing and you want autonomous fix-push cycles.
Create or update pull requests following best practices. Use when opening a PR, updating an existing PR, preparing changes for review, or running gh pr create.
Review pull requests against best practices. Use when reviewing PRs, checking code quality, or providing feedback on changes.
| name | bug-fix-workflow |
| description | Fix bugs using the two-commit structure with failing test first. Use when fixing bugs, addressing issues, or correcting incorrect behavior. |
| user-invocable | true |
Bug fixes use a two-commit structure that proves the bug exists before fixing it.
test: reproduce <issue description>
Adds a failing test that demonstrates the bug:
fix: <description of what was fixed>
This commit:
// Example (adapt to your language/framework)
test('issue #123: handles empty input correctly', () => {
// This test reproduces the bug
const result = processInput('');
// Expected: returns default value
// Actual (bug): throws exception
expect(result).toBe('default');
});
npm test -- --grep "issue #123"
# Should FAIL - this proves the bug exists
git add .
git commit -m "test: reproduce empty input handling (issue #123)"
Make the minimal changes needed to fix the bug.
npm test -- --grep "issue #123" # Should PASS now
npm test # All tests should pass
git add .
git commit -m "fix: handle empty input by returning default value
The processInput function was not checking for empty strings
before attempting to parse, causing an exception."
test: reproduce <brief description>
- Reference issue number if applicable
- Describe what the test checks
- Note expected vs actual behavior
fix: <what was fixed>
<Why the bug occurred>
<What the fix does>
test: prefixfix: prefix