plugins/marketplace-pro/skills/composition/SKILL.md
Resolve high-level intents into ordered plugin composition plans using greedy set cover for capability matching and Kahn's topological sort for dependency ordering. Activates when working with "compose", "plugin composition", "capability matching", "dependency resolution", or "intent specification".
npx skillsauth add markus41/claude Intent-Based CompositionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The Intent-Based Composition Engine transforms a high-level description of what you want to achieve into a concrete, ordered plan of which plugins to install and how to configure them. Instead of manually inspecting each plugin's capabilities and dependencies, you describe your intent and the engine figures out the rest.
The engine operates in three phases:
Use this skill when:
Do not use this skill when:
Given N plugins each providing a different subset of capabilities, find the smallest collection of plugins that covers all the capabilities you need. This is the classic minimum set cover problem.
Optimal set cover is NP-hard, but the greedy heuristic produces a solution within a factor of ln(n)+1 of optimal -- more than good enough for plugin selection.
Input:
U = { cap-A, cap-B, cap-C, cap-D } -- capabilities you need
S = {
plugin-1 provides { cap-A, cap-B },
plugin-2 provides { cap-B, cap-C },
plugin-3 provides { cap-C, cap-D },
plugin-4 provides { cap-A, cap-B, cap-C },
}
Round 1: plugin-4 covers 3 of 4 remaining (cap-A, cap-B, cap-C)
U = { cap-D }
Round 2: plugin-3 covers 1 of 1 remaining (cap-D)
U = {} -- done!
Result: [ plugin-4, plugin-3 ] (2 plugins instead of 4)
When two plugins cover the same number of uncovered capabilities, the engine breaks ties by:
provider: "my-plugin" for a capability, that plugin winsAfter matching, the engine checks each selected plugin's conflicts array. If plugin A declares a conflict with capability X and plugin B provides capability X, the composition is rejected with a clear error message.
Selected plugins may depend on each other: plugin A requires capability X, which plugin B provides. Plugin B must be installed before plugin A. With many plugins and cross-dependencies, finding a valid ordering requires a topological sort.
Kahn's algorithm is a breadth-first approach to topological sorting that also naturally detects cycles.
Input graph (edges mean "must come before"):
plugin-B -> plugin-A (B provides what A requires)
plugin-C -> plugin-A (C provides what A requires)
plugin-D -> plugin-B (D provides what B requires)
Step 1: Compute in-degrees
plugin-D: 0 (no one must come before D)
plugin-C: 0
plugin-B: 1 (D must come before B)
plugin-A: 2 (B and C must come before A)
Step 2: Start queue with in-degree 0 nodes
queue = [plugin-C, plugin-D] (alphabetical for determinism)
Step 3: Process queue
Dequeue plugin-C -> output: [C]
plugin-A in-degree: 2 -> 1
Dequeue plugin-D -> output: [C, D]
plugin-B in-degree: 1 -> 0 -> enqueue B
Dequeue plugin-B -> output: [C, D, B]
plugin-A in-degree: 1 -> 0 -> enqueue A
Dequeue plugin-A -> output: [C, D, B, A]
Install order: plugin-C, plugin-D, plugin-B, plugin-A
If the output list has fewer nodes than the graph, some nodes could never reach in-degree 0 -- they form a cycle. The engine reports the exact cycle path:
ERROR: Cycle detected!
auth-plugin -> user-plugin -> auth-plugin (via capability "authentication")
The engine scans your project root for well-known files and directories to build a technology fingerprint:
| Detected File | Technologies Added |
|---|---|
| package.json | node, javascript |
| tsconfig.json | typescript |
| Dockerfile | docker, containers |
| Chart.yaml | helm, kubernetes |
| .github/ | github, github-actions |
| main.tf | terraform, iac |
| requirements.txt | python |
| go.mod | go, golang |
| vite.config.ts | vite, frontend |
| .mcp.json | mcp, claude-code |
For Node.js projects, the engine also reads package.json dependencies to detect frameworks like React, Vue, Next.js, Express, and database ORMs.
Each detected technology maps to configuration fragments that are merged into plugin configs. For example, detecting TypeScript adds { language: "typescript", strictMode: true } to each plugin's configuration.
Create a composition.yaml file to define your intent:
# Basic composition
intent: "Set up a CI/CD pipeline with security scanning"
requirements:
- capability: ci-cd
- capability: supply-chain-security
- capability: plugin-composition
# With provider preferences and constraints
intent: "Deploy a full-stack application with monitoring"
requirements:
- capability: kubernetes
provider: fullstack-iac
- capability: ci-cd
provider: deployment-pipeline
- capability: supply-chain-security
- capability: contextual-recommendations
constraints:
env: production
region: us-east-1
strictMode: "true"
# Minimal - just capabilities
intent: "Plugin development toolkit"
requirements:
- capability: plugin-dev-tools
- capability: plugin-composition
- capability: trust-scoring
| Field | Type | Required | Description |
|---|---|---|---|
| intent | string | yes | Human-readable goal description |
| requirements | array | yes | List of capability requirements |
| requirements[].capability | string | yes | Capability identifier to satisfy |
| requirements[].provider | string | no | Preferred plugin to provide this capability |
| constraints | object | no | Key-value pairs merged into all plugin configs |
Add a capabilities block to your plugin's .claude-plugin/plugin.json:
{
"name": "my-custom-plugin",
"version": "1.0.0",
"description": "My plugin description",
"capabilities": {
"provides": [
"my-custom-capability",
"another-capability"
],
"requires": [
"plugin-registry"
],
"conflicts": [
"legacy-capability"
]
}
}
supply-chain-security, not SupplyChainSecuritykubernetes-helm-deploy is better than deploymp-trust-scoringFor best results with the composition engine:
auth-jwt and auth-oauth are better than just authIntentSpec (YAML/JSON)
|
v
CapabilityMatcher (greedy set cover)
| reads: plugins/*/.claude-plugin/plugin.json
| output: MatchResult { selected, uncovered, conflicts }
v
DependencyResolver (Kahn's toposort)
| input: selected plugins + all manifests
| output: DependencyGraph { nodes, edges, hasCycles }
v
ConfigurationInferrer (project fingerprinting)
| scans: project root files
| output: InferredConfig[] per plugin
v
CompositionPlan
{ intent, plugins[], installOrder[], warnings[] }
src/composition/types.ts -- all interfaces, error classes, enumssrc/composition/engine.ts -- CapabilityMatcher, DependencyResolver, ConfigurationInferrer, CompositionEnginecommands/compose.md -- the /mp:compose slash command/mp:compose -- the slash command that invokes this enginesrc/security/trust-engine.tssrc/intelligence/fingerprint.tssrc/devstudio/server.tssrc/federation/registry.tsdevelopment
Enhanced plan-authoring skill with Pre-Writing context gathering, task metadata, non-TDD templates, Red Flags, telemetry, and an automated plan linter. Use when you have a spec or requirements for a multi-step task, before touching code.
tools
Documentation intelligence engine with graph-based API docs, algorithm library, and drift detection
tools
Ultraplan cloud planning — kick off a plan in the cloud from your terminal, review and revise in the browser, then execute remotely or send back to CLI
tools
--- name: mcp description: Configure MCP servers for Claude Code — stdio vs HTTP, authentication, Tools/Resources/Prompts distinction, channels (CI webhook, mobile relay, Discord bridge, fakechat), and cost of always-loaded tools. Use this skill whenever adding an MCP server, debugging connection issues, choosing between MCP Tools vs Prompts vs Resources, installing channel servers, or managing .mcp.json. Triggers on: "MCP server", "mcp config", "add Obsidian MCP", "install context7", "channels"