Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计通过

intent-based-composition基于意图的构图

Agent Skill

intent-based-composition 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

22,500

周安装

815

GitHub Stars

11

下载量

11,143
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:intent-based-composition(基于意图的构图)
来源仓库:https://github.com/lobbi-docs/claude
仓库路径:skills/intent-based-composition
安装命令:
npx skills add https://github.com/lobbi-docs/claude --skill 'Intent-Based Composition'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lobbi-docs/claude --skill 'Intent-Based Composition'

简介

用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。

  • 支持从来源仓库获取上下文,结合安装命令和原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用于需要快速获取信息或背景知识的场景,提升研究效率。
  • 建议在提示词中明确搜索范围和筛选条件,避免无关结果干扰。

SKILL.md

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 FileTechnologies Added
package.jsonnode, javascript
tsconfig.jsontypescript
Dockerfiledocker, containers
Chart.yamlhelm, kubernetes
.github/github, github-actions
main.tfterraform, iac
requirements.txtpython
go.modgo, golang
vite.config.tsvite, frontend
.mcp.jsonmcp, 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.

Composition YAML Format

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 Reference

FieldTypeRequiredDescription
intentstringyesHuman-readable goal description
requirementsarrayyesList of capability requirements
requirements[].capabilitystringyesCapability identifier to satisfy
requirements[].providerstringnoPreferred plugin to provide this capability
constraintsobjectnoKey-value pairs merged into all plugin configs

Extending with Custom Capabilities

Declaring Capabilities in Your Plugin

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"
    ]
  }
}

Capability Naming Conventions

  • Use lowercase kebab-case: supply-chain-security, not SupplyChainSecurity
  • Be specific: kubernetes-helm-deploy is better than deploy
  • Use domain prefixes for plugin-specific capabilities: mp-trust-scoring
  • Document what the capability means in your plugin's description

Making Your Plugin Composable

For best results with the composition engine:

  1. Declare all provided capabilities -- the engine can only match what it knows about
  2. Declare all required capabilities -- this enables correct dependency ordering
  3. Declare conflicts -- prevents incompatible plugins from being composed together
  4. Keep capabilities granular -- auth-jwt and auth-oauth are better than just auth
  5. Avoid circular dependencies -- if A requires B and B requires A, the engine cannot order them

Architecture

IntentSpec (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[] }

Source Files

  • Types: src/composition/types.ts -- all interfaces, error classes, enums
  • Engine: src/composition/engine.ts -- CapabilityMatcher, DependencyResolver, ConfigurationInferrer, CompositionEngine
  • Command: commands/compose.md -- the /mp:compose slash command

Related Skills and Commands

  • /mp:compose -- the slash command that invokes this engine
  • Supply Chain Security module -- src/security/trust-engine.ts
  • Contextual Intelligence module -- src/intelligence/fingerprint.ts
  • Dev Studio module -- src/devstudio/server.ts
  • Federation module -- src/federation/registry.ts

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38%
按下载量换算4,234

Claude

27.35%
按下载量换算3,048

Cursor

16.23%
按下载量换算1,809

Gemini CLI

9.47%
按下载量换算1,055

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills