escalate-issues
关于
The escalate-issues skill triages complex maintenance problems by severity and creates actionable reports when automated cleanup fails. It handles unsafe code deletions, domain-specific configurations, breaking changes, complex refactoring, and security findings like hardcoded secrets. The skill documents context and routes issues to appropriate specialist agents or humans.
快速安装
Claude Code
推荐npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/escalate-issues在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
escalate-issues
適用時機
此技適用於維護任務遇超出自動清理之問題時:
- 不確定代碼是否可安全刪
- 配置改需領域專長(安全、效能、架構)
- 清理中發現破壞性變更
- 需複雜重構(非僅清理)
- 安全敏感之發現(寫死之密秘、漏洞)
勿用於有明修之簡單問題。僅於自動清理有險或不足時升級。
輸入
| 參數 | 類型 | 必要 | 說明 |
|---|---|---|---|
issue_description | string | 是 | 問題之明述 |
severity | enum | 是 | critical、high、medium、low |
context_files | array | 否 | 相關文件之路徑 |
specialist | string | 否 | 目標代理(若未指則自路由) |
blocking | boolean | 否 | 問題是否阻後續清理(預設:false) |
步驟
步驟一:評嚴重度
以標準嚴重度分類問題。
CRITICAL — 阻生產功能:
- 活用代碼中破之 import
- 安全漏洞(暴露之密秘、SQL 注入)
- 清理致數據遺失之險
- 生產服務中斷
HIGH — 影響可維護性或開發生產力:
- 大量死代碼(>1000 行)
- 破之 CI/CD 管線
- 環境間大幅配置漂移
- 可能動態載入之未被引模組
MEDIUM — 衛生小疵:
- 未用之輔助函數(<100 行)
- 陳舊之文檔待更
- 棄用之配置文件(存而不用)
- 非關鍵路徑之 lint 警告
LOW — 風格不一:
- 縮排混(可行而不一)
- 行尾空白
- 命名不一(camelCase vs snake_case)
- 格式小異
嚴重度決策樹:
Does it break production? → CRITICAL
Does it block development? → HIGH
Does it impact code quality? → MEDIUM
Is it purely cosmetic? → LOW
預期: 問題以明嚴重度標分類
失敗時: 若不定,預設 HIGH 並升級予人再分類
步驟二:文檔發現
為專家審捕所有相關語境。
問題報告模板:
# Issue: [Brief Title]
**Severity**: CRITICAL | HIGH | MEDIUM | LOW
**Discovered During**: [Skill name, e.g., clean-codebase]
**Date**: YYYY-MM-DD
**Blocking**: Yes | No
## Description
Clear description of the problem in 2-3 sentences.
## Context
- **File(s)**: [List of affected files with line numbers]
- **Related**: [Related issues, commits, or previous attempts to fix]
- **Impact**: [What breaks if this isn't fixed, or what's wasted if not cleaned]
## Evidence
```language
# Code snippet or log excerpt showing the problem
Attempted Fixes
- Tried X but failed because Y
- Considered Z but uncertain due to W
Recommendation
- Option 1: [Safe conservative approach]
- Option 2: [More aggressive fix with risks]
- Preferred: [Which option to pursue and why]
Specialist Routing
Suggested Agent: [agent-name] Reason: [Why this specialist is appropriate]
References
- [Link to related documentation]
- [Link to similar past issues]
**預期:** 問題以全語境文檔於 `ESCALATION_REPORTS/issue_YYYYMMDD_HHMM.md`
**失敗時:** (無——恒文檔之,縱不全)
### 步驟三:定路由
配問題類型於合適之專家代理或人審。
**路由表**:
| 問題類型 | 專家 | 原因 |
|------------|-----------|---------|
| 安全漏洞 | security-analyst | 需安全專長 |
| GxP 合規之慮 | gxp-validator | 需監管知識 |
| 架構決定 | senior-software-developer | 設計模式專長 |
| 配置管理 | devops-engineer | 基礎設施知識 |
| 依賴衝突 | devops-engineer | 包管理專長 |
| 效能瓶頸 | senior-data-scientist | 優化知識 |
| 代碼風格爭 | code-reviewer | 風格指南之權 |
| 死代碼不定 | r-developer (or lang-specific) | 語言特定知識 |
| 測試破不明 | code-reviewer | 測試設計專長 |
| 文檔準確性 | senior-researcher | 需領域知識 |
| 授權相容 | auditor | 法律/合規專長 |
**自動路由邏輯**:
```python
def route_issue(severity, issue_type):
if severity == "CRITICAL":
# Always escalate to human for critical issues
return "human"
if "security" in issue_type or "secret" in issue_type:
return "security-analyst"
if "gxp" in issue_type or "compliance" in issue_type:
return "gxp-validator"
if "architecture" in issue_type or "design" in issue_type:
return "senior-software-developer"
if "config" in issue_type or "deployment" in issue_type:
return "devops-engineer"
# Default: code-reviewer for general code issues
return "code-reviewer"
預期: 問題帶理由路至合適之專家
失敗時: 若無明專家,升級予人以手動路由
步驟四:建可行之問題報告
生合於目標對象(代理或人)之格式化報告。
予專家代理(MCP 工具之結構式格式):
---
type: escalation
severity: high
from_agent: janitor
to_agent: security-analyst
blocking: false
---
# Security Concern: Hardcoded API Key in Config
**File**: config/production.yml:45
**Pattern**: API_KEY="sk_live_abc123..."
**Request**: Please review if this is a valid secret or a placeholder.
If valid, recommend secure credential management strategy.
**Context**: Discovered during config cleanup sweep.
予人審(詳細 markdown):
# Escalation Report: Uncertain Dead Code Removal
**From**: Janitor Agent
**Date**: 2026-02-16
**Severity**: HIGH
## Problem
File `src/legacy_payments.js` (450 lines) appears unused but contains
complex payment processing logic. Static analysis shows zero references,
but name suggests business-critical functionality.
## Why Escalated
- Uncertain if payment code is dynamically loaded at runtime
- Potential data loss risk if deleted incorrectly
- Requires domain knowledge to assess business impact
## Evidence
- No direct imports found
- Last modified 8 months ago
- Git history shows it was part of payment refactor
## Recommendation
Request human review before deletion. If confirmed dead:
1. Archive to archive/legacy/ directory
2. Document in ARCHIVE_LOG.md
3. Create ticket to verify payment flows still work
## Next Steps
Awaiting human confirmation before proceeding with cleanup.
預期: 報告已合於目標對象之格
失敗時: (無——若不定以通用 markdown 生報告)
步驟五:追升級狀態
維所有升級之日誌以防重複報告。
# Escalation Log
| ID | Date | Severity | Issue | Specialist | Status |
|----|------|----------|-------|-----------|--------|
| ESC-001 | 2026-02-16 | CRITICAL | Broken prod import | human | Resolved |
| ESC-002 | 2026-02-16 | HIGH | Dead payment code | human | Pending |
| ESC-003 | 2026-02-16 | MEDIUM | Config drift | devops-engineer | In Progress |
預期: ESCALATION_LOG.md 已以新條目更
失敗時: 若日誌不存,建之
步驟六:若需則通知並阻
若問題阻後續維護,則通知並暫停清理。
阻斷邏輯:
- CRITICAL 問題恒阻
- HIGH 問題若於關鍵路徑則阻
- MEDIUM/LOW 問題不阻
通知:
⚠️ MAINTENANCE BLOCKED ⚠️
Issue ESC-002 (HIGH severity) requires human review before proceeding.
**Affected Operation**: clean-codebase (Step 5: Remove Dead Code)
**Reason**: Uncertain if src/legacy_payments.js is truly dead
**Action Required**: Review ESCALATION_REPORTS/ESC-002_2026-02-16.md
Once resolved, re-run maintenance from Step 5.
預期: 維護已暫停;明通知已生
失敗時: 若通知機制不可得,於報告中文檔之
驗證清單
升級後:
- 問題嚴重度已正評
- 全語境已文檔(文件、證據、所試)
- 合適之專家已識
- 升級報告已建於 ESCALATION_REPORTS/
- ESCALATION_LOG.md 已更
- 若用則阻斷狀態已傳
- 報告無敏感信息外露
常見陷阱
-
過升級:為簡單問題升級浪專家之時。僅於真不定或有險時升。
-
欠升級:刪代碼「以觀測試是否過」而不升級可致生產中斷。
-
語境不足:無證據升級迫專家再查。含文件路徑、行號、錯誤訊息。
-
模糊之述:「配置有問題」不可行。具體:「配置漂移:dev 用 API v1,prod 用 v2」。
-
不追狀態:再升已審之問題。先查 ESCALATION_LOG.md。
-
密秘外露:升級報告中含實 API key 或密碼。遮敏感值。
相關技能
- clean-codebase — 常於不定時觸發升級
- tidy-project-structure — 或發現複雜組織問題
- repair-broken-references — 於引用不明是否修或刪時升級
- compliance/security-scan — 升級安全發現
- general/issue-triage — 通用問題分類模式
GitHub 仓库
相关推荐技能
content-collections
元Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。
polymarket
元这个Claude Skill为开发者提供完整的Polymarket预测市场开发支持,涵盖API调用、交易执行和市场数据分析。关键特性包括实时WebSocket数据流,可监控实时交易、订单和市场动态。开发者可用它构建预测市场应用、实施交易策略并集成实时市场预测功能。
creating-opencode-plugins
元该Skill帮助开发者创建OpenCode插件,用于接入命令、文件、LSP等25+种事件。它提供了插件结构、事件API规范和JavaScript/TypeScript实现模式,适合需要拦截操作、扩展功能或自定义事件处理的场景。开发者可通过它快速构建响应式模块来增强OpenCode AI助手的能力。
sglang
元SGLang是一个专为LLM设计的高性能推理框架,特别适用于需要结构化输出的场景。它通过RadixAttention前缀缓存技术,在处理JSON、正则表达式、工具调用等具有重复前缀的复杂工作流时,能实现极速生成。如果你正在构建智能体或多轮对话系统,并追求远超vLLM的推理性能,SGLang是理想选择。
