skill-composer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Composer
Skill Composer
Purpose
用途
Orchestrate complex workflows by chaining multiple skills into validated execution DAGs. Discovers applicable skills, resolves dependencies, validates compatibility, presents execution plans, and manages skill-to-skill context passing.
通过将多个Skill串联为经过验证的执行DAG来编排复杂工作流。可发现适用Skill、解析依赖、验证兼容性、呈现执行计划,并管理Skill间的上下文传递。
Operator Context
操作者上下文
This skill operates as an operator for multi-skill orchestration, configuring Claude's behavior for DAG-based workflow composition with dependency resolution and context passing between skills.
该Skill作为多Skill编排的操作者,配置Claude的行为以实现基于DAG的工作流组合,支持依赖解析与Skill间的上下文传递。
Hardcoded Behaviors (Always Apply)
硬编码行为(始终生效)
- CLAUDE.md Compliance: Read and follow repository CLAUDE.md files before composing any workflow
- Over-Engineering Prevention: Only compose skills that are directly requested. Prefer simple 2-3 skill chains over complex orchestrations. Do not add speculative skills or "nice to have" additions without explicit user request
- Dry Run First: ALWAYS show execution plan and get user confirmation before running skills
- DAG Validation: ALWAYS validate execution graph is acyclic before execution
- Context Validation: ALWAYS verify output/input compatibility between chained skills
- Error Isolation: ALWAYS catch skill failures and determine if remaining chain can continue
- Skill Discovery: Scan skills/*/SKILL.md for available skills before building any DAG
- CLAUDE.md 合规性:在组合任何工作流之前,阅读并遵循仓库中的CLAUDE.md文件
- 防止过度设计:仅组合直接被请求的Skill。优先选择简单的2-3个Skill链,而非复杂编排。未经用户明确请求,不得添加推测性Skill或“锦上添花”的额外Skill
- 先执行试运行:在运行Skill之前,始终展示执行计划并获得用户确认
- DAG验证:在执行之前,始终验证执行图是否为无环图
- 上下文验证:始终验证串联Skill间的输出/输入兼容性
- 错误隔离:始终捕获Skill执行失败,并判断剩余链是否可以继续执行
- Skill发现:在构建任何DAG之前,扫描skills/*/SKILL.md文件以获取可用Skill
Default Behaviors (ON unless disabled)
默认行为(启用状态,除非手动禁用)
- Communication Style: Report facts without self-congratulation. Show command output rather than describing it. Be concise but informative.
- Temporary File Cleanup: Remove temporary files (skill index, DAG files, intermediate outputs) at task completion. Keep only files explicitly needed for final output.
- Parallel Optimization: Execute independent skills concurrently when no shared resources or dependencies exist
- Verbose Logging: Show skill selection reasoning and execution progress for each phase
- Compatibility Checks: Validate skill input/output formats match before execution using
references/compatibility-matrix.md - Pattern Recognition: Suggest known composition patterns from when applicable
references/composition-patterns.md
- 沟通风格:仅报告事实,不自我夸赞。直接展示命令输出而非描述输出。表述简洁但信息完整。
- 临时文件清理:任务完成后删除临时文件(Skill索引、DAG文件、中间输出)。仅保留最终输出明确需要的文件。
- 并行优化:当无共享资源或依赖关系时,并发执行独立Skill
- 详细日志:展示每个阶段的Skill选择依据和执行进度
- 兼容性检查:执行前使用验证Skill输入/输出格式是否匹配
references/compatibility-matrix.md - 模式识别:适用时从中推荐已知的组合模式
references/composition-patterns.md
Optional Behaviors (OFF unless enabled)
可选行为(禁用状态,除非手动启用)
- Auto-retry Failed Skills: Retry failed skills with adjusted parameters (max 2 retries)
- Adaptive Composition: Modify execution plan based on intermediate results
- Skill Suggestion: Proactively suggest additional skills that might help
- 自动重试失败Skill:调整参数后重试失败的Skill(最多2次)
- 自适应组合:根据中间结果修改执行计划
- Skill建议:主动推荐可能有帮助的额外Skill
What This Skill CAN Do
该Skill可实现的功能
- Discover available skills and build execution DAGs with dependency resolution
- Chain skills sequentially, in parallel, or with conditional branching
- Validate composition compatibility (acyclic, type-safe, ordered)
- Pass context between skills with output/input transformation
- Handle partial failures with isolation and recovery options
- Present dry-run execution plans before committing to execution
- 发现可用Skill并构建支持依赖解析的执行DAG
- 按顺序、并行或带条件分支的方式串联Skill
- 验证组合兼容性(无环、类型安全、有序)
- 通过输出/输入转换在Skill间传递上下文
- 处理部分失败,支持隔离与恢复选项
- 在实际执行前展示试运行执行计划
What This Skill CANNOT Do
该Skill无法实现的功能
- Execute skills without showing the plan first (dry run is mandatory)
- Compose workflows with circular dependencies
- Chain skills with incompatible input/output types without transformation
- Replace single-skill invocation (if one skill suffices, use it directly)
- Skip DAG validation to save time
- 不展示计划直接执行Skill(试运行是强制要求)
- 组合存在循环依赖的工作流
- 在不进行转换的情况下串联输入/输出类型不兼容的Skill
- 替代单个Skill的调用(若单个Skill即可满足需求,请直接使用)
- 为节省时间跳过DAG验证
Instructions
操作步骤
Phase 1: DISCOVER
阶段1:发现
Goal: Analyze the task and find applicable skills.
Step 1: Analyze the user's request
Identify:
- Primary goals (what needs to be accomplished)
- Quality requirements (testing, verification, documentation)
- Domain constraints (language, framework, standards)
- Execution constraints (sequential vs parallel, conditionals)
Step 2: Discover available skills
bash
undefined目标:分析任务并找到适用的Skill。
步骤1:分析用户请求
明确:
- 主要目标(需要完成的内容)
- 质量要求(测试、验证、文档)
- 领域约束(语言、框架、标准)
- 执行约束(顺序执行 vs 并行执行、条件分支)
步骤2:发现可用Skill
bash
undefinedTODO: scripts/discover_skills.py not yet implemented
TODO: scripts/discover_skills.py not yet implemented
Manual alternative: scan skills directory for SKILL.md files
Manual alternative: scan skills directory for SKILL.md files
find ./skills -name "SKILL.md" -exec grep -l "^name:" {} ; | sort
Review the discovered skills. Categorize by type (workflow, testing, quality, documentation, code-analysis, debugging) with dependency metadata.
**Step 3: Select skills**
Choose only skills directly needed for the stated goals. Apply the minimum-skills principle:
- Can a single skill handle this? If yes, do NOT compose. Invoke it directly.
- Can 2 skills handle this? Prefer that over 3+.
- Is a skill being added "for quality" or "just in case"? Remove it.
Cross-reference selections against `references/compatibility-matrix.md` to confirm chaining is valid before proceeding.
**Gate**: Task goals identified. Available skills indexed. Selected skills directly address stated goals with no extras. Proceed only when gate passes.find ./skills -name "SKILL.md" -exec grep -l "^name:" {} ; | sort
查看发现的Skill,按类型(工作流、测试、质量、文档、代码分析、调试)及依赖元数据进行分类。
**步骤3:选择Skill**
仅选择与所述目标直接相关的Skill,遵循最小Skill原则:
- 单个Skill即可处理?若是,请勿组合,直接调用该Skill。
- 2个Skill即可处理?优先选择该方案而非3个及以上Skill的组合。
- 是否为了“提升质量”或“以防万一”添加Skill?若如此,请移除该Skill。
在继续之前,对照`references/compatibility-matrix.md`确认所选Skill的串联是否有效。
**准入条件**:已明确任务目标。已索引可用Skill。所选Skill直接匹配所述目标,无额外Skill。仅当满足所有条件时方可继续。Phase 2: PLAN
阶段2:规划
Goal: Build a validated execution DAG.
Step 1: Build the DAG
bash
undefined目标:构建经过验证的执行DAG。
步骤1:构建DAG
bash
undefinedTODO: scripts/build_dag.py not yet implemented
TODO: scripts/build_dag.py not yet implemented
Manual alternative: construct the execution DAG as a JSON structure
Manual alternative: construct the execution DAG as a JSON structure
with nodes (skills) and edges (dependencies) based on the task analysis
with nodes (skills) and edges (dependencies) based on the task analysis
**Step 2: Validate the DAG**
Validate the execution DAG manually by checking:
- No circular dependencies exist between skills
- Output types from each skill match input requirements of downstream skills
- All referenced skills exist in the skill index
- Dependencies satisfy topological ordering
Validation checks:
- **Acyclic**: No circular dependencies
- **Compatibility**: Output types match input requirements (consult `references/compatibility-matrix.md`)
- **Availability**: All referenced skills exist in the index
- **Ordering**: Dependencies satisfy topological ordering
If validation fails, fix the issue and re-validate. Common fixes:
- Circular dependency: Remove one edge or split into two independent compositions
- Type mismatch: Choose different skill or add transformation step
- Missing skill: Check spelling, re-run discovery
- Ordering violation: Reorder phases to satisfy dependencies
**Step 3: Present the execution plan**
=== Execution Plan ===
Phase 1 (Sequential):
-> skill-name
Purpose: [what it does in this context]
Output: [what it produces]
Phase 2 (Parallel):
-> skill-a
Purpose: [what it does]
Input: [from Phase 1]
-> skill-b
Purpose: [what it does]
Input: [from Phase 1]
Phase 3 (Sequential):
-> skill-c
Purpose: [what it does]
Input: [from Phase 2]
Skills: N | Phases: N | Parallel phases: N
Proceed? [Y/n]
**Gate**: DAG is acyclic. All skills exist. Input/output types are compatible. Topological ordering is valid. User has seen the plan. Proceed only when gate passes.
**步骤2:验证DAG**
手动验证执行DAG,检查以下内容:
- Skill间不存在循环依赖
- 每个Skill的输出类型与后续Skill的输入要求匹配
- 所有引用的Skill均存在于Skill索引中
- 依赖关系满足拓扑排序
验证检查项:
- **无环**:不存在循环依赖
- **兼容性**:输出类型与输入要求匹配(参考`references/compatibility-matrix.md`)
- **可用性**:所有引用的Skill均存在于索引中
- **有序性**:依赖关系满足拓扑排序
若验证失败,修复问题后重新验证。常见修复方案:
- 循环依赖:移除一条边或拆分为两个独立的组合
- 类型不匹配:选择其他Skill或添加转换步骤
- Skill缺失:检查拼写,重新运行发现流程
- 顺序违规:调整阶段顺序以满足依赖关系
**步骤3:呈现执行计划**
=== 执行计划 ===
阶段1(顺序执行):
-> skill-name
用途:[在此场景中的作用]
输出:[生成的内容]
阶段2(并行执行):
-> skill-a
用途:[作用]
输入:[来自阶段1]
-> skill-b
用途:[作用]
输入:[来自阶段1]
阶段3(顺序执行):
-> skill-c
用途:[作用]
输入:[来自阶段2]
Skill数量:N | 阶段数量:N | 并行阶段数量:N
是否继续?[Y/n]
**准入条件**:DAG为无环图。所有Skill均存在。输入/输出类型兼容。拓扑排序有效。用户已查看计划。仅当满足所有条件时方可继续。Phase 3: EXECUTE
阶段3:执行
Goal: Run skills in topological order, passing context between them.
Step 1: Execute each phase
For sequential phases:
- Invoke skill with context from previous phases
- Capture output
- Verify output matches expected type
- Proceed to next phase
For parallel phases:
- Launch all independent skills using Task tool
- Wait for all to complete
- Aggregate results for next phase
Step 2: Pass context between skills
For each skill transition:
- Capture output from completed skill
- Transform to format expected by next skill
- Inject as context when invoking next skill
- Verify transformation succeeded
Step 3: Report progress
After each phase completes, report:
- Phase number and skills completed
- Output summary
- Overall progress (e.g., "Phase 2/3 complete")
Step 4: Handle failures during execution
If a skill fails mid-chain:
-
Assess impact: Does this block downstream skills?
- Critical (blocks all downstream): Stop chain, report what completed
- Isolated (blocks one branch): Continue other branches
- Recoverable (transient failure): Retry with adjusted parameters (max 2 attempts)
-
Report failure context:
Skill failed: [skill-name]
Phase: N
Error: [error message]
Downstream impact: [list blocked skills]
Continuing branches: [list unaffected skills]
Recovery options:
1. Fix error and retry
2. Skip skill and continue (if non-critical)
3. Abort entire workflow- Execute recovery: Based on user selection or automatic policy (if auto-retry enabled)
Gate: All phases executed. All skill outputs captured. Context passed successfully between all transitions. Proceed only when gate passes.
目标:按拓扑顺序运行Skill,在Skill间传递上下文。
步骤1:执行每个阶段
对于顺序阶段:
- 使用前一阶段的上下文调用Skill
- 捕获输出
- 验证输出是否符合预期类型
- 进入下一阶段
对于并行阶段:
- 使用Task工具启动所有独立Skill
- 等待所有Skill完成
- 聚合结果用于下一阶段
步骤2:在Skill间传递上下文
对于每个Skill转换:
- 捕获已完成Skill的输出
- 转换为下一Skill预期的格式
- 调用下一Skill时注入为上下文
- 验证转换是否成功
步骤3:报告进度
每个阶段完成后,报告:
- 阶段编号及已完成的Skill
- 输出摘要
- 整体进度(例如:“已完成阶段2/3”)
步骤4:处理执行过程中的失败
若Skill在执行链中途失败:
-
评估影响:是否会阻塞后续Skill?
- 严重(阻塞所有后续Skill):停止执行链,报告已完成的内容
- 隔离(仅阻塞一个分支):继续执行其他分支
- 可恢复(临时故障):调整参数后重试(最多2次)
-
报告失败上下文:
Skill执行失败:[skill-name]
阶段:N
错误:[错误信息]
后续影响:[被阻塞的Skill列表]
可继续执行的分支:[未受影响的Skill列表]
恢复选项:
1. 修复错误并重试
2. 跳过该Skill继续执行(若为非关键Skill)
3. 终止整个工作流- 执行恢复操作:根据用户选择或自动策略(若启用自动重试)执行
准入条件:所有阶段已执行。已捕获所有Skill输出。所有转换间的上下文传递成功。仅当满足所有条件时方可继续。
Phase 4: REPORT
阶段4:报告
Goal: Collect results and clean up.
Step 1: Generate results summary
=== Composition Results ===
Execution Summary:
Total phases: N
Skills executed: N
Duration: X minutes
Phase Results:
Phase 1: [skill-name] - [status]
Output: [summary]
Phase 2: [skill-a] - [status]
[skill-b] - [status]
Output: [summary]
Phase 3: [skill-c] - [status]
Output: [summary]
Final Output:
[Key deliverables with file paths]Step 2: Clean up temporary files
Remove: , , and any intermediate output files created during composition.
/tmp/skill-index.json/tmp/execution-dag.jsonGate: Results reported. Temporary files cleaned up. Composition complete.
目标:收集结果并清理。
步骤1:生成结果摘要
=== 组合结果 ===
执行摘要:
总阶段数:N
已执行Skill数量:N
耗时:X分钟
阶段结果:
阶段1:[skill-name] - [状态]
输出:[摘要]
阶段2:[skill-a] - [状态]
[skill-b] - [状态]
输出:[摘要]
阶段3:[skill-c] - [状态]
输出:[摘要]
最终输出:
[关键交付物及文件路径]步骤2:清理临时文件
删除:、及组合过程中创建的所有中间输出文件。
/tmp/skill-index.json/tmp/execution-dag.json准入条件:已报告结果。临时文件已清理。组合完成。
Examples
示例
Example 1: Feature with Tests
示例1:带测试的功能开发
User says: "Add rate limiting middleware with comprehensive tests"
Actions:
- DISCOVER: Identify implementation + testing goals. Select workflow-orchestrator, test-driven-development, verification-before-completion
- PLAN: Build 3-phase sequential DAG. Validate compatibility. Show plan.
- EXECUTE: Phase 1 creates subtasks, Phase 2 implements with TDD, Phase 3 verifies
- REPORT: All phases complete, 24 tests pass, 94% coverage Result: 3-skill chain, 32 minutes, no failures
用户需求:“添加限流中间件并完成全面测试”
操作:
- 发现:明确实现+测试目标。选择workflow-orchestrator、test-driven-development、verification-before-completion
- 规划:构建3阶段顺序DAG。验证兼容性。展示计划。
- 执行:阶段1创建子任务,阶段2采用TDD实现,阶段3进行验证
- 报告:所有阶段完成,24项测试通过,覆盖率94% 结果:3个Skill的执行链,耗时32分钟,无失败
Example 2: Parallel Quality Checks
示例2:并行质量检查
User says: "Check code quality and documentation before PR"
Actions:
- DISCOVER: Identify quality + documentation goals. Select code-linting, comment-quality, verification-before-completion
- PLAN: Phase 1 runs code-linting and comment-quality in parallel (no shared resources). Phase 2 runs verification sequentially.
- EXECUTE: Parallel phase completes in ~6 seconds (vs 10 sequential). Verification merges results.
- REPORT: 33% time savings from parallelization, all checks pass Result: 3-skill chain with 1 parallel phase, 8 minutes
用户需求:“提交PR前检查代码质量与文档”
操作:
- 发现:明确质量+文档目标。选择code-linting、comment-quality、verification-before-completion
- 规划:阶段1并行运行code-linting和comment-quality(无共享资源)。阶段2顺序执行验证。
- 执行:并行阶段耗时约6秒(顺序执行需10秒)。验证阶段合并结果。
- 报告:并行执行节省33%时间,所有检查通过 结果:3个Skill的执行链,含1个并行阶段,耗时8分钟
Example 3: Research Before Implementation
示例3:先调研再实现
User says: "Implement pagination following existing patterns"
Actions:
- DISCOVER: Identify research + implementation goals. Select pr-miner, codebase-analyzer, workflow-orchestrator, test-driven-development
- PLAN: Phase 1 runs pr-miner and codebase-analyzer in parallel. Phase 2 plans with orchestrator. Phase 3 implements with TDD.
- EXECUTE: Research discovers cursor-based pagination convention. Plan follows it. Implementation matches.
- REPORT: Pattern compliance 100%, all tests pass Result: 4-skill chain with 1 parallel phase, 42 minutes
用户需求:“遵循现有模式实现分页功能”
操作:
- 发现:明确调研+实现目标。选择pr-miner、codebase-analyzer、workflow-orchestrator、test-driven-development
- 规划:阶段1并行运行pr-miner和codebase-analyzer。阶段2使用编排工具制定计划。阶段3采用TDD实现。
- 执行:调研发现基于游标分页的约定。计划遵循该约定。实现与约定匹配。
- 报告:模式合规性100%,所有测试通过 结果:4个Skill的执行链,含1个并行阶段,耗时42分钟
Error Handling
错误处理
Error: "Circular dependency detected"
错误:“检测到循环依赖”
Cause: Skills reference each other cyclically in the DAG
Solution:
- Review dependency graph for cycles
- Remove or reorder the problematic dependency
- Consider splitting into independent compositions
- Re-validate DAG before proceeding
原因:Skill在DAG中互相引用形成循环
解决方案:
- 检查依赖图中的循环
- 移除或重新排序有问题的依赖
- 考虑拆分为独立的组合
- 重新验证DAG后再继续
Error: "Skill output incompatible with next skill input"
错误:“Skill输出与下一Skill输入不兼容”
Cause: Output type from one skill does not match expected input of the next
Solution:
- Consult for valid chains
references/compatibility-matrix.md - Add an intermediate transformation skill if one exists
- Choose a different skill combination that has compatible types
- Re-validate after changes
原因:前一Skill的输出类型与下一Skill的预期输入类型不匹配
解决方案:
- 参考查看有效链
references/compatibility-matrix.md - 若存在,添加中间转换Skill
- 选择输入/输出类型兼容的Skill组合
- 修改后重新验证
Error: "Skill failed during execution"
错误:“执行过程中Skill失败”
Cause: A skill in the chain encountered an error
Solution:
- Determine failure impact: critical (blocks downstream), isolated (one branch), or recoverable
- If isolated: continue other branches, report partial results
- If recoverable: retry with adjusted parameters (max 2 attempts)
- If critical: abort chain, report what completed, suggest recovery options
原因:执行链中的某个Skill遇到错误
解决方案:
- 判断失败影响:严重(阻塞后续)、隔离(仅阻塞分支)或可恢复
- 若为隔离失败:继续执行其他分支,报告部分结果
- 若为可恢复失败:调整参数后重试(最多2次)
- 若为严重失败:终止执行链,报告已完成内容并建议恢复选项
Error: "Skill not found in index"
错误:“索引中未找到Skill”
Cause: Referenced skill does not exist or name is misspelled
Solution:
- Check spelling against skill index output
- Re-run discovery script to refresh the index
- Verify the skill directory exists under skills/
- Use the suggested alternative from the discovery output if the name was close
原因:引用的Skill不存在或名称拼写错误
解决方案:
- 对照Skill索引输出检查拼写
- 重新运行发现脚本刷新索引
- 验证skills/目录下是否存在该Skill
- 若名称相近,使用发现输出中的建议替代
Anti-Patterns
反模式
Anti-Pattern 1: Over-Composition
反模式1:过度组合
What it looks like: User asks "Add a login feature" and response chains 6 skills: workflow-orchestrator, TDD, code-linting, comment-quality, code-review, verification
Why wrong: Adds unnecessary overhead. Most skills don't add value for a simple feature request. 2-3 skills would suffice.
Do instead: Use test-driven-development directly. Only compose multiple skills when the task explicitly requires orchestration.
表现:用户要求“添加登录功能”,却串联了6个Skill:workflow-orchestrator、TDD、code-linting、comment-quality、code-review、verification
问题:添加了不必要的开销。对于简单功能请求,多数Skill无法增加价值。2-3个Skill足够。
正确做法:直接使用test-driven-development。仅当任务明确需要编排时才组合多个Skill。
Anti-Pattern 2: Skipping the Dry Run
反模式2:跳过试运行
What it looks like: Immediately executing skills without showing the plan
Why wrong: User cannot catch composition errors early. No opportunity to adjust before wasting time. Violates the "Dry Run First" hardcoded behavior.
Do instead: Always present the execution plan and wait for confirmation before proceeding.
表现:不展示计划直接执行Skill
问题:用户无法提前发现组合错误。在浪费时间前没有调整机会。违反“先执行试运行”的硬编码行为。
正确做法:始终先呈现执行计划,等待用户确认后再继续。
Anti-Pattern 3: Sequential When Parallel Is Safe
反模式3:可并行时却顺序执行
What it looks like: Running code-linting, then comment-quality, then go-pr-quality-gate in sequence when all three are independent
Why wrong: Forces ~15 minutes of sequential execution when ~5 minutes parallel would work. No dependencies exist between them.
Do instead: Analyze dependencies carefully. Independent skills with no shared resources run in parallel.
表现:按顺序运行code-linting、comment-quality、go-pr-quality-gate,而这三个Skill完全独立
问题:强制顺序执行耗时约15分钟,而并行执行仅需约5分钟。三者之间无依赖关系。
正确做法:仔细分析依赖关系。无共享资源的独立Skill应并行执行。
Anti-Pattern 4: Incompatible Skill Chaining
反模式4:串联不兼容的Skill
What it looks like: Chaining test-driven-development (outputs: Go source files) into pr-miner (expects: Git repository URL)
Why wrong: Output type does not match input type. Will fail at runtime with a compatibility error.
Do instead: Consult during planning. Only chain skills with compatible interfaces.
references/compatibility-matrix.md表现:将test-driven-development(输出:Go源文件)串联到pr-miner(预期输入:Git仓库URL)
问题:输出类型与输入类型不匹配。运行时会因兼容性错误失败。
正确做法:规划阶段参考。仅串联接口兼容的Skill。
references/compatibility-matrix.mdAnti-Pattern 5: Forgetting Cleanup
反模式5:忘记清理
What it looks like: After composition completes, /tmp/ contains skill-index.json, execution-dag.json, and multiple intermediate output files
Why wrong: Temporary files accumulate across sessions, may contain sensitive data, and clutter the filesystem.
Do instead: Always execute cleanup in the REPORT phase. Remove all temporary files created during composition. Keep only files explicitly needed for the final output.
表现:组合完成后,/tmp/目录下存在skill-index.json、execution-dag.json及多个中间输出文件
问题:临时文件会跨会话累积,可能包含敏感数据,且会占用文件系统空间。
正确做法:始终在报告阶段执行清理操作。删除组合过程中创建的所有临时文件。仅保留最终输出明确需要的文件。
References
参考资料
This skill uses these shared patterns:
- Anti-Rationalization - Prevents shortcut rationalizations
- Verification Checklist - Pre-completion checks
该Skill使用以下共享模式:
- 反合理化 - 防止捷径合理化
- 验证清单 - 完成前检查
Domain-Specific Anti-Rationalization
领域特定反合理化
| Rationalization | Why It's Wrong | Required Action |
|---|---|---|
| "One skill can probably handle all of this" | Complex tasks need specialized skills | Discover applicable skills, compose what's needed |
| "No need to validate the DAG, it's simple" | Simple DAGs can still have type mismatches | Run validation script every time |
| "User doesn't need to see the plan" | Skipping dry run violates hardcoded behavior | Present plan, wait for confirmation |
| "I'll add a few extra skills for quality" | Over-composition wastes time and adds failure points | Only compose skills explicitly needed |
| 合理化理由 | 问题所在 | 要求的操作 |
|---|---|---|
| “一个Skill可能就能处理所有内容” | 复杂任务需要专业Skill | 发现适用Skill,仅组合需要的Skill |
| “DAG很简单,无需验证” | 简单DAG仍可能存在类型不匹配 | 每次都运行验证脚本 |
| “用户不需要看计划” | 跳过试运行违反硬编码行为 | 呈现计划并等待确认 |
| “我要添加几个额外Skill提升质量” | 过度组合浪费时间并增加故障点 | 仅组合明确需要的Skill |
Reference Files
参考文件
- : Proven multi-skill composition patterns with duration estimates
${CLAUDE_SKILL_DIR}/references/composition-patterns.md - : Skill input/output compatibility and valid chains
${CLAUDE_SKILL_DIR}/references/compatibility-matrix.md - : Common skill patterns with sequential/parallel decision trees
${CLAUDE_SKILL_DIR}/references/skill-patterns.md - : Real-world composition examples with execution output
${CLAUDE_SKILL_DIR}/references/examples.md
- :经过验证的多Skill组合模式,含耗时估算
${CLAUDE_SKILL_DIR}/references/composition-patterns.md - :Skill输入/输出兼容性及有效链
${CLAUDE_SKILL_DIR}/references/compatibility-matrix.md - :常见Skill模式,含顺序/并行决策树
${CLAUDE_SKILL_DIR}/references/skill-patterns.md - :真实世界的组合示例,含执行输出
${CLAUDE_SKILL_DIR}/references/examples.md