fix by parcadei/continuous-claude-v3
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill fix用于问题调查和修复的工作流编排器。根据问题范围链接专门的技能。
/fix <scope> [options] [description]
如果用户只输入 /fix 而没有参数或参数不完整,请通过以下提问流程引导他们。对每个阶段使用 AskUserQuestion。
question: "你想要修复什么?"
header: "修复类型"
options:
- label: "帮我选择(推荐)"
description: "我将通过提问来选择合适的修复工作流"
- label: "Bug - 某些功能损坏"
description: "链式流程:调查 → 诊断 → 实现 → 测试 → 提交"
- label: "Hook - Claude Code 钩子问题"
description: "链式流程:debug-hooks → hook-developer → 实现 → 测试"
- label: "Dependencies - 导入/包错误"
description: "链式流程:preflight → research → plan → 实现 → qlty-check"
- label: "PR Comments - 处理审阅者反馈"
description: "链式流程:github-search → research → plan → 实现 → 提交"
映射关系:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
question: "我想了解你需要哪种修复。你的意思是..."
header: "澄清"
options:
- label: "帮我选择"
description: "不确定 - 请通过提问引导我"
- label: "Bug - 某些功能损坏"
description: "代码未按预期工作"
- label: "Hook - Claude Code 钩子问题"
description: "钩子未触发或产生错误输出"
- label: "都不是 - 让我换个方式解释"
description: "我将描述我的问题"
question: "你正在处理什么问题类型?"
header: "问题类型"
options:
- label: "某些功能损坏/无法工作"
description: "代码中的错误"
- label: "Claude Code 钩子未触发"
description: "钩子特定的调试"
- label: "导入/依赖错误"
description: "包或模块问题"
- label: "需要处理 PR 反馈"
description: "需要修复的审阅者评论"
映射关系:
question: "你能描述一下这个问题吗?"
header: "详情"
options: [] # 自由文本 - 用户描述问题
捕获错误消息、意外行为或 PR 链接。
question: "我应该如何进行调查?"
header: "调查"
options:
- label: "诊断并修复"
description: "找到问题并实施修复"
- label: "仅诊断(试运行)"
description: "只告诉我问题所在,不修改代码"
- label: "快速修复"
description: "我知道问题所在,快速修复即可"
映射关系:
question: "修复后,我应该..."
header: "修复后"
multiSelect: true
options:
- label: "编写回归测试"
description: "防止此错误再次发生"
- label: "提交修复"
description: "创建 git 提交"
- label: "仅修复,不做其他"
description: "我将处理测试和 git"
映射关系:
根据你的回答,我将运行:
**范围:** bug
**问题:** "Safari 浏览器上登录按钮无响应"
**链式流程:** sleuth(调查) → spark(修复) → arbiter(测试) → commit
**选项:** (无)
是否继续?[是 / 调整设置]
| 范围 | 链式流程 | 描述 |
|---|---|---|
bug | debug -> implement_task -> test-driven-development -> commit | 通用错误修复工作流 |
hook | debug-hooks -> hook-developer -> implement_task -> test hook | 钩子特定调试 |
deps | dependency-preflight -> oracle -> plan-agent -> implement_plan -> qlty-check | 依赖问题 |
pr-comments | github-search -> research-codebase -> plan-agent -> implement_plan -> commit | 处理 PR 反馈 |
| 选项 | 效果 |
|---|---|
--no-test | 跳过回归测试创建 |
--dry-run | 仅诊断,不实施修复 |
--no-commit | 不自动提交修复 |
# 解析范围和选项
SCOPE="${1:-bug}"
NO_TEST=false
DRY_RUN=false
NO_COMMIT=false
for arg in "$@"; do
case $arg in
--no-test) NO_TEST=true ;;
--dry-run) DRY_RUN=true ;;
--no-commit) NO_COMMIT=true ;;
esac
done
启动 sleuth 代理进行并行调查:
Task(
subagent_type="sleuth",
prompt="""
并行调查此问题:
1. **日志**:检查最近的错误日志
- 应用程序日志
- 系统日志(如果相关)
- 构建/测试输出
2. **数据库状态**(如果适用):
- 检查是否存在卡住/无效的记录
- 验证模式是否符合预期
3. **Git 状态**:
- 可能相关的最近提交
- 未提交的更改
- 当前分支上下文
4. **运行时状态**:
- 正在运行的进程
- 端口冲突
- 环境变量
问题描述:{user_description}
返回带有证据的结构化发现。
"""
)
向用户呈现调查结果:
## 诊断报告
### 范围:{scope}
### 发现的证据
**日志:**
- [带有时间戳/行引用的发现]
**数据库:**
- [带有表/查询引用的发现]
**Git 状态:**
- [最近的相关提交]
- [未提交的更改]
**运行时:**
- [进程/端口发现]
### 根本原因分析
**主要假设:** [基于证据的最可能原因]
**支持证据:**
1. [证据 1]
2. [证据 2]
**替代假设:**
- [替代方案 1]:[为何可能性较低]
### 建议的修复方案
**方法:** [如何修复]
**要修改的文件:**
- `path/to/file.ts:123` - [更改描述]
**风险评估:** [低/中/高] - [原因]
---
**是否继续修复?** (是/否/修改方法)
必需: 在实施前等待用户确认。
AskUserQuestion(
question="是否继续执行建议的修复方案?",
options=["是", "否", "修改"]
)
如果用户说"修改",则收集新需求并更新方法。如果用户说"否",则创建诊断交接并退出。如果使用 --dry-run,则在此处创建诊断交接并退出。
诊断批准后,实施前:
对建议的修复方案进行快速事前分析以发现风险:
/premortem quick
事前分析上下文:
premortem:
mode: quick
context: "针对 {diagnosis.root_cause} 的错误修复"
check_for:
- 此修复是否会破坏其他功能?
- 如果修复导致问题,是否可以回滚?
- 是否有未覆盖的相关边缘情况?
- 修复是否符合代码库模式?
- 是否有外部依赖受到影响?
风险决策:
未发现 HIGH 级别风险:继续实施
发现 HIGH 级别风险:向用户呈现选项:
AskUserQuestion( question="事前分析在建议的修复方案中发现了 {n} 个风险。是否继续?", options=[ "接受风险并实施", "修改修复方法", "首先研究缓解策略" ] )
如果选择"研究缓解策略",则针对每个风险并行启动 scout + oracle,然后重新呈现选项。
根据范围路由到适当的实施技能:
Task(
subagent_type="kraken",
prompt="""
使用 TDD 方法实施修复。
根本原因:{diagnosis.root_cause}
文件:{diagnosis.files_to_modify}
方法:{diagnosis.approach}
遵循 implement_task 工作流:
1. 编写重现错误的失败测试
2. 实施最小修复以使测试通过
3. 如果需要则重构
4. 运行完整测试套件
"""
)
Task(
subagent_type="kraken",
prompt="""
修复钩子问题。
根本原因:{diagnosis.root_cause}
遵循 hook-developer 模式:
1. 检查 settings.json 中的钩子注册
2. 验证 shell 包装器是否存在且可执行
3. 使用模拟输入手动测试钩子
4. 如果修改了 TypeScript 源代码则重新构建
5. 验证钩子是否正确触发
"""
)
Task(
subagent_type="kraken",
prompt="""
修复依赖问题。
根本原因:{diagnosis.root_cause}
遵循 plan-agent 工作流:
1. 研究正确的依赖版本
2. 创建实施计划
3. 更新锁文件
4. 运行 dependency-preflight
5. 运行 qlty-check
"""
)
Task(
subagent_type="kraken",
prompt="""
处理 PR 反馈。
评论:{diagnosis.pr_comments}
遵循 plan-agent 工作流:
1. 研究代码库以获取上下文
2. 为每个评论创建实施计划
3. 实施更改
4. 提交并引用评论
"""
)
Task(
subagent_type="kraken",
prompt="""
为修复创建回归测试。
错误:{original_issue}
修复:{implementation_summary}
遵循 test-driven-development:
1. 编写能够捕获此错误的测试
2. 验证测试在修复前代码上会失败(心理上)
3. 验证测试在修复后代码上通过
4. 测试应最小化且专注
"""
)
AskUserQuestion(
question="修复已实施。请验证并确认。",
options=["看起来不错", "需要调整", "回滚"]
)
如果选择"需要调整",则收集反馈并返回到阶段 5。如果选择"回滚",则运行回滚命令并退出。
Task(
subagent_type="general-purpose",
prompt="""
遵循 commit 技能:
1. 使用 git diff 查看更改
2. 创建描述性提交消息
3. 引用问题/工单(如果适用)
4. 呈现计划并等待确认
5. 执行提交
"""
)
sleuth(调查)
|
v
[人工检查点:诊断]
|
v
[事前分析:快速风险检查]
|
v
kraken(implement_task + TDD)
|
v
kraken(回归测试)
|
v
[人工检查点:验证]
|
v
commit
debug-hooks(结构化调查)
|
v
[人工检查点:诊断]
|
v
[事前分析:快速风险检查]
|
v
kraken(implement_task + hook-developer 模式)
|
v
手动测试钩子
|
v
[人工检查点:验证]
|
v
commit
dependency-preflight(检查当前状态)
|
v
oracle(查找正确版本/替代方案)
|
v
plan-agent(创建修复计划)
|
v
[人工检查点:诊断 + 计划审查]
|
v
[事前分析:快速风险检查]
|
v
kraken(implement_plan)
|
v
qlty-check
|
v
[人工检查点:验证]
|
v
commit
github-search(获取 PR 上下文)
|
v
research-codebase(理解上下文)
|
v
plan-agent(为每个评论制定计划)
|
v
[人工检查点:计划审查]
|
v
[事前分析:快速风险检查]
|
v
kraken(implement_plan)
|
v
[人工检查点:验证]
|
v
commit(引用 PR 评论)
始终创建交接,即使使用 --dry-run:
---
session: fix-{scope}-{short-description}
ts: {ISO timestamp}
commit: {git commit hash}
branch: {git branch}
status: {complete|partial|blocked|diagnosis-only}
---
scope: {bug|hook|deps|pr-comments}
options: {使用的标志}
issue:
description: {原始用户描述}
evidence: {调查中的关键发现}
diagnosis:
root_cause: {已识别的原因}
hypothesis: {我们认为的原因}
files: [{受影响文件}]
fix:
approach: {已执行的操作}
files_modified: [{已更改文件}]
test_added: {如果创建了测试文件}
verification:
test_command: {验证命令}
human_confirmed: {true|false}
next:
- {任何需要的后续操作}
位置: thoughts/shared/handoffs/fix/{scope}/{timestamp}_{description}.yaml
/fix bug
# -> 调查、诊断、实施、测试、提交
/fix bug --dry-run
# -> 调查、创建诊断交接、停止
/fix hook --no-commit
# -> 完整修复工作流但在提交前停止
/fix bug --no-test
# -> 实施修复、提交、无回归测试
/fix pr-comments
# -> 获取 PR、创建计划、实施、提交
| 错误 | 操作 |
|---|---|
| 调查未发现任何问题 | 向用户请求更多上下文 |
| 用户拒绝诊断 | 根据用户输入完善假设 |
| 修复破坏其他测试 | 回滚、完善方法 |
| 用户拒绝验证 | 提供回滚或调整选项 |
| 提交失败 | 呈现错误、提供重试选项 |
此技能编排以下技能:
debug / debug-hooks:初始调查sleuth:并行调查代理kraken:TDD 实施代理implement_task:单个任务实施test-driven-development:测试创建plan-agent:复杂修复规划dependency-preflight:依赖检查oracle / research-codebase:上下文收集github-search:PR 上下文获取qlty-check:质量验证premortem:实施前风险评估commit:Git 提交工作流create_handoff:会话交接| 检查点 | 目的 | 跳过条件 |
|---|---|---|
| 诊断后 | 确认根本原因 | 从不跳过 |
| 事前分析后 | 接受或缓解风险 | 无 HIGH 级别风险 |
| 修复后 | 验证解决方案 | 从不跳过 |
| 提交前 | 审查更改 | --no-commit |
人工检查点对于以下方面至关重要:
每周安装次数
202
仓库
GitHub 星标数
3.6K
首次出现时间
2026年1月22日
安全审计
安装于
opencode194
codex193
gemini-cli189
cursor188
github-copilot186
amp184
Workflow orchestrator for bug investigation and resolution. Chains specialized skills based on issue scope.
/fix <scope> [options] [description]
If the user types just /fix with no or partial arguments, guide them through this question flow. Use AskUserQuestion for each phase.
question: "What would you like to fix?"
header: "Fix type"
options:
- label: "Help me choose (Recommended)"
description: "I'll ask questions to pick the right fix workflow"
- label: "Bug - something is broken"
description: "Chain: investigate → diagnose → implement → test → commit"
- label: "Hook - Claude Code hook issue"
description: "Chain: debug-hooks → hook-developer → implement → test"
- label: "Dependencies - import/package errors"
description: "Chain: preflight → research → plan → implement → qlty-check"
- label: "PR Comments - address reviewer feedback"
description: "Chain: github-search → research → plan → implement → commit"
Mapping:
If Answer is Unclear (via "Other"):
question: "I want to understand what kind of fix you need. Did you mean..."
header: "Clarify"
options:
- label: "Help me choose"
description: "Not sure - guide me through questions"
- label: "Bug - something is broken"
description: "Code isn't working as expected"
- label: "Hook - Claude Code hook issue"
description: "Hooks not firing or producing wrong output"
- label: "Neither - let me explain differently"
description: "I'll describe my issue"
question: "What kind of issue are you dealing with?"
header: "Issue type"
options:
- label: "Something is broken/not working"
description: "Bug in the code"
- label: "Claude Code hook not firing"
description: "Hook-specific debugging"
- label: "Import/dependency errors"
description: "Package or module issues"
- label: "Need to address PR feedback"
description: "Reviewer comments to fix"
Mapping:
question: "Can you describe the issue?"
header: "Details"
options: [] # Free text - user describes the problem
Capture the error message, unexpected behavior, or PR link.
question: "How should I investigate?"
header: "Investigation"
options:
- label: "Diagnose and fix"
description: "Find the problem and implement a fix"
- label: "Diagnose only (dry run)"
description: "Just tell me what's wrong, don't change code"
- label: "Quick fix"
description: "I know the issue, just fix it fast"
Mapping:
question: "After fixing, should I..."
header: "After fix"
multiSelect: true
options:
- label: "Write a regression test"
description: "Prevent this bug from recurring"
- label: "Commit the fix"
description: "Create a git commit"
- label: "Just fix, nothing else"
description: "I'll handle tests and git"
Mapping:
Based on your answers, I'll run:
**Scope:** bug
**Issue:** "Login button not responding on Safari"
**Chain:** sleuth (investigate) → spark (fix) → arbiter (test) → commit
**Options:** (none)
Proceed? [Yes / Adjust settings]
| Scope | Chain | Description |
|---|---|---|
bug | debug -> implement_task -> test-driven-development -> commit | General bug fix workflow |
hook | debug-hooks -> hook-developer -> implement_task -> test hook | Hook-specific debugging |
deps | dependency-preflight -> oracle -> plan-agent -> implement_plan -> qlty-check | Dependency issues |
pr-comments | github-search -> research-codebase -> plan-agent -> implement_plan -> commit | Address PR feedback |
| Option | Effect |
|---|---|
--no-test | Skip regression test creation |
--dry-run | Diagnose only, don't implement fix |
--no-commit | Don't auto-commit the fix |
# Parse scope and options
SCOPE="${1:-bug}"
NO_TEST=false
DRY_RUN=false
NO_COMMIT=false
for arg in "$@"; do
case $arg in
--no-test) NO_TEST=true ;;
--dry-run) DRY_RUN=true ;;
--no-commit) NO_COMMIT=true ;;
esac
done
Spawn sleuth agent for parallel investigation:
Task(
subagent_type="sleuth",
prompt="""
Investigate this issue in parallel:
1. **Logs**: Check recent logs for errors
- Application logs
- System logs if relevant
- Build/test output
2. **Database State** (if applicable):
- Check for stuck/invalid records
- Verify schema matches expectations
3. **Git State**:
- Recent commits that might relate
- Uncommitted changes
- Current branch context
4. **Runtime State**:
- Running processes
- Port conflicts
- Environment variables
Issue description: {user_description}
Return structured findings with evidence.
"""
)
Present findings to user:
## Diagnosis Report
### Scope: {scope}
### Evidence Found
**Logs:**
- [Finding with timestamp/line reference]
**Database:**
- [Finding with table/query reference]
**Git State:**
- [Recent relevant commits]
- [Uncommitted changes]
**Runtime:**
- [Process/port findings]
### Root Cause Analysis
**Primary Hypothesis:** [Most likely cause based on evidence]
**Supporting Evidence:**
1. [Evidence 1]
2. [Evidence 2]
**Alternative Hypotheses:**
- [Alternative 1]: [Why less likely]
### Proposed Fix
**Approach:** [How to fix]
**Files to Modify:**
- `path/to/file.ts:123` - [Change description]
**Risk Assessment:** [Low/Medium/High] - [Why]
---
**Proceed with fix?** (yes/no/modify approach)
REQUIRED: Wait for user confirmation before implementing.
AskUserQuestion(
question="Proceed with the proposed fix?",
options=["yes", "no", "modify"]
)
If user says "modify", gather new requirements and update approach. If user says "no", create diagnostic handoff and exit. If --dry-run, create diagnostic handoff and exit here.
After diagnosis approval, before implementation:
Run a quick premortem on the proposed fix to catch risks:
/premortem quick
Context for premortem:
premortem:
mode: quick
context: "Bug fix for {diagnosis.root_cause}"
check_for:
- Will this fix break other functionality?
- Is rollback possible if fix causes issues?
- Are there related edge cases not covered?
- Does the fix match codebase patterns?
- Any external dependencies affected?
Risk Decision:
No HIGH tigers : Proceed to implementation
HIGH tigers found : Present to user with options:
AskUserQuestion( question="Pre-mortem found {n} risks in the proposed fix. Proceed?", options=[ "Accept risks and implement", "Modify fix approach", "Research mitigations first" ] )
If "Research mitigations", spawn scout + oracle in parallel per risk, then re-present options.
Route to appropriate implementation skill based on scope:
Task(
subagent_type="kraken",
prompt="""
Implement fix with TDD approach.
Root cause: {diagnosis.root_cause}
Files: {diagnosis.files_to_modify}
Approach: {diagnosis.approach}
Follow implement_task workflow:
1. Write failing test that reproduces the bug
2. Implement minimal fix to pass test
3. Refactor if needed
4. Run full test suite
"""
)
Task(
subagent_type="kraken",
prompt="""
Fix hook issue.
Root cause: {diagnosis.root_cause}
Follow hook-developer patterns:
1. Check hook registration in settings.json
2. Verify shell wrapper exists and is executable
3. Test hook manually with mock input
4. Rebuild if TypeScript source was modified
5. Verify hook fires correctly
"""
)
Task(
subagent_type="kraken",
prompt="""
Fix dependency issue.
Root cause: {diagnosis.root_cause}
Follow plan-agent workflow:
1. Research correct dependency versions
2. Create implementation plan
3. Update lockfiles
4. Run dependency-preflight
5. Run qlty-check
"""
)
Task(
subagent_type="kraken",
prompt="""
Address PR feedback.
Comments: {diagnosis.pr_comments}
Follow plan-agent workflow:
1. Research codebase for context
2. Create implementation plan for each comment
3. Implement changes
4. Commit with reference to comment
"""
)
Task(
subagent_type="kraken",
prompt="""
Create regression test for the fix.
Bug: {original_issue}
Fix: {implementation_summary}
Follow test-driven-development:
1. Write test that would have caught this bug
2. Verify test fails against pre-fix code (mentally)
3. Verify test passes against fixed code
4. Test should be minimal and focused
"""
)
AskUserQuestion(
question="Fix implemented. Please verify and confirm.",
options=["looks good", "needs adjustment", "revert"]
)
If "needs adjustment", gather feedback and return to Phase 5. If "revert", run rollback command and exit.
Task(
subagent_type="general-purpose",
prompt="""
Follow commit skill:
1. Review changes with git diff
2. Create descriptive commit message
3. Reference issue/ticket if applicable
4. Present plan and await confirmation
5. Execute commit
"""
)
sleuth (investigation)
|
v
[HUMAN CHECKPOINT: diagnosis]
|
v
[PREMORTEM: quick risk check]
|
v
kraken (implement_task + TDD)
|
v
kraken (regression test)
|
v
[HUMAN CHECKPOINT: verification]
|
v
commit
debug-hooks (structured investigation)
|
v
[HUMAN CHECKPOINT: diagnosis]
|
v
[PREMORTEM: quick risk check]
|
v
kraken (implement_task + hook-developer patterns)
|
v
test hook manually
|
v
[HUMAN CHECKPOINT: verification]
|
v
commit
dependency-preflight (check current state)
|
v
oracle (find correct versions/alternatives)
|
v
plan-agent (create fix plan)
|
v
[HUMAN CHECKPOINT: diagnosis + plan review]
|
v
[PREMORTEM: quick risk check]
|
v
kraken (implement_plan)
|
v
qlty-check
|
v
[HUMAN CHECKPOINT: verification]
|
v
commit
github-search (fetch PR context)
|
v
research-codebase (understand context)
|
v
plan-agent (plan for each comment)
|
v
[HUMAN CHECKPOINT: plan review]
|
v
[PREMORTEM: quick risk check]
|
v
kraken (implement_plan)
|
v
[HUMAN CHECKPOINT: verification]
|
v
commit (reference PR comments)
Always create a handoff , even with --dry-run:
---
session: fix-{scope}-{short-description}
ts: {ISO timestamp}
commit: {git commit hash}
branch: {git branch}
status: {complete|partial|blocked|diagnosis-only}
---
scope: {bug|hook|deps|pr-comments}
options: {flags used}
issue:
description: {original user description}
evidence: {key findings from investigation}
diagnosis:
root_cause: {identified cause}
hypothesis: {why we think this}
files: [{affected files}]
fix:
approach: {what was done}
files_modified: [{files changed}]
test_added: {test file if created}
verification:
test_command: {command to verify}
human_confirmed: {true|false}
next:
- {any follow-up needed}
Location: thoughts/shared/handoffs/fix/{scope}/{timestamp}_{description}.yaml
/fix bug
# -> Investigates, diagnoses, implements, tests, commits
/fix bug --dry-run
# -> Investigates, creates diagnosis handoff, stops
/fix hook --no-commit
# -> Full fix workflow but stops before commit
/fix bug --no-test
# -> Implements fix, commits, no regression test
/fix pr-comments
# -> Fetches PR, creates plan, implements, commits
| Error | Action |
|---|---|
| Investigation finds nothing | Ask user for more context |
| User rejects diagnosis | Refine hypothesis with user input |
| Fix breaks other tests | Rollback, refine approach |
| User rejects verification | Offer to revert or adjust |
| Commit fails | Present error, offer retry |
This skill orchestrates:
debug / debug-hooks: Initial investigationsleuth: Parallel investigation agentkraken: TDD implementation agentimplement_task: Single task implementationtest-driven-development: Test creationplan-agent: Complex fix planningdependency-preflight: Dependency checksoracle / research-codebase: Context gathering| Checkpoint | Purpose | Skip Condition |
|---|---|---|
| After diagnosis | Confirm root cause | Never skip |
| After premortem | Accept or mitigate risks | No HIGH tigers |
| After fix | Verify resolution | Never skip |
| Before commit | Review changes | --no-commit |
The human checkpoints are critical for:
Weekly Installs
202
Repository
GitHub Stars
3.6K
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode194
codex193
gemini-cli189
cursor188
github-copilot186
amp184
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
150,000 周安装
github-search: PR context fetchingqlty-check: Quality verificationpremortem: Risk assessment before implementationcommit: Git commit workflowcreate_handoff: Session handoff