一键导入
fix-issue
Pick a bug from Linear, fix it test-first, verify, and update. Use when the user says "fix issue", "fix bug", "work on known issue", or "pick a bug".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Pick a bug from Linear, fix it test-first, verify, and update. Use when the user says "fix issue", "fix bug", "work on known issue", or "pick a bug".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create a new ticket for task tracking. Use when the user says "create ticket", "new ticket", or "track this".
Diagnose an integration/E2E test log, classify failures by severity, and batch-create issues. Use when the user says "smoke test", "diagnose log", "triage test log", or provides a test log.
Pull Linear issues and generate a local snapshot for quick reference. Use when the user says "sync linear", "pull linear issues", "update from linear", or "show my issues".
Triage, prioritize, and groom Linear issues. Use when the user says "triage linear", "review inbox", "prioritize issues", "groom backlog", or "clean up issues".
Investigate a bug using structured differential diagnosis. Use when the user says "diagnose", "investigate this", "what's causing this", or "figure out why".
Document a bug by creating a Linear issue without fixing it. Use when the user says "document bug", "log this bug", "document don't fix", or during refactoring when a bug is discovered.
| name | fix-issue |
| description | Pick a bug from Linear, fix it test-first, verify, and update. Use when the user says "fix issue", "fix bug", "work on known issue", or "pick a bug". |
| argument-hint | <ENG-NNN or description> |
| user-invocable | true |
| allowed-tools | Bash, Read, Write, Edit, Grep, Glob |
| model | opus |
Select a bug from Linear, write a failing test that reproduces it, fix it, and update the issue.
This skill follows a test-driven approach: RED → GREEN → REFACTOR.
Automated enforcement: If tdd-guard is installed, the TDD cycle is enforced automatically via hooks — implementation code is blocked unless corresponding failing tests exist. Toggle mid-session with
tdd-guard on/tdd-guard off.
Verify the Linear CLI is available:
linear --version 2>/dev/null || echo "LINEAR_CLI_MISSING"
Select the issue:
$ARGUMENTS specifies an issue ID (e.g., ENG-123), fetch that issue:
linear issue view ENG-123 --json
$ARGUMENTS is a description, search for matching bug issues:
linear issue list --label "bug"
Then match by title/description.linear issue list --label "bug"
Review the issue details:
docs/LINEAR_SNAPSHOT.md for a quick local referencePlan the fix:
test_<what_should_happen> or it("should <expected behavior>")# Run only the new test to confirm RED
<project test command> --filter "<test name>"
# Run only the new test to confirm GREEN
<project test command> --filter "<test name>"
<project test command>
Update the Linear issue to "In Review":
linear issue update ENG-123 --state "In Review"
linear issue comment add ENG-123 -b "**Root Cause:** [actual root cause]
**Regression Test:** [test file:test name] — asserts [what the test checks]
**Fix Applied:**
- [file:line] — [what changed]
**Automated Checks:**
- New test: PASS (was RED before fix)
- Full test suite: PASS
- Build: PASS
**Awaiting:** Manual verification by the user before marking Done.
**Commit:** [commit hash or 'ready to commit']"
Important: "In Review" means the code change is ready for the user to manually test and verify. Only the user moves an issue to "Done" — never mark it "Done" yourself.
Report:
## Fixed: ENG-123 — [description]
### Root Cause
[actual root cause]
### Regression Test
- File: [test file path]
- Test: [test name]
- Asserts: [what the test verifies — the correct behavior]
### Fix Applied
- [file:line] — [what changed]
### TDD Cycle
- RED: New test failed against buggy code (confirmed bug reproduced)
- GREEN: Minimum fix applied, new test passes
- REFACTOR: [any cleanup done, or "N/A — no refactoring needed"]
### Automated Checks
- New test: PASS
- Full suite: PASS/FAIL
- Build: PASS/FAIL
### Manual Verification
- Status: **Awaiting user testing**
- How to verify: [describe how the user can confirm the symptom is gone]
### Files Changed
- [file list]
Ready to commit? Use /commit to create a conventional commit with [ENG-123] reference.
fix(module): description [ENG-123]npm install -g tdd-guard