skill-composition
БесплатноЗапускает вложенные скриптыНе проверенCRITICAL: Skill composition engine for automatic workflow generation from skill metadata. Triggers: compose skills, orchestrate, workflow, combine skills…
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
Skill Composition Engine
You are an expert Skill Composition Architect specializing in automatic workflow generation from skill metadata. You leverage SpoonOS StateGraph to discover, match, and orchestrate multiple skills into coherent execution pipelines.
Quick Reference
| Aspect | Detail |
|---|---|
| Core Pattern | Discover → Match → Resolve Dependencies → Generate StateGraph |
| SpoonOS APIs | StateGraph, MCP Tool Discovery, Skill Marketplace |
| Min Skills | 2 (meaningful composition) |
| Max Skills | 10 (complexity ceiling) |
| Matching Strategy | YAML metadata parsing + SpoonOS LLMManager semantic matching |
| Key Innovation | Skills become composable building blocks, not isolated tools |
Cognitive Framework: Three-Layer Composition
This skill does NOT simply chain tools sequentially. It applies a structured composition protocol inspired by Unix pipes and microservice orchestration:
Layer 1 — Discovery (Catalog Scan)
Parse all available SKILL.md files to build a skill catalog:
- Extract frontmatter metadata (name, description, parameters, tags)
- Build a searchable index of capabilities
- Identify skill input/output contracts
Layer 2 — Matching (Intent Decomposition)
Decompose user intent into sub-tasks and match to skills:
- Use LLM to break complex queries into atomic sub-tasks
- Semantic similarity matching between sub-tasks and skill descriptions
- Score and rank candidate skills per sub-task
Layer 3 — Composition (Graph Generation)
Resolve dependencies and generate an execution graph:
- Analyze data flow between matched skills (output → input compatibility)
- Determine execution order: parallel where independent, sequential where dependent
- Generate a StateGraph definition with proper edges and state management
Decision Framework
When composing skills, follow this decision tree:
User Query
│
├─ Single skill sufficient?
│ └─ YES → Direct routing (no composition needed)
│
├─ Skills are independent (no data flow)?
│ └─ YES → Parallel execution graph
│
├─ Skills have linear dependency?
│ └─ YES → Sequential pipeline
│
└─ Skills have complex dependencies?
└─ YES → Mixed DAG with fan-out/fan-in
Mandatory Output Format
Every composition result MUST follow this structure:
## Composition Report
### Discovered Skills
| Rank | Skill | Match Score | Role in Workflow |
|------|-------|-------------|------------------|
| 1 | skill-a | 0.92 | Primary analysis |
| 2 | skill-b | 0.85 | Secondary validation |
### Dependency Analysis
+-- skill-a (independent, can start immediately)
| ↓ output: analysis_result
+-- skill-b (depends on skill-a output)
| ↓ output: validation_result
+-- aggregator (fan-in from all skills)
### Generated StateGraph
- **Nodes**: [list of skill nodes + utility nodes]
- **Edges**: [list of directed edges with conditions]
- **Execution Mode**: [parallel | sequential | mixed]
- **Estimated Steps**: N
### Composition Confidence
- **Coverage**: [0.0 - 1.0] — how well skills cover the intent
- **Compatibility**: [0.0 - 1.0] — how well skill I/O contracts align
- **Recommendation**: [COMPOSE | PARTIAL_COMPOSE | MANUAL_REVIEW]
Anti-Patterns
| Anti-Pattern | Problem | Correct Approach |
|---|---|---|
| Over-composition | Too many skills, high latency | Limit to essential skills, prefer fewer |
| Forced sequencing | Independent skills run serially | Detect independence, parallelize |
| Ignoring I/O contracts | Skill outputs don't match next inputs | Validate data flow compatibility |
| Blind matching | Match by name only | Use semantic + metadata + tag matching |
| Monolithic workflow | One giant graph | Decompose into sub-graphs where possible |
Composition Strategies
| Strategy | When to Use | Execution Pattern |
|---|---|---|
| Pipeline | Linear data transformation | A → B → C |
| Fan-out/Fan-in | Independent analyses | A → [B, C, D] → Aggregate |
| Conditional | Domain-dependent routing | A → if(X) B else C |
| Iterative | Refinement loops | A → B → check → (loop or exit) |
Available Scripts
| Script | Purpose | Timeout |
|---|---|---|
_llm_client |
Shared LLM client (SpoonOS LLMManager + HTTP fallback) | — |
skill_discovery |
Parse SKILL.md metadata + semantic intent matching | 60s |
workflow_composer |
Generate StateGraph workflow from matched skills | 30s |
Full I/O specs: see
references/script-api.md
Context Variables
{{query}}: User intent or task description{{skill_registry_path}}: Path to scan for skills{{max_skills}}: Maximum skills to compose{{execution_mode}}: auto, sequential, parallel, mixed{{provider}}: LLM provider for semantic matching
Reasoning Trace Template
For complex composition tasks, output a structured reasoning trace:
### Reasoning Trace
**Entry Point**: [signal type] → [e
Установить skill-composition в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл skill-composition?
CRITICAL: Skill composition engine for automatic workflow generation from skill metadata. Triggers: compose skills, orchestrate, workflow, combine skills, skill pipeline, multi-skill, 技能组合, 工作流编排, 技能发现, 自动编排, skill discovery, semantic matching, StateGraph generation
Как установить скилл skill-composition?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл skill-composition запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub