一键导入
bugfix-workflow
End-to-end bugfix workflow. Test first, plan, fix, verify. Use when the user says "fix bug", "bugfix", "investigate issue", "fix
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
End-to-end bugfix workflow. Test first, plan, fix, verify. Use when the user says "fix bug", "bugfix", "investigate issue", "fix
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Testing-grade browser automation via Chrome DevTools Protocol (CDP). Direct access to the browser's DOM, JS runtime, network layer, cookies, computed styles, and console — without any external dependencies. Complements MCP-based tools by enabling arbitrary JS evaluation in page context and deep inspection that screenshot-only tools miss. Use when you need to: run JS in the page, inspect cookies/localStorage, check computed styles, enumerate third-party scripts, emulate devices, analyze network timing, or interact via real mouse and keyboard events.
Review code for correctness, security, performance, and maintainability. Use when the user asks to "review this code", "check my changes", "review PR", "audit", or "what do you think of this approach".
Gather cross-channel context (local KB, email, Teams chats, optional web) about a person and topic before responding. Use when the user says "what do we know about X", "find prior discussions with Y", "context on this thread", or before drafting any reply where prior history matters.
Disk-first, checkpointed research workflow with three modes — trend research, topic analysis, and fact-checking. Use when the user asks to "research trends", "analyze a topic", "fact-check this", "verify claims", "what's the state of X", or hands you a document to vet.
Git operations, branching, commits, PRs, and release workflows. Use when the user asks to "commit", "create PR", "branch", "merge", "rebase", "cherry-pick", "tag", or manage git history.
Goal-backward verification — checks whether the desired outcome was achieved, not whether tasks were marked done. Use when the user asks to "verify", "did this actually work", "is X really done", or before closing an issue / merging a PR.
| name | bugfix-workflow |
| description | End-to-end bugfix workflow. Test first, plan, fix, verify. Use when the user says "fix bug", "bugfix", "investigate issue", "fix |
| license | Apache-2.0 |
| metadata | {"author":"octobots","version":"0.1.0"} |
Core philosophy: reproduce before you fix, verify after you fix, link everything to the ticket.
Step 1: Read & Understand the Bug
↓
Step 2: Reproduce
↓
Step 3: Write a Failing Test
↓
Step 4: Root Cause Analysis
↓
Step 5: Implement the Fix
↓
Step 6: Verify (tests pass)
↓
Step 7: Document on Ticket
Goal: Fully understand the issue before touching code.
gh issue view <NUMBER>
Read all comments. Identify:
Comment on ticket:
gh issue comment <NUMBER> --body "🔧 **Investigating**: Reading the report and reproducing."
Goal: Confirm the bug exists and understand exact conditions.
browser_navigate → browser_snapshot → follow reported steps →
browser_console_messages → browser_network_requests → browser_take_screenshot
curl -s -X POST http://localhost:PORT/api/endpoint \
-H "Content-Type: application/json" \
-d '{"test": "data"}' | jq .
Write a minimal script that triggers the issue:
# reproduce_issue_NNN.py
from module import function
result = function(edge_case_input)
print(f"Expected: X, Got: {result}")
If you cannot reproduce: Comment on ticket with what you tried and ask for more details. Do NOT proceed to fix.
Comment on ticket:
gh issue comment <NUMBER> --body "$(cat <<'EOF'
✅ **Reproduced**
**Steps:** [exact steps]
**Expected:** [what should happen]
**Actual:** [what happens]
**Frequency:** Always / Intermittent
EOF
)"
Goal: Capture the bug as a test BEFORE fixing it. The test must fail now and pass after the fix.
def test_issue_NNN_description():
"""Regression test for #NNN: [bug title]."""
# Arrange — set up the conditions that trigger the bug
input_data = edge_case_input
# Act — trigger the bug
result = function(input_data)
# Assert — what SHOULD happen (this fails now)
assert result == expected_value
Run it to confirm it fails:
pytest tests/test_module.py::test_issue_NNN -x -v
# Should FAIL — that's the point
Goal: Find the exact code that causes the bug.
Locate the relevant code:
# Search for the function/class involved
grep -rn "function_name" src/ --include="*.py"
Trace the execution path from entry point to failure
Identify the root cause:
Assess impact: What else uses this code? Could the fix break other things?
Comment on ticket:
gh issue comment <NUMBER> --body "$(cat <<'EOF'
🔍 **Root Cause**
**Location:** `src/module.py:42`
**Cause:** [description of what's wrong]
**Impact:** [what else is affected]
**Fix approach:** [brief plan]
EOF
)"
Goal: Minimal, focused fix. Don't refactor, don't clean up neighbors.
python -m py_compile file.py (or equivalent)Goal: The failing test now passes. Nothing else broke.
# 1. The regression test passes
pytest tests/test_module.py::test_issue_NNN -x -v
# 2. Full test suite still passes
pytest tests/ -x -q
# 3. Lint/type check
ruff check . && mypy src/ # or your project's equivalent
If anything fails, fix it before proceeding.
Goal: Complete audit trail — what was wrong, what was fixed, proof it works.
gh issue comment <NUMBER> --body "$(cat <<'EOF'
✅ **Fixed**
**Root Cause:** [one sentence]
**Fix:** [what changed, which files]
**Regression Test:** `tests/test_module.py::test_issue_NNN`
**PR:** #XX
All tests passing.
EOF
)"
Commit and create PR:
git add -A
git commit -m "Fix: [description] (#NNN)"
git push -u origin HEAD
gh pr create --title "Fix: [description] (#NNN)" --body "Closes #NNN"