技能进化者
- 作者仓库星标 1,104
- 作者仓库 archive
- 领域
- 数据
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @dp-archive · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 需要 · GitHub
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
第 1 步:分析输入
如果提供了跟踪,则运行分析脚本: 输出包括: 成功率 平均次数、持续时间、令牌 常见问题和警告
第 2 步:提取问题详细信息
对于失败或有问题的跟踪,提取完整上下文:如果仅提供反馈(无跟踪),请跳过此步骤。
第 3 步:找出根本原因
使用references/issue-patterns.md将问题映射到技能组件:问题类型·可能的修复位置execution_failure·scripts/,错误处理high_turn_count·SKILL.md清晰度,添加示例tool_errors·scripts/,输入验证
第 4 步:应用修复
阅读目标技能并根据分析应用更改: 对于脚本错误:修复脚本、添加验证、改进错误消息 对于效率问题:添加示例、决策树、更清晰的说明 对于令牌问题:减少 SKILL.md,将内容移至引用/ 对于触发问题:更新 frontmatter 描述
# Skill Evolver
Analyze skill execution traces to discover issues, identify improvement opportunities, and apply fixes to skill files.
## Trace Format
Traces are JSON with this structure:
```json
{
"id": "uuid",
"request": "user's original request",
"skills_used": ["skill-name"],
"success": true/false,
"total_turns": 2,
"total_input_tokens": 5000,
"total_output_tokens": 200,
"duration_ms": 7000,
"steps": [
{"role": "assistant", "content": "...", "tool_name": null},
{"role": "tool", "tool_name": "...", "tool_input": {}, "tool_result": "..."}
],
"llm_calls": [
{"turn": 1, "stop_reason": "tool_use", "input_tokens": 2500, "output_tokens": 50}
]
}
```
## Workflow
This skill can receive two types of input (at least one required):
- **Traces**: Execution trace data from real skill runs — provides data-driven problem discovery
- **Feedback**: User-written improvement suggestions — provides directed guidance for changes
When both are provided, combine insights: use traces to validate/discover issues and feedback to prioritize and guide fixes.
### Step 1: Analyze Inputs
**If traces are provided**, run the analysis script:
```bash
scripts/analyze_traces.py <traces.json> [--skill <name>] [--format json|text]
```
Output includes:
- Success rate
- Average turns, duration, tokens
- Common issues and warnings
- Recommendations
**If feedback is provided**, identify the user's improvement goals and map them to actionable changes.
**If both are provided**, cross-reference: does the feedback align with trace-discovered issues? Use feedback to prioritize which trace-identified problems to fix first.
### Step 2: Extract Issue Details
For failed or problematic traces, extract full context:
```bash
scripts/extract_issue_context.py <traces.json> --failed
scripts/extract_issue_context.py <traces.json> --trace-id <id> --show-llm
scripts/extract_issue_context.py <traces.json> --high-turns
```
Skip this step if only feedback was provided (no traces).
### Step 3: Identify Root Causes
Map issues to skill components using [references/issue-patterns.md](references/issue-patterns.md):
| Issue Type | Likely Fix Location |
|------------|-------------------|
| execution_failure | scripts/, error handling |
| high_turn_count | SKILL.md clarity, add examples |
| tool_errors | scripts/, input validation |
| high_token_usage | SKILL.md verbosity, progressive disclosure |
| repeated_tool_calls | SKILL.md decision trees |
For feedback-only input, map the user's suggestions directly to the appropriate skill components.
### Step 4: Apply Fixes
Read the target skill and apply changes based on analysis:
1. **For script errors**: Fix scripts, add validation, improve error messages
2. **For efficiency issues**: Add examples, decision trees, clearer instructions
3. **For token issues**: Reduce SKILL.md, move content to references/
4. **For trigger issues**: Update frontmatter description
5. **For feedback-guided changes**: Apply the user's specific suggestions
**Scope constraints — strictly follow:**
- Only modify the target skill's **existing files** (SKILL.md, scripts/, references/)
- Do NOT create new reference files, templates, or guides
- Do NOT search the web for domain-specific content
- Do NOT generate CHANGELOG, improvement reports, or other extra deliverables
- The evolved skill files themselves are the sole deliverable
## Quick Reference
### Issue Severity Levels
- **high**: Failures, max_tokens, tool errors → Fix immediately
- **medium**: High turns, high tokens, retries → Optimize
- **low**: Long duration → Consider optimization
### Key Metrics Thresholds
| Metric | Warning | Action |
|--------|---------|--------|
| success_rate | <90% | Review failures |
| avg_turns | >4 | Simplify workflow |
| avg_tokens | >30000 | Reduce context |
| duration_ms | >60000 | Optimize scripts |
### Common Fixes
**Low success rate:**
- Add error handling in scripts
- Add input validation
- Clarify ambiguous instructions
**High turn count:**
- Add decision tree
- Provide more examples
- Use scripts for multi-step operations
**High token usage:**
- Reduce SKILL.md lines (<500)
- Move details to references/
- Remove redundant examples
章节与文件索引
按说明文件中的顺序排列。
迹线格式
工作流程
第 1 步:分析输入
第 2 步:提取问题详细信息
第 3 步:找出根本原因
文件/命令 -> true/false · validate/discover · scripts/analyze_traces.py · traces.js · scripts/extract_issue_context.py · references/issue-patterns.md
内容校验值 -> 38670c31190f
当前原文的自动摘译,尚未人工审校。
迹线格式
跟踪是具有以下结构的 JSON:
工作流程
该技能可以接收两种类型的输入(至少需要一种): 跟踪:来自实际技能运行的执行跟踪数据 — 提供数据驱动的问题发现 反馈:用户编写的改进建议 — 提供针对变更的定向指导 当两者都提供时,结合见解:使用跟踪来验证/发现问题,使用反馈来确定优先级并指导修复。