插件结构知识库(仅供其他skills引用,不直接调用)
Provides Claude with a knowledge base about Claude Code plugin structure and development workflows. It's automatically referenced by other skills when you need to create plugins, set up directories, or understand component specifications.
/plugin marketplace add blueif16/amazing-claude-code-plugins/plugin install skillforge@plugin-market-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
此skill是知识库,供其他skills引用。不应被用户直接调用。
开发时所有组件都创建在 .claude/ 目录下,可立即测试:
.claude/
├── skills/ # 立即可用的skills
│ └── {skill-name}/
│ └── SKILL.md
├── agents/ # 立即可用的agents
│ └── {agent-name}.md
├── commands/ # 需要本地安装才能使用
│ └── {command-name}.md
└── hooks/ # 立即可用的hooks
└── hooks.json
sync-to-marketplace 时创建,用于发布到 marketplace:
{plugin-name}-dev/
├── .claude-plugin/
│ └── plugin.json # 插件元数据
├── skills/ # 从 .claude/skills/ 复制
│ └── {skill-name}/
│ └── SKILL.md
├── agents/ # 从 .claude/agents/ 复制
│ └── {agent-name}.md
├── commands/ # 从 .claude/commands/ 复制
│ └── {command-name}.md
├── hooks/ # 从 .claude/hooks/ 复制
│ └── hooks.json
├── .skillforge-meta # SkillForge元数据
├── .gitignore
└── README.md
{
"name": "插件名称(小写,连字符)",
"description": "插件描述",
"version": "0.1.0",
"author": {
"name": "作者名称"
}
}
---
name: skill-name
description: skill描述
allowed-tools: Tool1, Tool2
---
# Skill标题
## 说明
[你的说明]
## 示例
[你的示例]
---
name: agent-name
description: agent描述
tools: Tool1, Tool2
model: sonnet
---
# Agent标题
[你的agent说明]
---
description: 命令描述
---
# /command-name
[当用户输入 /command-name 时Claude的说明]
{
"hooks": {
"PreToolUse": [],
"PostToolUse": [],
"PermissionRequest": [],
"UserPromptSubmit": [],
"Notification": [],
"Stop": [],
"SubagentStop": []
}
}
{
"pluginName": "plugin-name",
"version": "0.1.0",
"createdAt": "2025-01-15T00:00:00.000Z",
"lastSync": null
}
.claude/settings*.json
{plugin-name}-dev/
.DS_Store
*.log
.DS_Store
*.log
.skillforge-meta
# {plugin-name}
{description}
## 安装
\`\`\`
/plugin marketplace add <marketplace-url>
/plugin install {plugin-name}
\`\`\`
## 使用
[文档]
/plugin marketplace add ./.claude/plugin install {plugin-name}@local/{command-name}使用 sync-to-marketplace skill:
创建 skill → .claude/skills/{skill-name}/SKILL.md (立即可用)
创建 agent → .claude/agents/{agent-name}.md (立即可用)
创建 hook → .claude/hooks/hooks.json (立即可用)
创建 command → .claude/commands/{command-name}.md (需本地安装测试)
/plugin marketplace add ./.claude
/plugin install {plugin-name}@local
/{command-name}
运行 sync-to-marketplace skill:
- 创建 {plugin-name}-dev/ 目录
- 复制 .claude/* → {plugin-name}-dev/*
- 添加 .claude-plugin/plugin.json
- 添加 .skillforge-meta
- 同步到远程 marketplace
.claude/ # 开发工作目录(真实工作位置)
├── skills/
├── agents/
├── commands/
└── hooks/
{plugin-name}-dev/ # 打包发布目录(由 sync 创建)
├── .claude-plugin/
├── skills/ # 从 .claude/skills/ 复制
├── agents/ # 从 .claude/agents/ 复制
├── commands/ # 从 .claude/commands/ 复制
└── hooks/ # 从 .claude/hooks/ 复制
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.