技能简化
- 作者仓库星标 2,029
- 作者仓库 Claude-Code-Workflow
- 领域
- 通用
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @catlog22 · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Skill Simplify
Three-phase pipeline: analyze functional inventory, apply optimization rules, verify integrity.
**Phase Reference Documents** (read on-demand):
| Phase | Document | Purpose |
|-------|----------|---------|
| 1 | [phases/01-analysis.md](phases/01-analysis.md) | Extract functional inventory, identify redundancy, validate pseudo-code format |
| 2 | [phases/02-optimize.md](phases/02-optimize.md) | Apply simplification rules, fix format issues |
| 3 | [phases/03-check.md](phases/03-check.md) | Verify functional integrity, validate format |
## Input Processing
```javascript
const targetPath = input.trim()
const targetFile = targetPath.endsWith('.md') ? targetPath : `${targetPath}/SKILL.md`
const originalContent = Read(targetFile)
const originalLineCount = originalContent.split('\n').length
```
## TodoWrite Pattern
```javascript
TodoWrite({ todos: [
{ content: `Phase 1: Analyzing ${targetFile}`, status: "in_progress", activeForm: "Extracting functional inventory" },
{ content: "Phase 2: Optimize", status: "pending" },
{ content: "Phase 3: Integrity Check", status: "pending" }
]})
```
## Core Rules
1. **Preserve ALL functional elements**: Code blocks with logic, agent calls, data structures, routing, error handling, input/output specs
2. **Only reduce descriptive content**: Flowcharts, verbose comments, duplicate sections, examples that repeat logic
3. **Never summarize algorithm logic**: If-else branches, function bodies, schemas must remain verbatim
4. **Classify code blocks**: Distinguish `functional` (logic, routing, schemas) from `descriptive` (ASCII art, examples, display templates) — only descriptive blocks may be deleted
5. **Merge equivalent variants**: Single/multi-perspective templates differing only by a parameter → one template with variant comment
6. **Fix format issues**: Nested backtick template literals in code fences → convert to prose; hardcoded option lists → flag for dynamic generation; workflow handoff references → ensure execution steps present
7. **Validate pseudo-code**: Check bracket matching, variable consistency, structural completeness
8. **Quantitative verification**: Phase 3 counts must match Phase 1 counts for functional categories; descriptive block decreases are expected
## Error Handling
| Error | Resolution |
|-------|------------|
| Target file not found | Report error, stop |
| Check FAIL (missing functional elements) | Show delta, revert to original, report which elements lost |
| Check WARN (descriptive decrease or merge) | Show delta with justification |
| Format issues found | Report in check, fix in Phase 2 |
章节与文件索引
按说明文件中的顺序排列。
核心规则
错误处理
文件/命令 -> ${targetPath}/SKILL.md · Phase 1: Analyzing ${targetFile} · functional · descriptive
内容校验值 -> be4705fbf1ec
当前原文的自动摘译,尚未人工审校。
核心规则
保留所有功能元素:包含逻辑、代理调用、数据结构、路由、错误处理、输入/输出规范的代码块 仅减少描述性内容:流程图、详细注释、重复部分、重复逻辑的示例 切勿总结算法逻辑:If-else 分支、函数体、模式必须逐字保留 对代码块进行分类:区分
functional(逻辑、路由、模式)与descriptive(ASCII 艺术、示例、显示)模板)——只有描述性块可以被删除错误处理
错误 · 解决方案 未找到目标文件 · 报告错误,停止 检查失败(缺少功能元素) · 显示增量,恢复到原始状态,报告丢失的元素 检查警告(描述性减少或合并) · 显示增量并说明理由 发现格式问题 · 报告检查,在第 2 阶段修复