Agent助手
- 作者仓库星标 386
- 作者更新于 实时读取
- 作者仓库 vexjoy-agent
- 领域
- 通用
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @notque · 未声明 license
- Token 消耗评级
- 中等消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skill-composer
description: DAG-based multi-skill orchestration with dependency resolution. Orchestrate complex workflows by…
category: 通用
runtime: 无特殊运行时
---
# skill-composer 输出预览
## PART A: 任务判断
- 适用问题:通用任务拆解、检查和交付。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Overview / Reference Loading Table / Instructions”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于通用任务拆解、检查和交付,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Overview / Reference Loading Table / Instructions”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/tmp` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Overview / Reference Loading Table / Instructions”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: skill-composer
description: DAG-based multi-skill orchestration with dependency resolution. Orchestrate complex workflows by…
category: 通用
source: notque/vexjoy-agent
---
# skill-composer
## 什么时候使用
- 把通用方向的常用动作沉淀成 Agent 可调用的技能 适合处理通用任务拆解、检查、交付和复盘,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常不需要额外…
- 面向通用任务拆解、检查和交付,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Overview / Reference Loading Table / Instructions」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "skill-composer" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Overview / Reference Loading Table / Instructions
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Skill Composer
Overview
Orchestrate complex workflows by chaining multiple skills into validated execution DAGs. This skill discovers applicable skills, resolves dependencies, validates compatibility, presents execution plans, and manages skill-to-skill context passing. Use when a task requires 2+ skills chained together, parallel skill execution, or conditional branching between skills. Invoke the single skill directly when it can handle the request alone, or for simple sequential invocation that needs no dependency management.
Core principle: Minimize composition overhead. Prefer simple 2-3 skill chains. Add only skills directly needed or "nice to have" additions without explicit user request.
Reference Loading Table
| Signal | Load These Files | Why |
|---|---|---|
| tasks related to this reference | compatibility-matrix.md |
Loads detailed guidance from compatibility-matrix.md. |
| implementation patterns | composition-patterns.md |
Loads detailed guidance from composition-patterns.md. |
| example-driven tasks | examples.md |
Loads detailed guidance from examples.md. |
| implementation patterns | skill-patterns.md |
Loads detailed guidance from skill-patterns.md. |
Instructions
Phase 1: DISCOVER
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
Before building any DAG, scan skills/*/SKILL.md for available skills:
python3 ${CLAUDE_SKILL_DIR}/scripts/discover_skills.py ./skills
Review the discovered skills. Categorize by type (workflow, testing, quality, documentation, code-analysis, debugging) with dependency metadata.
Step 3: Select skills (Apply minimum-skills principle)
Choose only skills directly needed for the stated goals. This prevents over-composition and unnecessary failure points:
- Can a single skill handle this? If yes, invoke it directly. 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.
Phase 2: PLAN
Goal: Build a validated execution DAG.
Step 1: Build the DAG
Construct the execution DAG as a JSON structure with nodes (skills) and edges (dependencies) based on the task analysis:
python3 ${CLAUDE_SKILL_DIR}/scripts/build_dag.py skill-index.json task-description.json
Step 2: Validate the DAG (MANDATORY before execution)
ALWAYS validate the execution graph is acyclic before moving to execution. Validation checks:
- Acyclic: No circular dependencies exist between skills
- Compatibility: Output types from each skill match input requirements of downstream skills (consult
references/compatibility-matrix.md) - Availability: All referenced skills exist in the skill 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 (Dry run is MANDATORY)
ALWAYS show the execution plan and get user confirmation before running skills. This prevents wasting time on composition errors:
=== 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.
Phase 3: EXECUTE
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/input compatibility between chained skills
- Proceed to next phase
For parallel phases:
- Launch all independent skills using Task tool (execute independent skills concurrently when no shared resources or dependencies exist)
- Wait for all to complete
- Aggregate results for next phase
Step 2: Pass context between skills
ALWAYS verify output/input compatibility between chained skills before passing context:
- Capture output from completed skill
- Transform to format expected by next skill (validate using
references/compatibility-matrix.md) - 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")
Show command output rather than describing it. Be concise but informative.
Step 4: Handle failures during execution
ALWAYS catch skill failures and determine if remaining chain can continue. 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.
Phase 4: REPORT
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 temporary files at task completion. Keep only files explicitly needed for final output:
/tmp/skill-index.json/tmp/execution-dag.json- Any intermediate output files created during composition
Gate: Results reported. Temporary files cleaned up. Composition complete.
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
Error: "Skill output incompatible with next skill input"
Cause: Output type from one skill does not match expected input of the next Solution:
- Consult
references/compatibility-matrix.mdfor valid chains - Add an intermediate transformation skill if one exists
- Choose a different skill combination that has compatible types
- Re-validate after changes
Error: "Skill failed during execution"
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
Error: "Skill not found in index"
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
References
${CLAUDE_SKILL_DIR}/references/composition-patterns.md: Proven multi-skill composition patterns with duration estimates${CLAUDE_SKILL_DIR}/references/compatibility-matrix.md: Skill input/output compatibility and valid chains${CLAUDE_SKILL_DIR}/references/skill-patterns.md: Common skill patterns with sequential/parallel decision trees
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核