ops-triage

GitHub

跨平台问题分类与处理技能,整合Sentry、Linear和GitHub数据,自动识别已修复问题并分派活跃任务。

claude-ops/skills/ops-triage/SKILL.md Lifecycle-Innovations-Limited/claude-ops

Trigger Scenarios

需要汇总多源系统的问题状态 自动化排查和关闭已修复的缺陷

Install

npx skills add Lifecycle-Innovations-Limited/claude-ops --skill ops-triage -g -y
More Options

Non-standard path

npx skills add https://github.com/Lifecycle-Innovations-Limited/claude-ops/tree/main/claude-ops/skills/ops-triage -g -y

Use without installing

npx skills use Lifecycle-Innovations-Limited/claude-ops@ops-triage

指定 Agent (Claude Code)

npx skills add Lifecycle-Innovations-Limited/claude-ops --skill ops-triage -a claude-code -g -y

安装 repo 全部 skill

npx skills add Lifecycle-Innovations-Limited/claude-ops --all -g -y

预览 repo 内 skill

npx skills add Lifecycle-Innovations-Limited/claude-ops --list

SKILL.md

Frontmatter
{
    "name": "ops-triage",
    "model": "claude-opus-4-6",
    "effort": "high",
    "maxTurns": 40,
    "description": "Cross-platform issue triage. Pulls from Sentry (MCP), Linear (MCP), GitHub Issues (gh). Cross-references against code to find already-fixed issues. Auto-resolves fixed ones. Dispatches agents for active issues.",
    "allowed-tools": [
        "Bash",
        "Read",
        "Grep",
        "Glob",
        "Skill",
        "Agent",
        "AskUserQuestion",
        "TeamCreate",
        "SendMessage",
        "TaskCreate",
        "TaskUpdate",
        "TaskList",
        "WebFetch",
        "WebSearch",
        "LSP",
        "mcp__sentry__search_issues",
        "mcp__sentry__get_issue_details",
        "mcp__linear__list_issues",
        "mcp__linear__update_issue",
        "mcp__linear__get_issue",
        "mcp__linear__list_teams"
    ],
    "argument-hint": "[project-alias|sentry|linear|github|all]"
}

Runtime Context

Before triaging, load:

  1. Preferences: cat ${CLAUDE_PLUGIN_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}/preferences.json — read project registry for repo paths
  2. Daemon health: cat ${CLAUDE_PLUGIN_DATA_DIR}/daemon-health.json — ensure services healthy
  3. Secrets: Resolve via Doppler MCP (mcp__doppler__*) → env → Doppler CLI fallback → password manager: SENTRY_AUTH_TOKEN, LINEAR_API_KEY, GITHUB_TOKEN
  4. Ops memories: Check ${CLAUDE_PLUGIN_DATA_DIR}/memories/topics_active.md for issue context

OPS ► CROSS-PLATFORM TRIAGE

CLI/API Reference

gh CLI (GitHub)

Command Usage Output
gh issue list --state open --json number,title,body,labels,assignees,createdAt,url --limit 50 Open issues JSON array
gh issue list --repo <owner/repo> --state open --json number,title,labels,createdAt --limit 20 Repo issues JSON array
gh pr list --state merged --search "#<N>" PRs referencing issue JSON array
gh issue close <N> --comment "<msg>" Close issue Confirmation

sentry-cli / Sentry API

Command Usage Output
sentry-cli issues list --project <slug> --status unresolved Unresolved issues Issue list
curl -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" "https://sentry.io/api/0/projects/<org>/<proj>/issues/?query=is:unresolved" API fallback when MCP unavailable JSON array

Linear GraphQL (fallback when MCP unavailable)

Command Usage Output
curl -X POST https://api.linear.app/graphql -H "Authorization: $LINEAR_API_KEY" -H "Content-Type: application/json" -d '{"query":"{ issues(filter: {state: {type: {in: [\"started\",\"unstarted\"]}}}) { nodes { id title state { name } priority assignee { name } } } }"}' Active issues JSON

Agent Teams support

If CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 is set, use Agent Teams when dispatching fix agents for multiple issues. This enables:

  • Fix agents can share findings (e.g., agent fixing Sentry error discovers the same root cause as a Linear issue)
  • You can redirect agents if cross-referencing reveals duplicate issues
  • Agents report progress and you can prioritize which fix to merge first

Team setup (only when flag is enabled, Phase 4 dispatch):

TeamCreate("triage-fixers")
Agent(team_name="triage-fixers", name="fix-[issue-id]", subagent_type="ops:triage-agent", ...)

