Create Claude Code agents and commands with proper markdown structure, YAML frontmatter, and plugin.json arrays. Use when creating commands, slash commands, agents, autonomous assistants, and command-line utilities for Claude Code plugins.
Creates Claude Code agents and commands with proper YAML frontmatter and plugin.json integration.
npx claudepluginhub karchtho/my-claude-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Comprehensive guide for creating agents and commands in Claude Code plugins. Ensures proper YAML frontmatter, markdown structure, and plugin.json integration.
⚠️ COMMON MISTAKE: Trying to define agents/commands as JSON objects inside plugin.json
❌ WRONG:
{
"agents": [
{ "name": "my-agent", "description": "..." }
]
}
✅ CORRECT:
{
"agents": [
"./agents/my-agent.md"
]
}
Each agent and command is a separate markdown file, not a JSON object. The plugin.json only lists the file paths in arrays.
Commands are CLI-like utilities invoked with /command-name. Each command is a single .md file with YAML frontmatter.
Location: commands/command-name.md
Basic Template:
---
name: kebab-case-name
description: Brief description of what the command does
---
# /command-name
One-sentence summary of purpose.
## Usage
/command-name [optional-args]
## What This Does
Paragraph explaining functionality.
## Output
What the command produces or returns.
## When to Use
When should a user invoke this command?
## Related Commands
Links to complementary commands.
| Field | Type | Required | Example |
|---|---|---|---|
name | string | ✓ | "review-code" |
description | string | ✓ | "Get instant feedback on code" |
1. Keep it focused
/review-code does code review, not code generation2. Use imperative language
3. Simple bash commands
4. Clear output format
File: commands/review-starters.md
---
name: review-starters
description: Run full validation on your 20 starter scripts
---
# /review-starters
Comprehensive audit of your 20 starter scripts from your unity-starter repository.
## What This Does
Validates all starter scripts for:
- Code quality and consistency
- Best practices (Singleton patterns, error handling)
- Integration health between scripts
- Memory safety (pooling, cleanup, leaks)
- Modern pattern readiness
## Usage
/review-starters
## Output
Detailed report with:
1. Critical Issues
2. Best Practice Suggestions
3. Integration Warnings
4. Modern Pattern Gaps
5. Ready Status
## When to Use
**Pre-jam** (3-4 days before): Run to validate starter scripts before jam begins.
## Related Commands
- `/jam-status` - Quick project health check
- `/design-feature` - Plan a new feature
/command-name (matches command name)Agents are autonomous assistants invoked with @agent-name. Each agent is a single .md file with YAML frontmatter followed by detailed instructions.
Location: agents/agent-name.md
Basic Template:
---
name: kebab-case-name
description: Brief description of agent purpose and capabilities
---
# @agent-name
One-sentence summary of role.
## What This Agent Does
The agent-name is your [role description]. Invoke with `@agent-name` to:
- **Capability 1** - Description
- **Capability 2** - Description
- **Capability 3** - Description
## Capabilities
✓ Specific capability 1
✓ Specific capability 2
✓ Specific capability 3
## Usage Examples
@agent-name: [example task 1] → Get: [example output 1]
@agent-name: [example task 2] → Get: [example output 2]
## When to Invoke
- **Situation 1** - Use agent for...
- **Situation 2** - Use agent when...
- **Situation 3** - Use agent for...
## Works With
- `/command-name` command
- `@other-agent` agent
- Specific tools or workflows
| Field | Type | Required | Example |
|---|---|---|---|
name | string | ✓ | "code-reviewer" |
description | string | ✓ | "Code review focused on quality" |
1. Clear role definition
2. Concrete examples
3. Capability list
4. Context and timing
5. Integration awareness
File: agents/code-quality.md
---
name: code-quality
description: Code review focused on jam-time quality. Catches memory leaks, pattern inconsistencies, async issues, pooling problems without blocking workflow.
---
# @code-quality
Code review specialist focused on jam-time quality. Catches memory leaks, pattern inconsistencies, async issues, pooling problems, and architectural conflicts without blocking workflow.
## What This Agent Does
The code-quality agent is your fast-feedback reviewer. Invoke with `@code-quality` to:
- **Review code quality** - Spot issues without slowing development
- **Memory safety** - Catch leaks, pooling problems, cleanup issues
- **Pattern consistency** - Does it match your codebase patterns?
- **Modern practices** - Input System, async/await, DI, pooling done right?
- **Integration validation** - Will it work with existing systems?
- **Performance checks** - Inefficiencies, unnecessary allocations
- **Quick fixes** - Get suggestions to improve in-place
## Capabilities
✓ C# code review
✓ Memory safety analysis
✓ Pattern consistency checking
✓ Performance analysis
✓ Integration validation
✓ Best practice validation
✓ Quick fix suggestions
## Usage Examples
@code-quality: Review this enemy spawner - is it efficient during high-spawn moments? → Get: Performance analysis, pooling assessment, suggestions
@code-quality: Check this UI code for memory leaks → Get: Memory analysis, Manager connection validation, quick fixes
## When to Invoke
- **During development** - Get quick feedback without formal review
- **Before merging** - Validate quality before integration
- **Complex code** - Need expert validation on tricky logic
- **Performance concern** - "Is this efficient?"
## Works With
- `/review-code` command - Quick status checks
- `@feature-developer` agent - Reviews generated code
- Your team - Fast feedback during crunch
# @agent-name (matches agent name){
"name": "your-bundle",
"version": "1.0.0",
"skills": ["./skills/skill-name"],
"commands": [
"./commands/review-starters.md",
"./commands/design-feature.md",
"./commands/generate-feature.md"
]
}
Key Points:
commands is an array of file paths.md file in the commands/ directory{
"name": "your-bundle",
"version": "1.0.0",
"skills": ["./skills/skill-name"],
"agents": [
"./agents/code-quality.md",
"./agents/feature-developer.md",
"./agents/jam-architect.md"
]
}
Key Points:
agents is an array of file paths.md file in the agents/ directory{
"name": "game-jam-toolkit-bundle",
"version": "1.0.0",
"description": "Complete game jam development partner",
"author": {
"name": "Your Name",
"email": "your@email.com"
},
"skills": [
"./skills/validate-starters",
"./skills/feature-architect"
],
"commands": [
"./commands/review-starters.md",
"./commands/design-feature.md",
"./commands/generate-feature.md"
],
"agents": [
"./agents/jam-architect.md",
"./agents/feature-developer.md",
"./agents/code-quality.md"
]
}
❌ WRONG - Inline agent definition in plugin.json:
{
"agents": [
{
"name": "my-agent",
"description": "Does something"
}
]
}
✅ CORRECT - Reference markdown file:
{
"agents": [
"./agents/my-agent.md"
]
}
❌ WRONG - Reference to directory:
{
"commands": "./commands",
"agents": "./agents"
}
✅ CORRECT - Reference individual files:
{
"commands": [
"./commands/command1.md",
"./commands/command2.md"
],
"agents": [
"./agents/agent1.md",
"./agents/agent2.md"
]
}
❌ WRONG - No frontmatter:
# /my-command
This is my command...
✅ CORRECT - YAML frontmatter required:
---
name: my-command
description: This is my command's purpose
---
# /my-command
This is my command...
❌ WRONG - Wrong extensions:
commands/
├── review.json # Should be .md
└── validate.txt # Should be .md
✅ CORRECT - All .md files:
commands/
├── review.md
└── validate.md
❌ WRONG - Wrong paths:
{
"commands": ["review-starters", "design-feature"]
}
✅ CORRECT - Full relative paths:
{
"commands": [
"./commands/review-starters.md",
"./commands/design-feature.md"
]
}
bundle-name/
├── .claude-plugin/
│ └── plugin.json # References all components
├── README.md
├── skills/
│ ├── skill-1/
│ │ └── SKILL.md
│ └── skill-2/
│ └── SKILL.md
├── commands/ # CLI-like utilities
│ ├── review-starters.md # YAML frontmatter + docs
│ ├── design-feature.md
│ └── generate-feature.md
└── agents/ # Autonomous assistants
├── code-quality.md # YAML frontmatter + instructions
├── feature-developer.md
└── jam-architect.md
.md files are in correct directories (commands/ or agents/).md extensionname and descriptionname field is kebab-case and matches file namedescription field is present and descriptiveplugin.json for agents/commandsplugin.json has arrays for commands and agents./ prefix# Validate bundle structure
bundles/dev-toolkit-bundle/skills/bundle-maker/scripts/validate-bundle.sh <bundle-path>
# Check that plugin.json is valid JSON
cat <bundle-path>/.claude-plugin/plugin.json | jq .
# Verify all referenced files exist
for file in $(jq -r '.commands[]? // .agents[]? | ltrimstr("./")' <bundle-path>/.claude-plugin/plugin.json); do
if [ ! -f "<bundle-path>/$file" ]; then
echo "Missing file: $file"
fi
done
Use this skill when:
Complements the bundle-maker skill for complete plugin development workflow.
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.