plugin-structure

Scaffold Claude Code plugins with standardized directory layouts and plugin.json manifests.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/sjnims/plugin-dev --skill plugin-structure-sjnims
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plugin-structure
Source: https://github.com/sjnims/plugin-dev/tree/main/plugins/plugin-dev/skills/plugin-structure
Command: npx skills add https://github.com/sjnims/plugin-dev --skill plugin-structure-sjnims

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and examples (resource) components.

What problem does it solve?

Developers often struggle with the complex and evolving architecture of Claude Code plugins, leading to disorganized, hard-to-maintain, and non-portable tools. This Skill provides clear, comprehensive guidance to overcome these challenges, ensuring your plugins are built on a solid foundation.

Core Features & Use Cases

  • Standardized Structure: Learn the optimal directory layout, plugin.json manifest, and component organization (commands, agents, skills, hooks) for seamless integration.
  • Portable Development: Understand how to use ${CLAUDE_PLUGIN_ROOT} for cross-platform compatibility and robust path references, making your plugins universally deployable.
  • Best Practices & Troubleshooting: Get expert advice on naming conventions, auto-discovery mechanisms, and common pitfalls to build scalable, maintainable plugins with confidence.
  • Use Case: You're starting a new Claude Code plugin. Use this Skill to instantly get the best-practice directory structure, plugin.json setup, and guidance on organizing your commands, agents, and skills for future scalability and ease of maintenance.

Quick Start

Explain the core structure for a new Claude Code plugin, including the .claude-plugin/plugin.json manifest and how to organize commands, agents, and skills.

Frequently Asked Questions about plugin-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Claude Code plugin directory?

Claude Code plugins use a standardized directory structure with a manifest file at `.claude-plugin/plugin.json`. Organize commands, agents, skills, and hooks in separate subdirectories following kebab-case naming conventions to ensure portability and maintainability across deployments.

What goes in the plugin.json manifest file?

The `plugin.json` manifest defines your plugin's metadata, component paths, and configuration. It specifies locations for commands, agents, skills, and hooks, enabling auto-discovery and proper integration with Claude Code's plugin system.

How do I organize commands, agents, and skills in a plugin?

Store commands, agents, and skills in dedicated subdirectories within your plugin root. Use the `${CLAUDE_PLUGIN_ROOT}` variable in `plugin.json` to reference these paths, ensuring cross-platform compatibility and consistent component discovery.

What naming conventions should I use for plugin components?

Use kebab-case for all directory and file names across commands, agents, skills, and hooks. This convention ensures consistency, prevents conflicts, and improves readability when organizing plugin components at scale.

Can I customize the default component paths in my plugin?

Yes, `plugin.json` supports custom component paths. Define default locations or override paths per component type, allowing flexibility while maintaining the manifest at `.claude-plugin/plugin.json` for reliable plugin discovery.

Why should I use ${CLAUDE_PLUGIN_ROOT} in plugin paths?

`${CLAUDE_PLUGIN_ROOT}` is a platform-agnostic variable that resolves to your plugin's root directory. Using it ensures your plugin deploys correctly across Windows, macOS, and Linux without path hardcoding or platform-specific adjustments.