Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Intent-Based Composition

БесплатноБез исполняемых скриптовНе проверен

Resolve high-level intents into ordered plugin composition plans using greedy set cover for capability matching and Kahn's topological sort for dependency…

TheLobbiот TheLobbi★ 22 звезды на GitHub

Об этом скилле

Intent-Based Composition Skill

Overview

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:

  1. Capability Matching -- find which plugins satisfy your requirements
  2. Dependency Resolution -- determine the correct install/execution order
  3. Configuration Inference -- auto-generate sensible defaults from your project

When to Use Intent-Based Composition

Use this skill when:

  • You know what you want to accomplish but not which plugins provide it
  • You need to install multiple plugins that must work together
  • You want automatic dependency ordering so plugins install in the right sequence
  • You want configuration that adapts to your existing project stack
  • You are onboarding a new project and want a recommended plugin set

Do not use this skill when:

  • You already know exactly which single plugin to install
  • You need to manually control every configuration value
  • You are debugging a specific plugin (use the plugin's own diagnostics instead)

How Capability Matching Works

The Problem: Set Cover

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.

The Algorithm: Greedy Set Cover

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)

Tie-Breaking Rules

When two plugins cover the same number of uncovered capabilities, the engine breaks ties by:

  1. Preferred provider -- if the user specified provider: "my-plugin" for a capability, that plugin wins
  2. Coverage count -- more capabilities covered wins
  3. Alphabetical name -- for deterministic, reproducible output

Conflict Detection

After 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.

How Dependency Resolution Works

The Problem: Topological Ordering

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.

The Algorithm: Kahn's Algorithm (BFS 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

Cycle Detection

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")

How Configuration Inference Works

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 pro

Полный SKILL.md на GitHub

Установить Intent-Based Composition в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Intent-Based Composition?

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".

Как установить скилл Intent-Based Composition?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Intent-Based Composition запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Intent-Based Composition с