插件工具包
可重用的Claude Code插件组件自助餐-- 命令、代理、技能、钩子、MCP服务器 --任何LLM都可以从定制的项目特定插件中进行选择、组合和重构。
伴侣 技能_商店.
______________________________________________________________________
概念
Store (raw ingredients) + plugin-builder (chef) = bespoke plugin (finished dish)该商店提供通用模板。这 插件构建器代理 分析您的项目,选择正确的组件,使每个占位符适应您的实际上下文,并组装一个即用型Claude Code插件。
______________________________________________________________________
结构
PluginKit/
├── index.json ← lightweight discovery index (load first)
├── catalog.json ← full metadata for all components
├── Commands/ ← slash command templates
│ └── /COMMAND.md
├── Agents/ ← autonomous agent templates
│ └── /AGENT.md
├── Skills/ ← auto-activating skill templates
│ └── /SKILL.md
├── Hooks/ ← event handler templates
│ └── /{HOOK.json, README.md}
├── MCP/ ← MCP server templates
│ └── /{MCP.json, server-template.py}
└── plugin-builder/ ← the assembly tool
├── AGENT.md ← autonomous plugin-builder agent
├── SKILL.md ← meta-skill (add to Skills_store)
└── scripts/
├── analyze-project.py ← step 1: extract project context
├── pick-components.py ← step 2: score & select components
├── adapt-to-context.py ← step 3: resolve all {{placeholders}}
├── assemble-plugin.py ← step 4: write plugin to disk
└── generate-index.py ← rebuild index.json + catalog.json______________________________________________________________________
快速开始
选项A——自主(推荐)
告诉克劳德代码:
“为此项目构建一个Claude Code插件”
插件构建器代理处理一切:分析→ pick → 适应→ 组装。
选项B——脚本管道
# 1. Analyze your project
python3 plugin-builder/scripts/analyze-project.py /path/to/project > context.json
# 2. Pick components from the store
python3 plugin-builder/scripts/pick-components.py context.json > selection.json
# 3. Fetch and adapt components to your project
python3 plugin-builder/scripts/adapt-to-context.py selection.json context.json > adapted.json
# 4. Assemble the plugin
python3 plugin-builder/scripts/assemble-plugin.py adapted.json /path/to/output______________________________________________________________________
组件格式
每个组件都有一个 {{placeholder}} 现场惯例:
---
name: component-name
type: command|agent|skill|hook|mcp
genericity: high|medium|low
requires_adaptation:
- PLACEHOLDER_1 # what it represents
- PLACEHOLDER_2
---genericity: high--适用于任何项目,只需最小的调整genericity: medium--需要特定于域的上下文才有用genericity: low--高度具体,用作参考/示例
______________________________________________________________________
添加组件
- 创建
//目录 - 添加主文件(
COMMAND.md,AGENT.md,SKILL.md,HOOK.json,或MCP.json) - 使用
{{PLACEHOLDER}}针对任何特定项目 - 列出占位符
requires_adaptation前体场 - 重建索引:
python3 plugin-builder/scripts/generate-index.py______________________________________________________________________
电流组件(9)
| 名称 | 类型 | 通用性 |
|---|---|---|
| 查询引擎 | 命令 | 高 |
| 按键 | 命令 | 高获取数据 |
| 状态检查 | 命令 | 高 |
| 领域分析师 | 代理 | 媒介 |
| api集成器 | 代理 | 高 |
| 发动机集成 | 技能 | 中等 |
| api客户端 | 技能 | 高 |
| 写入前验证 | 挂钩 | 介质 |
| rest-api包装器 | mcp | 高 |
______________________________________________________________________
真实示例
这 skillforge-plugin 是种子项目——它的组成部分(match, demand, occupation-analyst, occupation-matching)是此商店中的通用模板所基于的真实世界的原件。
