Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问clear审计提醒

fix-issue解决问题

Agent Skill

用于围绕 GitHub 仓库、Issue、Pull Request、分支、提交和代码协作流程提供辅助能力。它适合让 Agent 查询项目状态、整理变更、辅助创建或检查协作事项,并把仓库中的信息转成可执行的下一步。使用时需要区分只读查询和写入操作;涉及创建 PR、修改 Issue、推送分支或访问私有仓库时,应确认 token 权限、目标仓库范围和用户授权。

总安装

3,095

周安装

124

GitHub Stars

160

下载量

1,002
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/yonatangross/orchestkit --skill fix-issue

简介

用于围绕 GitHub 仓库、Issue、Pull Request 等提供协作支持。

  • 适合查询项目状态、整理变更或推进协作流程。
  • 通过 npx skills add 命令从 yonatangross/orchestkit 仓库安装。
  • 涉及写入操作时应确认用户授权和 token 权限。
  • 建议优先使用只读模式验证功能。

SKILL.md

Fix Issue

Systematic issue resolution with hypothesis-based root cause analysis, similar issue detection, and prevention recommendations.

Quick Start

/ork:fix-issue 123
/ork:fix-issue 456
Opus 4.6: Root cause analysis uses native adaptive thinking. Dynamic token budgets scale with context window for thorough investigation.
CC ≥ 2.1.119 multi-host note (M122): Issue fetching works against GitHub, GitLab, Bitbucket, and GitHub Enterprise. The argument is either a numeric ID (use the configured default remote's host) or a full URL (parsed via parsePrUrl/parseIssueUrl from src/hooks/src/lib/pr-host-parser.ts). Branch on the detected host family for the right CLI: gh issue view (GitHub/GHE), glab issue view (GitLab), bb issue view (Bitbucket). Reference: src/skills/chain-patterns/references/pr-from-platform.md.

Argument Resolution

ISSUE_NUMBER = "$ARGUMENTS[0]"  # e.g., "123" (CC 2.1.59 indexed access)
# $ARGUMENTS contains the full argument string
# $ARGUMENTS[0] is the first space-separated token

STEP -1: MCP Probe + Resume Check

Run BEFORE any other step. Detect available MCP servers and check for resumable state.

# Probe MCPs (parallel — all in ONE message):
# memory is alwaysLoad in .mcp.json (CC 2.1.121+, #1541) — probe below kept as fallback for older CC:
ToolSearch(query="select:mcp__memory__search_nodes")
ToolSearch(query="select:mcp__context7__resolve-library-id")

# Write capability map:
Write(".claude/chain/capabilities.json", JSON.stringify({
  "memory": <true if found>,
  "context7": <true if found>,
  "timestamp": now()
}))

# Check for resumable state:
Read(".claude/chain/state.json")
# If exists and skill == "fix-issue":
#   Read last handoff, skip to current_phase
#   Tell user: "Resuming from Phase {N}"
# If not exists: write initial state
Write(".claude/chain/state.json", JSON.stringify({
  "skill": "fix-issue",
  "issue": ISSUE_NUMBER,
  "current_phase": 1,
  "completed_phases": [],
  "capabilities": capabilities
}))
Load pattern details: Read("${CLAUDE_PLUGIN_ROOT}/skills/chain-patterns/references/mcp-detection.md")

CRITICAL: Task Management is MANDATORY (CC 2.1.16)

BEFORE doing ANYTHING else (after MCP probe), create tasks to track progress:

# 1. Create main task IMMEDIATELY
TaskCreate(
  subject="Fix Issue: #{ISSUE_NUMBER}",
  description="Systematic issue resolution with RCA and prevention",
  activeForm="Fixing issue #{ISSUE_NUMBER}"
)

# 2. Create subtasks for each key phase
TaskCreate(subject="Understand issue", activeForm="Reading issue details")
TaskCreate(subject="Hypothesis & RCA", activeForm="Analyzing root cause")
TaskCreate(subject="Implement fix", activeForm="Applying fix with tests")
TaskCreate(subject="Validate & prevent", activeForm="Validating fix and prevention")
TaskCreate(subject="Commit and PR", activeForm="Creating PR for fix")

# 3. Set dependencies for sequential phases
TaskUpdate(taskId="3", addBlockedBy=["2"])
TaskUpdate(taskId="4", addBlockedBy=["3"])
TaskUpdate(taskId="5", addBlockedBy=["4"])
TaskUpdate(taskId="6", addBlockedBy=["5"])

# 4. Before starting each task, verify it's unblocked
task = TaskGet(taskId="2")  # Verify blockedBy is empty

# 5. Update status as you progress
TaskUpdate(taskId="2", status="in_progress")  # When starting
TaskUpdate(taskId="2", status="completed")    # When done

STEP 0: Effort-Aware Fix Scaling (CC 2.1.76)

Scale investigation depth based on /effort level:

Effort LevelApproachAgentsPhases
lowQuick fix: read → fix → test → done0 agents1, 6, 7, 11
mediumStandard: investigate → fix → test → prevent2-3 agents1-4, 6-8, 11
high (default)Full RCA: 5 parallel agents → fix → prevent → lessons5 agentsAll 11 phases
xhigh (Opus 4.7 only, CC 2.1.111+)Full RCA + extra regression-scan pass across sibling modules5 agentsAll 11 phases + regression sweep
Override: Explicit user selection (e.g., "Proper fix") overrides /effort downscaling. Hotfix always uses minimal phases regardless of effort.

STEP 0a: Verify User Intent

BEFORE creating tasks, clarify fix approach:

AskUserQuestion(
  questions=[{
    "question": "How do you want to approach this fix?",
    "header": "Fix Approach",
    "options": [
      {"label": "Proper fix (Recommended)", "description": "Full RCA, regression test, prevention plan", "markdown": "```\nProper Fix (11 phases)\n──────────────────────\n  Understand ──▶ Hypothesize ──▶ RCA\n       │              │           │\n       ▼              ▼           ▼\n  5 parallel     Ranked       Confirmed\n  agents         hypotheses   root cause\n       │\n       ▼\n  Fix ──▶ Validate ──▶ Prevent ──▶ PR\n  + regression test   + runbook\n```"},
      {"label": "Quick fix", "description": "Minimal investigation, fix and test", "markdown": "```\nQuick Fix (~10 min)\n───────────────────\n  Read issue ──▶ Fix ──▶ Test ──▶ PR\n\n  Skip: full RCA, prevention plan,\n  runbook, lessons learned\n  Keep: regression test (mandatory)\n```"},
      {"label": "Investigate first", "description": "Deep analysis before deciding on approach", "markdown": "```\nInvestigate First\n─────────────────\n  Read issue ──▶ 5 parallel agents ──▶ Report\n\n  Output: Root cause analysis\n  + hypothesis ranking\n  + recommended approach\n  No code changes yet\n```"},
      {"label": "Hotfix", "description": "Emergency fix, minimal process", "markdown": "```\nHotfix (emergency)\n──────────────────\n  Read issue ──▶ Fix ──▶ Push\n\n  Skip: agents, RCA, prevention\n  Keep: basic test verification\n  Post-fix: schedule proper RCA\n```"}
    ],
    "multiSelect": false
  }]
)

Based on answer, adjust workflow:

  • Proper fix: All 11 phases, 5 parallel RCA agents
  • Quick fix: Phases 1, 6, 7, 11 only — skip RCA agents and prevention
  • Investigate first: Enter plan mode for read-only analysis, then decide
  • Hotfix: Phases 1, 6, 11 only — emergency path

Sub-question: Local-CI Strategy (AskUserQuestion — M118 #1467)

Once the approach is chosen, ask whether to run CI locally before pushing — orthogonal to fix depth:

# Skip when invocation flag is explicit:
#   /ork:fix-issue 123 --local-ci          → skip, run full suite locally
#   /ork:fix-issue 123 --security-only     → skip, security tests only
#   /ork:fix-issue 123 --push-and-let-ci   → skip, no local run
#
# Force local-CI when issue has security or data-loss labels (warns user it overrode their choice).

AskUserQuestion(questions=[{
  "question": "Before push?",
  "header": "Local CI",
  "options": [
    {"label": "Push and let CI run (default)", "description": "Fastest round-trip, CI catches failures"},
    {"label": "Run full suite locally first", "description": "~2-3 min extra; catches CI failures locally before push"},
    {"label": "Run security tests only", "description": "~30s; covers the usual blocker class — secrets, deps, common vulns"}
  ]
}])

Override rule: if the issue's GitHub labels include security or data-loss, override the user's selection with "Run full suite locally first" and surface a one-line notification: *"Security/data-loss label detected — running full local suite as a precaution."* The user can still bypass with the --push-and-let-ci arg, which logs the bypass for audit.

If 'Investigate first' selected:

# 1. Enter read-only plan mode
EnterPlanMode("Investigate issue: $ISSUE_REF")

# 2. Investigation phase — Read/Grep/Glob ONLY, no Write/Edit
#    - Read the issue description and linked context
#    - Trace the error path through relevant code
#    - Search for related issues, past fixes, test failures
#    - Build hypothesis list with evidence

# 3. Produce RCA report:
#    - Root cause hypothesis (ranked by confidence)
#    - Affected files and blast radius
#    - Recommended approach (proper fix vs quick fix)
#    - Risk assessment

# 4. Exit plan mode — returns analysis for user decision
ExitPlanMode()

# 5. User reviews RCA. If "proceed with fix" → continue to Phase 5 (Fix).
#    If "need more info" → re-enter investigation.

Load Read("${CLAUDE_SKILL_DIR}/rules/evidence-gathering.md") for detailed workflow adjustments per approach.

STEP 0b: Select Orchestration Mode

Choose Agent Teams (mesh) or Task tool (star). Load Read("${CLAUDE_SKILL_DIR}/references/agent-selection.md") for the selection criteria, cost comparison, and task creation patterns.

Service Discovery & Visual Inspection

When the issue involves a running web app, API, or UI bug, discover services and inspect visually before forming hypotheses:

# 1. Discover services via Portless (preferred)
portless list 2>/dev/null
# api → api.localhost:1355   (port 8080)
# app → app.localhost:1355   (port 3000)

# 2. Fallback: discover ports manually
lsof -iTCP -sTCP:LISTEN -nP | grep -E 'node|python|java'

# 3. Visual inspection with agent-browser
agent-browser open "http://app.localhost:1355"
agent-browser screenshot /tmp/issue-before.png     # capture broken state
agent-browser console                              # check for JS errors
agent-browser network log                          # inspect failed API calls
agent-browser get text @error-banner               # extract error messages

Use Portless named URLs (*.localhost:1355) in all investigation steps — they're stable, self-documenting, and eliminate port-guessing failures. Install with npm i -g portless.

Workflow Overview

PhaseActivitiesOutput
1. Understand IssueRead GitHub issue detailsProblem statement
1b. Service DiscoveryPortless list, agent-browser visual inspectionService URLs, screenshots
2. Similar Issue DetectionSearch for related past issuesRelated issues list
3. Hypothesis FormationForm hypotheses with confidence scoresRanked hypotheses
4. Root Cause Analysis5 parallel agents investigateConfirmed root cause
5. Fix DesignDesign approach based on RCAFix specification
6. ImplementationApply fix with testsWorking code
7. ValidationVerify fix resolves issue, screenshot after stateEvidence
8. PreventionHow to prevent recurrencePrevention plan
9. RunbookCreate/update runbook entryRunbook
10. Lessons LearnedCapture knowledgePersisted learnings
11. Commit and PRCreate PR with fixMerged PR

Progressive Output (CC 2.1.76)

Output results incrementally as each phase completes — don't batch until the PR:

After PhaseShow User
1. Understand IssueProblem statement, affected files
3. Hypothesis FormationRanked hypotheses with confidence scores
4. RCAConfirmed root cause, evidence chain
6. ImplementationFix description, files changed
7. ValidationTest results, before/after behavior

For the proper fix path with 5 parallel RCA agents, output each agent's findings as they return — don't wait for all 5. If one agent identifies the root cause with high confidence early, flag it immediately so the user can confirm and skip remaining agents.

Phase Handoffs (CC 2.1.71)

Write handoff JSON after phases 3, 4, 6, 7 to .claude/chain/. See chain-patterns skill for schema.

After PhaseHandoff FileKey Outputs
3. Hypothesis03-hypotheses.jsonRanked hypotheses with confidence scores
4. RCA04-rca.jsonConfirmed root cause, evidence, affected files
6. Implementation06-fix.jsonFix description, files changed, test plan
7. Validation07-validation.jsonTest results, coverage delta

Worktree-Isolated RCA Agents (CC 2.1.50)

Phase 4 agents SHOULD use isolation: "worktree" when they need to edit files:

Agent(subagent_type="debug-investigator",
  prompt="Investigate hypothesis: {desc}...",
  isolation="worktree", run_in_background=true)

Post-Fix Monitoring (CC 2.1.71)

After Phase 11 (commit + PR), schedule CI monitoring:

# Guard: Skip cron in headless/CI (CLAUDE_CODE_DISABLE_CRON)
# if env CLAUDE_CODE_DISABLE_CRON is set, run a single check instead
CronCreate(
  schedule="*/5 * * * *",
  prompt="Check CI for PR #{pr_number}: gh pr checks {pr_number} --repo {repo}.
    All pass → CronDelete this job. Any fail → alert with details."
)

Worktree Cleanup (CC 2.1.72)

If worktree isolation was used in Phase 4, clean up after validation:

# After Phase 7 validation passes — exit worktree, keep branch for PR
ExitWorktree(action="keep")

Every EnterWorktree or isolation: "worktree" agent must have a matching cleanup. If agents used isolation: "worktree", they handle their own exit — but if the lead entered a worktree in Step 0, it must call ExitWorktree before Phase 11 commit.

Fix Pattern Memory

If memory MCP is available (from Step -1 probe), save the fix pattern:

if capabilities.memory:
  mcp__memory__create_entities([{
    name: "fix-pattern-{slug}",
    entityType: "fix-pattern",
    observations: [root_cause, fix_description, regression_test, issue_ref]
  }])
Full phase details: Load Read("${CLAUDE_SKILL_DIR}/references/fix-phases.md") for bash commands, templates, and procedures for each phase.

Critical Constraints

  • Feature branch MANDATORY -- NEVER commit directly to main or dev
  • Regression test MANDATORY -- write failing test BEFORE implementing fix
  • Prevention required -- at least one of: automated test, validation rule, or process check
  • Make minimal, focused changes; DO NOT over-engineer

CC 2.1.49 Enhancements

Load Read("${CLAUDE_SKILL_DIR}/references/cc-enhancements.md") for session resume, task metrics, tool guidance, worktree isolation, and adaptive thinking.

Rules Quick Reference

RuleImpactWhat It Covers
evidence-gathering (load ${CLAUDE_SKILL_DIR}/rules/evidence-gathering.md)HIGHUser intent verification, confidence scale, key decisions
rca-five-whys (load ${CLAUDE_SKILL_DIR}/rules/rca-five-whys.md)HIGH5 Whys iterative causal analysis
rca-fishbone (load ${CLAUDE_SKILL_DIR}/rules/rca-fishbone.md)MEDIUMIshikawa diagram, multi-factor analysis
rca-fault-tree (load ${CLAUDE_SKILL_DIR}/rules/rca-fault-tree.md)MEDIUMFault tree analysis, AND/OR gates, critical systems
Push notifications (CC 2.1.110+): Issue-fix flows can span 10–20 min with RCA → fix → test → PR. When the fix lands and tests pass, call PushNotification so the user knows the fix is ready for review. Requires Remote Control + "Push when Claude decides" config; fails silently if unavailable. ``python PushNotification( title="ork:fix-issue complete", body=f"#{issue_number}: fix pushed, {tests_passing}/{tests_total} tests · PR #{pr_number}" ) ``

Agent Coordination

SendMessage (Evidence Sharing)

When an RCA agent discovers the root cause, share with the fix agent:

SendMessage(to="debug-investigator", message="Root cause: race condition in cache invalidation — see git blame for commit abc123")

Context Passing

All 5 RCA agents receive: issue description, ranked hypotheses, reproduction steps, and affected file paths — not just "investigate issue #N".

Skill Chain

After fix is applied: TaskCreate(subject="Verify fix", addBlockedBy=[fix_task_id])/ork:verify.

Verification Gate

Before claiming any fix is complete, apply the 5-step verification gate: Read("${CLAUDE_PLUGIN_ROOT}/skills/shared/rules/verification-gate.md"). "Should work now" is not evidence — run the test, read the output, cite the result.

Response Protocol

When reporting fix status, follow Read("${CLAUDE_PLUGIN_ROOT}/skills/shared/rules/anti-sycophancy.md") — state findings directly, no performative language. Use the agent status protocol: DONE, DONE_WITH_CONCERNS, BLOCKED, or NEEDS_CONTEXT.

Related Skills

  • ork:commit - Commit issue fixes
  • debug-investigator - Debug complex issues
  • browser-tools - Visual inspection with agent-browser + Portless
  • ork:issue-progress-tracking - Auto-updates from commits
  • ork:remember - Store lessons learned
Session recovery (CC 2.1.108+): After idle periods or interruptions, use /recap to restore conversational context alongside checkpoint-resume state. Enabled by default since CC 2.1.110 (even with telemetry disabled).

References

Load on demand with Read("${CLAUDE_SKILL_DIR}/references/<file>"):

FileContent
fix-phases.mdBash commands, templates, procedures per phase
agent-selection.mdOrchestration mode selection criteria and cost comparison
similar-issue-search.mdSimilar issue detection patterns
hypothesis-rca.mdHypothesis-based root cause analysis
agent-teams-rca.mdAgent Teams RCA workflow
prevention-patterns.mdRecurrence prevention patterns
cc-enhancements.mdCC 2.1.49 session resume, task metrics, adaptive thinking

Version: 2.4.0 (March 2026) — Rich elicitation with options for fix approach, progressive output for incremental phase results

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

windsurf

30.83%
按下载量换算309

trae

23.32%
按下载量换算234

Claude Code

17.35%
按下载量换算174

Antigravity

12.33%
按下载量换算124

Gemini CLI

6.78%
按下载量换算68

OpenCode

3.64%
按下载量换算36

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills