From prompt-smith
Generate a Claude Code Plugin with proper directory structure and configuration
How this command is triggered — by the user, by Claude, or both
Slash command
/prompt-smith:generate-plugin plugin description or requirementsThis command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Plugin Generation Command Generate a properly structured Claude Code Plugin based on user requirements. ## Input **Requirements:** $ARGUMENTS ## Process ### Step 1: Gather Requirements **If $ARGUMENTS is provided:** - Parse the description to understand plugin purpose - Identify what components (skills, agents, commands, hooks) are needed **If $ARGUMENTS is empty or unclear, ask:** 1. What is the plugin's purpose? 2. What components does it need? (skills, agents, commands, hooks) 3. Who is the target audience? (personal, team, community) 4. Does it need MCP or LSP server integratio...
Generate a properly structured Claude Code Plugin based on user requirements.
Requirements: $ARGUMENTS
If $ARGUMENTS is provided:
If $ARGUMENTS is empty or unclear, ask:
Load the prompt-creation skill for guidance:
prompt-smith:prompt-creationDetermine:
plugin-name:skill-name)mkdir -p {plugin-name}/.claude-plugin
mkdir -p {plugin-name}/commands
mkdir -p {plugin-name}/agents # if needed
mkdir -p {plugin-name}/skills # if needed
mkdir -p {plugin-name}/hooks # if needed
mkdir -p {plugin-name}/scripts # if needed
Only create directories for components the plugin actually needs.
{
"name": "{plugin-name}",
"version": "0.1.0",
"description": "{Brief description of plugin purpose}",
"author": {
"name": "{author name}",
"email": "{author email}"
},
"license": "MIT"
}
If custom component paths are needed, add them:
{
"commands": "./custom/commands/",
"agents": "./custom/agents/",
"hooks": "./hooks/hooks.json"
}
# {plugin-name}
{Description of what this plugin does.}
## Components
### Commands
- `/{plugin-name}:{command}` - {description}
### Skills
- `{plugin-name}:{skill}` - {description}
### Agents
- `{plugin-name}:{agent}` - {description}
## Installation
```bash
claude plugin install {plugin-name}@{source}
claude --plugin-dir ./{plugin-name}
#### 4d: Generate CHANGELOG.md
```markdown
# Changelog
## [0.1.0] - {today's date}
- 初期リリース
Standard MIT license with current year and author name.
{
"hooks": {
"{EventName}": [
{
"matcher": "{ToolPattern}",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/{script-name}.sh"
}
]
}
]
}
}
If hook scripts are generated, set executable permissions:
chmod +x {plugin-name}/scripts/*.sh
For each component the user requested, generate a minimal stub:
Skill stub (skills/{skill-name}/SKILL.md):
---
name: {skill-name}
description: This skill should be used when the user asks to "{phrase 1}", "{phrase 2}" or needs guidance on {topic}.
---
Agent stub (agents/{agent-name}.md):
---
name: {agent-name}
description: |
Use this agent when {condition}.
model: inherit
tools: ["Read", "Grep", "Glob"]
---
Command stub (commands/{command-name}.md):
---
description: {Short description}
argument-hint: "{args}"
---
Check the generated plugin against criteria:
.claude-plugin/plugin.json exists with valid namename is kebab-case, no spacesversion follows semver.claude-plugin/)./)hooks, mcpServers, or permissionMode${CLAUDE_PLUGIN_ROOT} used for script referencesPresent the generated plugin structure and files, then ask if user wants to:
claude --plugin-dir ./{plugin-name}npx claudepluginhub nyoki/my-claude-plugins --plugin prompt-smith