Use broadcast(content="Root cause found: missing index on users.email — check if your issue is related") to share discoveries.

If the flag is NOT set, fall back to standard parallel subagents.

Phase 1 — Gather issues in parallel

Run all of these simultaneously:

GitHub Issues

gh issue list --state open --json number,title,body,labels,assignees,createdAt,url --limit 50 2>/dev/null

GitHub Issues (registry-driven)

REGISTRY="${CLAUDE_PLUGIN_ROOT}/scripts/registry.json"
[ -f "$REGISTRY" ] || REGISTRY="${CLAUDE_PLUGIN_ROOT}/scripts/registry.example.json"
for repo in $(jq -r '.projects[] | select(.gsd == true) | .repos[]' "$REGISTRY" 2>/dev/null); do
  echo "=== $repo ==="
  gh issue list --repo "$repo" --state open --json number,title,labels,createdAt --limit 20 2>/dev/null
done

Sentry

If Sentry MCP is connected, fetch unresolved issues for all projects. Otherwise run: echo "Sentry MCP not available"

Linear

Use mcp__linear__list_teams to get team IDs, then mcp__linear__list_issues with filter: {state: {type: {in: ["unstarted", "started"]}}} for each team.


Phase 2 — Cross-reference against code

For each Sentry issue, check if it's already fixed:

  1. Extract the error message, file path, and line number from the Sentry event.
  2. grep for the relevant code in the affected repo.
  3. Check git log: git log --oneline --all -- [file] 2>/dev/null | head -20
  4. If the fix is merged and deployed (check ECS deploy timestamps), mark as resolved.

For each GitHub Issue:

  • Check if any merged PR references the issue number (gh pr list --state merged --search "#[N]")
  • If referenced and merged, mark as potentially resolved

Phase 3 — Confirm and resolve fixed issues

For issues confirmed fixed in code AND deployed, show the full list and use AskUserQuestion:

