plugin-structure
Skill37k starsChanged 9 months agoApache-2.0View on GitHub
This skill should be used when the user asks to "create a plugin", "scaffold a plugin", "understand plugin structure", "organize plugin components", "set up plugin.json", "use ${CLAUDE_PLUGIN_ROOT}", "add commands/agents/skills/hooks", "configure auto-discovery", or needs guidance on plugin directory layout, manifest configuration, component organization, file naming conventions, or Claude Code plugin architecture best practices.
- Reads credentials
8 other projects use a version of this, 1 of them edited; 1 of 1 edited versions we compared changed its rules.
How people change it
1 of 1 edited versions changed its rules.
Of the 1 edited version we compared: 1 made changes of their own.
Rules people drop
- No restart required: Changes take effect on next Claude Code sessiondropped by 1 of 1
We split this file and each edited version into the rules they give an agent and match them by wording. A version that adds no rule of its own and has not changed since this file last did reads as an older text, so what it lacks is not counted as dropped. We keep no past texts of a file, so that is inferred, and an edited version that started from an older text still counts its gaps as drops.
Trending
More talk lately.about the whole repository
Most recently taken up by
- gcapodeferro02/my-agent-skillsword for word, first seen Sep 21, 2026
- Agentic-Assets/apple-mail-mcpedited, first seen Jul 15, 2026
- jorgeasaurus/agent-skillsword for word, first seen May 11, 2026
- Airmomo/skillsword for word, first seen Apr 21, 2026
- Galaxy-Dawn/claude-scholarword for word, first seen Apr 15, 2026
- ghoshsam/claude-code-skillsword for word, first seen Mar 20, 2026
Who's talking about anthropics/claude-plugins-official
- @martinp7r.com“Look, there's an official #Claude LSP plugin for #swiftlang @swift.org now! github.com/anthropics/c... …”Bluesky · Dec 19, 2025 · 6 likes
- amoai-tech/mdeai“refactor(skills): make nextjs the single Next.js and Vercel owner”GitHub · Sep 20, 2026 · 3 reactions
- amoai-tech/mdeai“refactor(skills): consolidate engineering workflow ownership”GitHub · Sep 20, 2026 · 3 reactions
- amoai-tech/mdeai“SAN-1274 PR 2 — Add the MDE workflow skills for planning, debugging, testing, review, and verification”GitHub · Sep 16, 2026 · 3 reactions
- amoai-tech/mdeai“SAN-1274 PR 1 — Add the verified MDE AI skills foundation”GitHub · Sep 16, 2026 · 3 reactions
The biggest 5 of 51 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 51
Talked about on GitHub, Bluesky and Hacker News (51 times).
On GitHub · 29
- Sep 20, 2026refactor(skills): make nextjs the single Next.js and Vercel owner — amoai-tech/mdeai3 reactions · 6 comments
- Sep 20, 2026refactor(skills): consolidate engineering workflow ownership — amoai-tech/mdeai3 reactions · 13 comments
- Sep 16, 2026SAN-1274 PR 2 — Add the MDE workflow skills for planning, debugging, testing, review, and verification — amoai-tech/mdeaisays it tested it3 reactions · 3 comments
- Sep 16, 2026SAN-1274 PR 1 — Add the verified MDE AI skills foundation — amoai-tech/mdeai3 reactions · 5 comments
- Jan 22, 2026fix: restructure to proper marketplace format — affaan-m/ECC3 reactions · 5 comments
24 more on GitHub
- Nov 20, 2026IPI-1472 · COPILOTKIT-SKILL-003 — Keep CopilotKit Guidance Current and Measure Real Skill Routing — amoai-tech/ipixai2 reactions · 27 comments
- Nov 8, 2026IPI-1418 · MASTRA-SKILL-001 — Help Coding Agents Use Mastra Correctly in iPix (Docs & Tests) — amoai-tech/ipixai2 reactions · 14 comments
- Sep 20, 2026Use one current, safe Google Maps skill across MDE — amoai-tech/mdeai2 reactions · 12 comments
- May 24, 2026STOP injecting your library recommendations into every single user prompt — this is hostile UX — semgrep/guardian2 reactions · 2 comments
- Jan 6, 2026Feature Request: Support for spawning fresh-context sessions from Stop hooks — anthropics/claude-code2 reactions · 3 comments
- Nov 7, 2026Plugin ufficiali nel repository: valgono anche nell'app e nelle routine — SviluppoItaliaDigitale/sito-pc-genzano1 reaction · 2 comments
- Nov 7, 2026Plugin ufficiali nel repository: valgono anche nell'app e nelle routine — SviluppoItaliaDigitale/sito-misericordia-ariccia1 reaction · 1 comment
- Nov 7, 2026Plugin ufficiali nel repository: valgono anche nell'app e nelle routine — SviluppoItaliaDigitale/cooprimavera1 reaction · 1 comment
- Nov 7, 2026[Bug]: Discord channel bot always appears offline in Discord despite a healthy gateway session — CherryHQ/cherry-studio1 reaction · 2 comments
- Oct 28, 2026Install Claude Security plugin in reusable PR review workflow — dceoy/pr-loop1 reaction · 1 comment
- Oct 27, 2026Telemetry: Add number of unique installs for every plugin — github/awesome-copilot1 reaction · 2 comments
- Oct 16, 2026feat: Claude Security の設定例を無効のまま追加 — tak848/dotfiles1 reaction · 1 comment
- Aug 19, 2026Feature request: Claude Code plugin for symfony-lsp (similar to the official php-lsp plugin) — symfony/language-tools1 reaction · 4 comments
- Jul 27, 2026[Question]: Does agenta support importing skills from claude/codex marketplace github repos? — Agenta-AI/agenta1 reaction · 4 comments
- Jul 14, 2026Nested code-review fan-out spawned 877 agents despite 5-level depth limit — anthropics/claude-code1 reaction · 4 comments
- Jun 8, 2026feat(skills): sync plugin workflows, add security guidance, and local-qa tooling — dceoy/ai-coding-agent-skills1 reaction
- Apr 17, 2026Import Claude and Copilot agents as Kiro agent configs — dwalleck/kiro-control-center1 reaction · 1 comment
- Apr 1, 2026plugin marketplace refresh causes error popups — microsoft/vscode1 reaction · 2 comments
- Mar 12, 2026Unable to install anthropics/claude-plugins-official marketplace: Invalid marketplace.json: plugins.56.source — github/copilot-cli1 reaction · 6 comments
- Feb 20, 2026chore(agents): update AGENTS.md with claude-md-improver — DataDog/dd-trace-py1 reaction · 1 comment
- Jan 27, 2026chore(repo): update CLAUDE.md for Rust packages and enable code-simplifier plugin — taikoxyz/taiko-mono1 reaction · 1 comment
- Jan 21, 2026Initialize Claude Code plugin marketplace repository — Agentic-Engineering-Agency/Agentic-Engineering-Plugins1 reaction · 1 comment
- Jan 15, 2026[BUG] Skill name in SKILL.md can only contain lowercase letters, numbers, and hyphens. (when uploading at claude.ai) — anthropics/skills1 reaction
- Jan 9, 2026Update installation instructions to use official Claude marketplace — getsentry/sentry-for-ai1 reaction
On Bluesky · 21
- Dec 19, 2025Look, there's an official #Claude LSP plugin for #swiftlang @swift.org now! github.com/anthropics/c... github.com/anthropics/c... — @martinp7r.com6 likes and reposts
- May 23, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 anthropics / claude-plugins-official ⭐ 25,980 (+2,172) 🗒 Python Official, Anthropic-managed… — @github-trending.bsky.social3 likes and reposts · 1 reply
- Feb 1, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 anthropics / claude-plugins-official ⭐ 5,722 (+153) 🗒 Shell Official, Anthropic-managed directory of… — @github-trending.bsky.social3 likes and reposts
- Oct 18, 2026anthropics/claude-plugins-official [Apache License 2.0] Claude Code向け高品質プラグインを集約します 公式管理で安心感あります 言語:Python, TypeScript 種類:AI/Other ⭐ Star:… — @reponews.bsky.social2 likes and reposts
- May 22, 2026📈 Today's GitHub Trending: 1. https://github.com/anthropics/claude-plugins-official - Python, 2556 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy2 likes and reposts
16 more on Bluesky
- Mar 12, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 anthropics / claude-plugins-official ⭐ 9,925 (+144) 🗒 Python Official, Anthropic-managed directory of… — @github-trending.bsky.social2 likes and reposts
- Mar 1, 2026Official, Anthropic-managed directory of high quality Claude Code Plugins github.com/anthropics/c... code.claude.com/docs/en/plug...… — @janmr.com2 likes and reposts
- Oct 18, 2026📈 Today's GitHub Trending: 1. https://github.com/MadsLorentzen/ai-job-search - Python, 2213 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy1 likes and repost
- Oct 7, 2026claude-plugins-official: Official, Anthropic-managed directory of high quality Claude Code Plugins.… — @latreon.bsky.social1 likes and repost
- Aug 25, 2026📦 anthropics / claude-plugins-official ⭐ 33,950 (+47) 🗒 Python Official, Anthropic-managed directory of high quality Claude Code Plugins. — @github-trending.bsky.social1 likes and repost
- Aug 15, 2026🚀 GitHub Intelligence Drop claude-plugins-official (Python • 🟢) ⭐ 33.5K → https://github.com/anthropics/claude-plugins-official… — @githubfeed.bsky.social1 likes and repost
- May 24, 2026📈 Today's GitHub Trending: 1. https://github.com/Lum1104/Understand-Anything - TypeScript, 3987 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy1 likes and repost · 3 replies
- May 23, 2026📈 Today's GitHub Trending: 1. https://github.com/Lum1104/Understand-Anything - TypeScript, 2331 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy1 likes and repost · 1 reply
- May 21, 2026📈 Today's GitHub Trending: 1. https://github.com/anthropics/claude-plugins-official - Python, 891 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy1 likes and repost · 1 reply
- May 19, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 anthropics / claude-plugins-official ⭐ 19,816 (+127) 🗒 Python Official, Anthropic-managed directory of… — @github-trending.bsky.social1 likes and repost
- Mar 1, 2026anthropics / claude-plugins-official Official, Anthropic-managed directory of high quality Claude Code Plugins.… — @pythonhub.dev1 likes and repost
- Feb 4, 2026これはClaude Codeの機能を拡張する公式プラグイン群のディレクトリらしい 開発ワークフローの標準化や新しいAIエージェントの利用に期待できるかな yug1224 starred anthropics/claude-plugins-official… — @yug1224.com1 likes and repost
- Aug 29, 2026📈 Today's GitHub Trending: 1. https://github.com/tt-a1i/archify - JavaScript, 3927 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy0 likes and reposts · 1 reply
- Aug 29, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 anthropics / claude-plugins-official ⭐ 35,238 (+356) 🗒 Python Official, Anthropic-managed… — @github-trending.bsky.social0 likes and reposts · 1 reply
- Aug 28, 2026📈 Today's GitHub Trending: 1. https://github.com/tt-a1i/archify - JavaScript, 4561 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy0 likes and reposts · 1 reply
- Aug 26, 2026📈 Today's GitHub Trending: 1. https://github.com/tt-a1i/archify - HTML, 1002 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy0 likes and reposts · 1 reply
On Hacker News · 1
- Apr 14, 2026Connect iMessage to your Claude Code assistant2 points
Other versions8 projects use a version of this.
Word for word · 7
- Galaxy-Dawn/claude-scholar★ 5.7k100% same
- jorgeasaurus/agent-skills★ 13100% same
- JayAI623/claude-code-config★ 2100% same
- kvivek0591/claude-code-skills★ 2100% same
- Airmomo/skills★ 1100% same
- gcapodeferro02/my-agent-skills★ 1100% same
- ghoshsam/claude-code-skills★ 0100% same
Edited · 1
- Agentic-Assets/apple-mail-mcp★ 099% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- accessSkill
- configureSkill
- accessSkill
- configureSkill
- accessSkill
- configureSkill
- claude-automation-recommenderSkill
- claude-md-improverSkill
- claude-securitySkill
- cardputer-buddySkill
- m5-onboardSkill
- example-commandSkill
- example-skillSkill
- frontend-designSkill
- writing-hookify-rulesSkill
- math-olympiadSkill
- siegeSkill
- soloSkill
- build-mcp-appSkill
- build-mcpbSkill
- build-mcp-serverSkill
- playgroundSkill
- agent-developmentSkill
- command-developmentSkill
- hook-developmentSkill
- mcp-integrationSkill
- plugin-settingsSkill
- skill-developmentSkill
- project-artifactSkill
- receiptsSkill
- session-reportSkill
- skill-creatorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
44 rules. About 0 are common, 30 are distinctive, and 14 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈30
Distinctive · estimate
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Every Claude Code plugin follows this organizational pattern:
- Very specific: line 42
Component locations: All component directories (commands, agents, skills, hooks) MUST be at plugin root level, NOT nested inside …
- Distinctive: line 43
Optional components: Only create directories for components the plugin actually uses
- Distinctive: line 44
Naming convention: Use kebab-case for all directory and file names
- Distinctive: line 59
Use kebab-case format (lowercase with hyphens)
- Distinctive: line 60
Must be unique across installed plugins
- Distinctive: line 61
No spaces or special characters
- Distinctive: line 83
Version format: Follow semantic versioning (MAJOR.MINOR.PATCH)
- Distinctive: line 84
Keywords: Use for plugin discovery and categorization
- Distinctive: line 103
Must be relative to plugin root
- Very specific: line 104
Must start with ./
- Very specific: line 260
Use ${CLAUDE_PLUGIN_ROOT} environment variable for all intra-plugin path references:
- Very specific: line 307
Commands: Use kebab-case .md files
- Very specific: line 312
Agents: Use kebab-case .md files describing role
- Distinctive: line 317
Skills: Use kebab-case directory names
- Distinctive: line 324
Scripts: Use descriptive kebab-case names with appropriate extensions
- Distinctive: line 329
Documentation: Use kebab-case markdown files
- Distinctive: line 334
Configuration: Use standard names
- Distinctive: line 353
No restart required: Changes take effect on next Claude Code session
- Distinctive: line 362
Put test-related commands, agents, and skills together
- Very specific: line 363
Create subdirectories in scripts/ for different purposes
- Very specific: line 365
Minimal manifest: Keep plugin.json lean
- Distinctive: line 366
Only specify custom paths when necessary
- Distinctive: line 368
Use inline configuration only for simple cases
- Distinctive: line 377
Consistency: Use consistent naming across components
- Very specific: line 378
If command is test-runner, name related agent test-runner-agent
- Distinctive: line 381
Clarity: Use descriptive names that indicate purpose
- Very specific: line 383
Avoid: utils/, misc.md, temp.sh
- Very specific: line 392
Always use ${CLAUDE_PLUGIN_ROOT}: Never hardcode paths
- Distinctive: line 393
Test on multiple systems: Verify on macOS, Linux, Windows
- Distinctive: line 395
Avoid system-specific features: Use portable bash/Python constructs
- Very specific: line 399
Version consistently: Update version in plugin.json for releases
- Distinctive: line 402
Test thoroughly: Verify all components work after changes
- Distinctive: line 451
Verify file is in correct directory with correct extension
- Distinctive: line 452
Check YAML frontmatter syntax (commands, agents, skills)
- Very specific: line 453
Ensure skill has SKILL.md (not README.md or other name)
- Very specific: line 458
Verify paths are relative and start with ./ in manifest
- Distinctive: line 459
Check that referenced files exist at specified paths
- Very specific: line 460
Test with echo $CLAUDE_PLUGIN_ROOT in hook scripts
- Distinctive: line 464
Check file naming follows conventions (kebab-case, correct extensions)
- Distinctive: line 465
Verify custom paths in manifest are correct
- Distinctive: line 469
Use unique, descriptive component names
- Distinctive: line 471
Document potential conflicts in plugin README
- Distinctive: line 472
Consider command prefixes for related functionality
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Plugin Structure for Claude Code
Overview
Claude Code plugins follow a standardized directory structure with automatic component discovery. Understanding this structure enables creating well-organized, maintainable plugins that integrate seamlessly with Claude Code.
Key concepts:
- Conventional directory layout for automatic discovery
- Manifest-driven configuration in
.claude-plugin/plugin.json - Component-based organization (commands, agents, skills, hooks)
- Portable path references using
${CLAUDE_PLUGIN_ROOT} - Explicit vs. auto-discovered component loading
Directory Structure
Every Claude Code plugin follows this organizational pattern:
plugin-name/
├── .claude-plugin/
│ └── plugin.json # Required: Plugin manifest
├── commands/ # Slash commands (.md files)
├── agents/ # Subagent definitions (.md files)
├── skills/ # Agent skills (subdirectories)
│ └── skill-name/
│ └── SKILL.md # Required for each skill
├── hooks/
│ └── hooks.json # Event handler configuration
├── .mcp.json # MCP server definitions
└── scripts/ # Helper scripts and utilitiesCritical rules:
- Manifest location: The
plugin.jsonmanifest MUST be in.claude-plugin/directory - Component locations: All component directories (commands, agents, skills, hooks) MUST be at plugin root level, NOT nested inside
.claude-plugin/ - Optional components: Only create directories for components the plugin actually uses
- Naming convention: Use kebab-case for all directory and file names
Plugin Manifest (plugin.json)
The manifest defines plugin metadata and configuration. Located at .claude-plugin/plugin.json:
Required Fields
{
"name": "plugin-name"
}Name requirements:
- Use kebab-case format (lowercase with hyphens)
- Must be unique across installed plugins
- No spaces or special characters
- Example:
code-review-assistant,test-runner,api-docs
Recommended Metadata
{
"name": "plugin-name",
"version": "1.0.0",
"description": "Brief explanation of plugin purpose",
"author": {
"name": "Author Name",
"email": "author@example.com",
"url": "https://example.com"
},
"homepage": "https://docs.example.com",
"repository": "https://github.com/user/plugin-name",
"license": "MIT",
"keywords": ["testing", "automation", "ci-cd"]
}Version format: Follow semantic versioning (MAJOR.MINOR.PATCH) Keywords: Use for plugin discovery and categorization
Component Path Configuration
Specify custom paths for components (supplements default directories):
{
"name": "plugin-name",
"commands": "./custom-commands",
"agents": ["./agents", "./specialized-agents"],
"hooks": "./config/hooks.json",
"mcpServers": "./.mcp.json"
}Important: Custom paths supplement defaults—they don't replace them. Components in both default directories and custom paths will load.
Path rules:
- Must be relative to plugin root
- Must start with
./ - Cannot use absolute paths
- Support arrays for multiple locations
Component Organization
Commands
Location: commands/ directory
Format: Markdown files with YAML frontmatter
Auto-discovery: All .md files in commands/ load automatically
Example structure:
commands/
├── review.md # /review command
├── test.md # /test command
└── deploy.md # /deploy commandFile format:
---
name: command-name
description: Command description
---
Command implementation instructions...Usage: Commands integrate as native slash commands in Claude Code
Agents
Location: agents/ directory
Format: Markdown files with YAML frontmatter
Auto-discovery: All .md files in agents/ load automatically
Example structure:
agents/
├── code-reviewer.md
├── test-generator.md
└── refactorer.mdFile format:
---
description: Agent role and expertise
capabilities:
- Specific task 1
- Specific task 2
---
Detailed agent instructions and knowledge...Usage: Users can invoke agents manually, or Claude Code selects them automatically based on task context
Skills
Location: skills/ directory with subdirectories per skill
Format: Each skill in its own directory with SKILL.md file
Auto-discovery: All SKILL.md files in skill subdirectories load automatically
Example structure:
skills/
├── api-testing/
│ ├── SKILL.md
│ ├── scripts/
│ │ └── test-runner.py
│ └── references/
│ └── api-spec.md
└── database-migrations/
├── SKILL.md
└── examples/
└── migration-template.sqlSKILL.md format:
---
name: Skill Name
description: When to use this skill
version: 1.0.0
---
Skill instructions and guidance...Supporting files: Skills can include scripts, references, examples, or assets in subdirectories
Usage: Claude Code autonomously activates skills based on task context matching the description
Hooks
Location: hooks/hooks.json or inline in plugin.json
Format: JSON configuration defining event handlers
Registration: Hooks register automatically when plugin enables
Example structure:
hooks/
├── hooks.json # Hook configuration
└── scripts/
├── validate.sh # Hook script
└── check-style.sh # Hook scriptConfiguration format:
{
"PreToolUse": [{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/validate.sh",
"timeout": 30
}]
}]
}Available events: PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification
Usage: Hooks execute automatically in response to Claude Code events
MCP Servers
Location: .mcp.json at plugin root or inline in plugin.json
Format: JSON configuration for MCP server definitions
Auto-start: Servers start automatically when plugin enables
Example format:
{
"mcpServers": {
"server-name": {
"command": "node",
"args": ["${CLAUDE_PLUGIN_ROOT}/servers/server.js"],
"env": {
"API_KEY": "${API_KEY}"
}
}
}
}Usage: MCP servers integrate seamlessly with Claude Code's tool system
Portable Path References
${CLAUDE_PLUGIN_ROOT}
Use ${CLAUDE_PLUGIN_ROOT} environment variable for all intra-plugin path references:
{
"command": "bash ${CLAUDE_PLUGIN_ROOT}/scripts/run.sh"
}Why it matters: Plugins install in different locations depending on:
- User installation method (marketplace, local, npm)
- Operating system conventions
- User preferences
Where to use it:
- Hook command paths
- MCP server command arguments
- Script execution references
- Resource file paths
Never use:
- Hardcoded absolute paths (
/Users/name/plugins/...) - Relative paths from working directory (
./scripts/...in commands) - Home directory shortcuts (
~/plugins/...)
Path Resolution Rules
In manifest JSON fields (hooks, MCP servers):
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/tool.sh"In component files (commands, agents, skills):
Reference scripts at: ${CLAUDE_PLUGIN_ROOT}/scripts/helper.pyIn executed scripts:
#!/bin/bash
# ${CLAUDE_PLUGIN_ROOT} available as environment variable
source "${CLAUDE_PLUGIN_ROOT}/lib/common.sh"File Naming Conventions
Component Files
Commands: Use kebab-case .md files
code-review.md→/code-reviewrun-tests.md→/run-testsapi-docs.md→/api-docs
Agents: Use kebab-case .md files describing role
test-generator.mdcode-reviewer.mdperformance-analyzer.md
Skills: Use kebab-case directory names
api-testing/database-migrations/error-handling/
Supporting Files
Scripts: Use descriptive kebab-case names with appropriate extensions
validate-input.shgenerate-report.pyprocess-data.js
Documentation: Use kebab-case markdown files
api-reference.mdmigration-guide.mdbest-practices.md
Configuration: Use standard names
hooks.json.mcp.jsonplugin.json
Auto-Discovery Mechanism
Claude Code automatically discovers and loads components:
- Plugin manifest: Reads
.claude-plugin/plugin.jsonwhen plugin enables - Commands: Scans
commands/directory for.mdfiles - Agents: Scans
agents/directory for.mdfiles - Skills: Scans
skills/for subdirectories containingSKILL.md - Hooks: Loads configuration from
hooks/hooks.jsonor manifest - MCP servers: Loads configuration from
.mcp.jsonor manifest
Discovery timing:
- Plugin installation: Components register with Claude Code
- Plugin enable: Components become available for use
- No restart required: Changes take effect on next Claude Code session
Override behavior: Custom paths in plugin.json supplement (not replace) default directories
Best Practices
Organization
- Logical grouping: Group related components together
- Put test-related commands, agents, and skills together
- Create subdirectories in
scripts/for different purposes
- Minimal manifest: Keep
plugin.jsonlean- Only specify custom paths when necessary
- Rely on auto-discovery for standard layouts
- Use inline configuration only for simple cases
- Documentation: Include README files
- Plugin root: Overall purpose and usage
- Component directories: Specific guidance
- Script directories: Usage and requirements
Naming
- Consistency: Use consistent naming across components
- If command is
test-runner, name related agenttest-runner-agent - Match skill directory names to their purpose
- If command is
- Clarity: Use descriptive names that indicate purpose
- Good:
api-integration-testing/,code-quality-checker.md - Avoid:
utils/,misc.md,temp.sh
- Good:
- Length: Balance brevity with clarity
- Commands: 2-3 words (
review-pr,run-ci) - Agents: Describe role clearly (
code-reviewer,test-generator) - Skills: Topic-focused (
error-handling,api-design)
- Commands: 2-3 words (
Portability
- Always use ${CLAUDE_PLUGIN_ROOT}: Never hardcode paths
- Test on multiple systems: Verify on macOS, Linux, Windows
- Document dependencies: List required tools and versions
- Avoid system-specific features: Use portable bash/Python constructs
Maintenance
- Version consistently: Update version in plugin.json for releases
- Deprecate gracefully: Mark old components clearly before removal
- Document breaking changes: Note changes affecting existing users
- Test thoroughly: Verify all components work after changes
Common Patterns
Minimal Plugin
Single command with no dependencies:
my-plugin/
├── .claude-plugin/
│ └── plugin.json # Just name field
└── commands/
└── hello.md # Single commandFull-Featured Plugin
Complete plugin with all component types:
my-plugin/
├── .claude-plugin/
│ └── plugin.json
├── commands/ # User-facing commands
├── agents/ # Specialized subagents
├── skills/ # Auto-activating skills
├── hooks/ # Event handlers
│ ├── hooks.json
│ └── scripts/
├── .mcp.json # External integrations
└── scripts/ # Shared utilitiesSkill-Focused Plugin
Plugin providing only skills:
my-plugin/
├── .claude-plugin/
│ └── plugin.json
└── skills/
├── skill-one/
│ └── SKILL.md
└── skill-two/
└── SKILL.mdTroubleshooting
Component not loading:
- Verify file is in correct directory with correct extension
- Check YAML frontmatter syntax (commands, agents, skills)
- Ensure skill has
SKILL.md(notREADME.mdor other name) - Confirm plugin is enabled in Claude Code settings
Path resolution errors:
- Replace all hardcoded paths with
${CLAUDE_PLUGIN_ROOT} - Verify paths are relative and start with
./in manifest - Check that referenced files exist at specified paths
- Test with
echo $CLAUDE_PLUGIN_ROOTin hook scripts
Auto-discovery not working:
- Confirm directories are at plugin root (not in
.claude-plugin/) - Check file naming follows conventions (kebab-case, correct extensions)
- Verify custom paths in manifest are correct
- Restart Claude Code to reload plugin configuration
Conflicts between plugins:
- Use unique, descriptive component names
- Namespace commands with plugin name if needed
- Document potential conflicts in plugin README
- Consider command prefixes for related functionality
For detailed examples and advanced patterns, see files in references/ and examples/ directories.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

