Super Skills
快速参考
┌─────────────────────────────────────────────────────────────┐
│ 🎯 Core: Understand → Plan → Execute → Iterate │
│ 🚨 Rule: Problem → Analyze → Solve → Continue (NEVER WAIT) │
│ 📊 Complexity: 4-8 Direct | 9-14 Staged | 15-20 Iterative │
└─────────────────────────────────────────────────────────────┘
核心理念
| 原则 | 说明 |
|---|
| 先理解 | 行动前深入分析需求 |
| 渐进交付 | 每个步骤都产出可验证的中间结果 |
| 预期失败 | 为每个阶段设计恢复机制 |
| 永不停止 | 主动解决问题;绝不暂停等待用户 |
工作流
UNDERSTAND ──→ PLAN ──→ EXECUTE ──→ ITERATE
│ │ │ │
Multi-layer Task Search & Feedback
Analysis Breakdown Install Adjustment
Complexity Risk ID Checkpoint Optimize
阶段 1:理解
1.1 多层分析
understanding:
surface: # Literal meaning
request: "{user's exact words}"
keywords: [key terms]
intent: # True intent
goal: "{what user really wants}"
success: "{success criteria}"
context: # Environment
env: "{OS/language/framework}"
constraints: "{time/resources/permissions}"
hidden: # Unstated needs
assumptions: "{implicit assumptions}"
edge_cases: "{boundary conditions}"
1.2 需求处理
| 类型 | 操作 |
|---|
| 明确 | 直接执行 |
| 隐含 | 主动补充 |
| 模糊 | 说明假设,选择最可能的解释 |
| 冲突 | 指出冲突,请求澄清 |
| 超出范围 | 解释原因,提供替代方案 |
1.3 复杂度评分
Dimensions (1-5 each):
technical + scope + uncertainty + dependencies = total
Strategy:
4-8 → Direct execution
9-14 → Staged verification
15-20 → Iterative prototyping
1.4 澄清
Confidence ≥70%: State assumptions → Continue → Leave adjustment points
Confidence <70%: Provide options for user to choose (NO open-ended questions)
阶段 2:规划
2.1 任务结构
task:
id: 1
name: "{task name}"
capability: "{capability type}"
input: [required inputs]
output: "{type/format}"
depends_on: [prerequisite task IDs]
timeout: "30s"
retries: 3
validation: "{success condition}"
fallback: "{alternative approach}"
2.2 依赖关系图
[1:Setup] → [2:Auth] → [3:Fetch] ─┐
↓
[4:Process] ← [5:Transform] ← [6:Parse]
↓
[7:Output]
Critical Path: 1→2→3→6→5→4→7
Parallel Opportunities: Independent tasks can run concurrently
2.3 能力映射
| 能力 | 状态 | 关键词 |
|---|
browser_automation | ❌ | browser、puppeteer、playwright |
api_integration | ❌ | api、rest、{service} |
data_extraction | ⚠️ | parse、pdf、ocr |
message_delivery | ❌ | slack、discord、email |
database_operations | ❌ | sql、mongodb |
deployment | ❌ | deploy、docker、k8s |
data_transformation | ✅ | — |
content_generation | ✅ | — |
code_execution | ✅ | — |
scheduling | ✅ | — |
✅ 内置 | ⚠️ 复杂 | ❌ 需要技能
阶段 3:获取技能
# Search priority
1. npx skills find {service_name} # Exact match
2. npx skills find {capability} {domain} # Combined
3. https://skills.sh/ # Browse
# Install
npx skills add <skill> -g
# On failure: Switch registry → Manual clone → Inline implementation
评估标准
| 维度 | 权重 |
|---|
| 功能匹配度 | 40% |
| 文档质量 | 20% |
| 维护状态 | 20% |
| 社区验证 | 10% |
| 依赖简洁性 | 10% |
阶段 4:风险与韧性
4.1 风险矩阵
| 风险 | 检测方式 | 自动解决方案 |
|---|
| 令牌过期 | 401/403 | 刷新 → 重新认证 → 降级 |
| 触发速率限制 | 429 | 退避 → 缓存 → 降级 |
| 超时 | 超时 | 延长 → 减少批次 → 分块 |
| 解析错误 | 解析错误 | 切换解析器 → 正则表达式 → 原始文本 |
| 连接失败 | 连接 | 重试 → 代理 → 离线模式 |
| 缺少依赖 | 导入错误 | 自动安装 → 替代包 → 内联 |
4.2 韧性模式
retry: max=3, backoff=exponential
circuit_breaker: threshold=5, recovery=60s
timeout: connect=10s, read=30s, total=120s
fallback: cache | default | skip
4.3 检查点
checkpoint:
trigger: after_each_task
content: [task_id, state, data, timestamp]
recovery: Load checkpoint → Validate → Resume from failure point
阶段 5:执行
5.0 🚨 问题解决(关键)
遇到问题 → 分析 → 解决 → 继续。绝不暂停等待。
Problem → Diagnose type → Analyze cause → Try solutions by priority → Continue
↓
Plan A fails → Plan B → Plan C → Degraded solution
自动修复表
| 问题 | 自动解决方案(按顺序) |
|---|
| 缺少依赖 | 安装 → 替代包 → 内联 |
| 权限被拒绝 | 调整权限 → 替代路径 → 最小权限 |
| API 失败 | 重试(退避)→ 切换端点 → 缓存 → 降级 |
| 超时 | 延长超时时间 → 减少批次 → 分块 → 异步 |
| 解析错误 | 切换解析器 → 正则表达式 → 原始文本 |
| 认证失败 | 刷新令牌 → 重新认证 → 备用凭据 |
| 资源耗尽 | 分块 → 清除缓存 → 流式处理 → 降低并发 |
| 网络问题 | 重试 → 切换网络 → 代理 → 离线 |
| 找不到文件 | 创建 → 默认值 → 跳过 |
思维方式
forbidden:
- "I encountered a problem and need your help"
- "Execution paused, waiting for instructions"
required:
- "Encountered X issue, trying Y solution"
- "Plan A failed, switching to Plan B"
- "Problem resolved, continuing execution"
升级处理(仅当满足所有条件时)
- 尝试了 ≥3 种不同方案
- 全部失败
- 目标完全无法实现
- 没有可接受的降级方案
5.1 执行模式
| 模式 | 使用场景 |
|---|
| 顺序 | 依赖关系紧密的任务 |
| 并行 | 相互独立的任务 |
| 流水线 | 数据流处理 |
| 迭代 | 需要反馈循环 |
5.2 进度模板
══════════════════════════════════════
📊 PROGRESS
══════════════════════════════════════
Phase 1: Setup [████████░░] 80%
✅ Task 1: Initialize Done (2.3s)
🔄 Task 2: Fetch Running...
⏳ Task 3: Process Waiting
──────────────────────────────────────
⏱️ Elapsed: 3m | ETA: ~5m
══════════════════════════════════════
阶段 6:迭代
反馈循环
Collect feedback → Analyze issues → Adjust approach → Loop
调整级别
| 级别 | 操作 |
|---|
| 轻微 | 调整参数、调整格式 |
| 中等 | 替换技能、添加/删除任务 |
| 重大 | 重新设计架构 |
执行计划模板
════════════════════════════════════════════════════
📋 SUPER SKILLS PLAN
════════════════════════════════════════════════════
🎯 REQUEST: {user's exact words}
📊 UNDERSTANDING
────────────────────────────────────────────────────
Intent: {true intent}
Success: {success criteria}
Complexity: {score} → {strategy}
Assumptions:
• {assumption 1}
• {assumption 2}
────────────────────────────────────────────────────
📋 TASKS
────────────────────────────────────────────────────
│ ID │ Task │ Capability │ Status │ Risk │
├────┼────────────┼─────────────┼────────┼──────┤
│ 1 │ {task} │ {capability}│ ✅/📦 │ 🟢/🔴│
Status: ✅ Built-in | 🔧 Found | 📦 Create
Risk: 🟢 Low | 🟡 Medium | 🔴 High
────────────────────────────────────────────────────
🔧 SKILLS
────────────────────────────────────────────────────
npx skills add {skill} -g
────────────────────────────────────────────────────
🛡️ RESILIENCE
────────────────────────────────────────────────────
Checkpoints: □ After Phase 1 □ After Phase 2
Fallbacks: {task} → {alternative}
────────────────────────────────────────────────────
✅ COMPLETION
────────────────────────────────────────────────────
□ {acceptance criterion 1}
□ {acceptance criterion 2}
════════════════════════════════════════════════════
示例:电商工作流
# "Scrape product data from multiple platforms daily, analyze price trends, send report"
understanding:
intent: "Automated price monitoring for pricing decisions"
success: "Daily price trend visualization report received"
complexity:
technical: 4, scope: 4, uncertainty: 3, dependencies: 4
total: 15 → Iterative prototyping strategy
tasks:
1. Configure product list → file_operations ✅
2. Multi-platform scraping → browser_automation ❌
3. Data persistence → database_operations ❌
4. Data cleaning → data_transformation ✅
5. Trend analysis → code_execution ✅
6. Generate charts → content_generation ✅
7. Generate report → content_generation ✅
8. Send email → message_delivery ❌
resilience:
checkpoints: [after:2 save:raw_data] [after:5 save:analysis]
fallbacks:
task_2: "Skip failed platforms, continue with others"
task_8: "Save to local file"
错误处理(每个错误都有自动解决方案)
| 阶段 | 错误 | 自动解决方案 |
|---|
| 分析 | 需求不明确 | 选择最可能的方案 → 说明假设 → 留出调整点 |
| 分析 | 超出能力范围 | 搜索替代方案 → 组合能力 → 部分实现 |
| 规划 | 循环依赖 | 打破最薄弱环节 → 合并任务 |
| 搜索 | 未找到技能 | 扩展关键词 → 在线搜索 → 自动创建 |
| 安装 | 安装失败 | 切换镜像源 → 手动克隆 → 内联实现 |
| 执行 | 认证失败 | 刷新 → 重新认证 → 降级为使用公开数据 |
| 执行 | 触发速率限制 | 退避 → 切换账户 → 使用缓存 |
| 执行 | 超时 | 增加超时时间 → 减少批次 → 跳过并继续 |
| 验证 | 结果不匹配 | 使用调整后的参数重试 → 放宽验证条件 → 标记以供审核 |
最佳实践
| 阶段 | 原则 |
|---|
| 理解 | 多层分析、主动提出假设、评估复杂度 |
| 规划 | 架构优先、明确依赖关系、提前识别风险 |
| 执行 | 绝不停止、尝试多种方案、优雅降级、增量验证 |
| 迭代 | 快速反馈、持续优化、积累知识 |
资源
- CLI:
npx skills --help
- 浏览:https://skills.sh/
- 能力:
references/capability_types.md
- 模板:
assets/skill_template.md