Found N issues confirmed fixed and deployed:

  [Sentry] [title] — fix in [commit], deployed [time ago]
  [Linear] [title] — fix in [commit], deployed [time ago]
  [GitHub] #[N] [title] — referenced in merged PR #[M]

  [Resolve all N]  [Review each one]  [Skip — don't auto-resolve]

If user picks "Review each one", show each issue individually with [Resolve] / [Skip] via AskUserQuestion.

For confirmed issues:

  • Sentry: use Sentry MCP to resolve the issue
  • Linear: use mcp__linear__update_issue with state: "Done"
  • GitHub: gh issue close [N] --comment "Auto-closed: fix confirmed deployed"

Log all resolutions.


Phase 4 — Present triage board

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 OPS ► TRIAGE — [date]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

AUTO-RESOLVED (already fixed)
 ✓ [Sentry] [title] — fix in [commit]
 ✓ [Linear] [title] — closed
 ✓ [GitHub] #[N] [title] — closed

ACTIVE ISSUES (needs work)
 CRITICAL  [source] [title] [age] [assigned?]
 HIGH      [source] [title] [age] [assigned?]
 MEDIUM    [source] [title] [age] [assigned?]

──────────────────────────────────────────────────────

Use batched AskUserQuestion calls (max 4 options each):

AskUserQuestion call 1:

  [Dispatch agent for [top critical issue]]
  [Dispatch agent for [second issue]]
  [Assign issue to sprint (Linear)]
  [More...]

AskUserQuestion call 2 (only if "More..."):

  [Bulk-assign all HIGH to current sprint]
  [Done]

Superpowers Integration

During this command's execution, invoke the following superpower skill at the specified checkpoint:

  • Checkpoint: When diagnosing an active issue before proposing a fix (root-cause investigation during Phase 2 cross-reference or Phase 4 agent dispatch brief).
  • Skill: superpowers:systematic-debugging
  • Why: Enforces hypothesis-driven root-cause analysis so fix agents target the real defect, not the symptom.

Dispatch fix agent

When dispatching for an issue, spawn an Agent using agents/triage-agent.md with:

  • Full issue context (error, stack trace, affected code)
  • Instruction to create feature branch, fix, and open PR
  • Report back on completion or if blocked

Filter to $ARGUMENTS project/source if specified.


Native tool usage

Tasks — triage progress

Use TaskCreate for each issue being investigated. Update with TaskUpdate as issues are resolved/dispatched/skipped. Gives the user a live triage checklist.

WebFetch — Sentry/GitHub enrichment

When Sentry MCP hits quota limits, fall back to WebFetch with https://sentry.io/api/0/projects/<org>/<project>/issues/?query=is:unresolved (using SENTRY_AUTH_TOKEN header). Same for GitHub issue details when gh is slow.

WebSearch — error context

Use WebSearch to find known solutions for recurring errors (e.g., "AWS RDS connection reset", "ECS task stopped reason"). Include findings in the triage board as context.

LSP — code navigation for fix agents

When dispatching fix agents, use LSP to find symbol definitions, references, and call hierarchies. This helps agents navigate unfamiliar codebases faster than grep.


Ledger Integration

CLAIM_KEY by issue type:

  • Sentry: sentry:issue:<short_id>
  • GitHub issue: gh:pr:<owner>/<repo>#<number> (reused for issues when no PR exists)
  • Infra alert: ci:run:<repo>:<run_id>

Pre-flight skip-check

CLAIM_KEY="sentry:issue:<short_id>"   # adjust per issue type
ledger query --claim-key "$CLAIM_KEY" --since=-PT24H

Skip issues with in_progress or done. Present awaiting_sam issues at the top of the triage board as "needs your decision."

Claim + resolve

# Claim when opening a triage pass on an issue
ledger write \
  --claim-key "$CLAIM_KEY" \
  --kind "fix" \
  --status "in_progress" \
  --title "Triage: <issue title>" \
  --ttl-sec 7200

# Resolve after fix dispatched or issue escalated
ledger write \
  --claim-key "$CLAIM_KEY" \
  --kind "fix" \
  --status "done" \
  --title "Triage: <issue title>" \
  --context "fix dispatched|escalated|snoozed: <reason>"

Version History

  • 64bad13 Current 2026-08-12 09:02

Same Skill Collection

claude-ops/skills/boss/SKILL.md
claude-ops/skills/flow/SKILL.md
claude-ops/skills/ledger/SKILL.md
claude-ops/skills/ops-accounts/SKILL.md
claude-ops/skills/ops-ar/SKILL.md
claude-ops/skills/ops-aws-audit/SKILL.md
claude-ops/skills/ops-comms/SKILL.md
claude-ops/skills/ops-competitors/SKILL.md
claude-ops/skills/ops-credentials/SKILL.md
claude-ops/skills/ops-daemon/SKILL.md
claude-ops/skills/ops-dash/SKILL.md
claude-ops/skills/ops-deploy-fix/SKILL.md
claude-ops/skills/ops-deploy/SKILL.md
claude-ops/skills/ops-desktop/SKILL.md
claude-ops/skills/ops-doctor/SKILL.md
claude-ops/skills/ops-ecom/SKILL.md
claude-ops/skills/ops-feature-dev/SKILL.md
claude-ops/skills/ops-fires/SKILL.md
claude-ops/skills/ops-fleet/SKILL.md
claude-ops/skills/ops-go/SKILL.md
claude-ops/skills/ops-gtm/SKILL.md
claude-ops/skills/ops-home/SKILL.md
claude-ops/skills/ops-inbox/SKILL.md
claude-ops/skills/ops-integrate/SKILL.md
claude-ops/skills/ops-leadgen/SKILL.md
claude-ops/skills/ops-linear/SKILL.md
claude-ops/skills/ops-mac/SKILL.md
claude-ops/skills/ops-marketing/SKILL.md
claude-ops/skills/ops-mcp/SKILL.md
claude-ops/skills/ops-merge/SKILL.md
claude-ops/skills/ops-monitor/SKILL.md
claude-ops/skills/ops-next/SKILL.md
claude-ops/skills/ops-orchestrate/SKILL.md
claude-ops/skills/ops-package/SKILL.md
claude-ops/skills/ops-pocket/SKILL.md
claude-ops/skills/ops-projects/SKILL.md
claude-ops/skills/ops-recap/SKILL.md
claude-ops/skills/ops-release/SKILL.md
claude-ops/skills/ops-resume/SKILL.md
claude-ops/skills/ops-revenue/SKILL.md
claude-ops/skills/ops-rotate-setup/SKILL.md
claude-ops/skills/ops-rotate/SKILL.md
claude-ops/skills/ops-secret-sync/SKILL.md
claude-ops/skills/ops-settings/SKILL.md
claude-ops/skills/ops-ship/SKILL.md
claude-ops/skills/ops-speedup/SKILL.md
claude-ops/skills/ops-status/SKILL.md
claude-ops/skills/ops-unifi/SKILL.md
claude-ops/skills/ops-update/SKILL.md

Metadata

Files
0
Version
2dbf8cb
Hash
de941cdc
Indexed
2026-08-12 09:02

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-12 22:38
浙ICP备14020137号-1 $お客様$