Agent Builder
testdouble/han
Builds a new Claude Code agent (subagent) from scratch through a relentless, evidence-based interview that walks the agent's design tree decision-by-decision — entity fit, domain focus and…
Explains the directory layout, plugin.json manifest and component organization of a Claude Code plugin, including auto-discovery and portable paths.
$ npx skills add anthropics/claude-plugins-official --skill plugin-structure -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install anthropics/claude-plugins-official plugin-structure --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/plugin-dev/skills/plugin-structure .claude/skills/plugin-structure && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "plugin-structure" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/plugin-dev/skills/plugin-structure into .claude/skills/plugin-structure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "plugin-structure", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/anthropics/claude-plugins-official/tree/main/plugins/plugin-dev/skills/plugin-structureType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add anthropics/claude-plugins-official --skill plugin-structure -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install anthropics/claude-plugins-official plugin-structure --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/plugin-dev/skills/plugin-structure .agents/skills/plugin-structure && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "plugin-structure" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/plugin-dev/skills/plugin-structure into .agents/skills/plugin-structure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "plugin-structure", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add anthropics/claude-plugins-official --skill plugin-structure -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install anthropics/claude-plugins-official plugin-structure --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/plugin-dev/skills/plugin-structure .cursor/skills/plugin-structure && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "plugin-structure" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/plugin-dev/skills/plugin-structure into .cursor/skills/plugin-structure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "plugin-structure", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/anthropics/claude-plugins-official.git --path plugins/plugin-dev/skills/plugin-structure--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add anthropics/claude-plugins-official --skill plugin-structure -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install anthropics/claude-plugins-official plugin-structure --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/plugin-dev/skills/plugin-structure .gemini/skills/plugin-structure && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "plugin-structure" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/plugin-dev/skills/plugin-structure into .gemini/skills/plugin-structure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "plugin-structure", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install anthropics/claude-plugins-official plugin-structureInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add anthropics/claude-plugins-official --skill plugin-structure -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/plugin-dev/skills/plugin-structure .github/skills/plugin-structure && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "plugin-structure" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/plugin-dev/skills/plugin-structure into .github/skills/plugin-structure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "plugin-structure", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add anthropics/claude-plugins-official --skill plugin-structure -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install anthropics/claude-plugins-official plugin-structure --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/plugin-dev/skills/plugin-structure .opencode/skills/plugin-structure && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "plugin-structure" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/plugin-dev/skills/plugin-structure into .opencode/skills/plugin-structure/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "plugin-structure", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
plugin-structureExplains the directory layout, plugin.json manifest and component organization of a Claude Code plugin, including auto-discovery and portable paths.
The skill describes how Claude Code plugins use a standard directory structure with automatic component discovery. The manifest plugin.json must sit in the .claude-plugin directory, while the component directories for commands, agents, skills and hooks must sit at the plugin root, not inside .claude-plugin. Only components the plugin actually uses need directories, and all names are kebab-case.
On the manifest, only name is required, and it must be unique, kebab-case and free of spaces. Recommended metadata includes a semantic version and keywords for discovery. Custom component paths supplement the default directories rather than replacing them, must be relative to the plugin root, must start with ./ and can be given as arrays. Portable paths use the CLAUDE_PLUGIN_ROOT variable, and commands are Markdown files with YAML frontmatter.
The folder ships minimal, standard and advanced plugin examples to compare against, a README, and two reference files on component patterns and the manifest.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit d4226d0. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are json, markdown and bash).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
github.comFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Claude Code Plugin Structure loads about 3.4k tokens when it runs, and up to ~9.4k if it reads all its reference files. Until then it costs about 113 tokens; SKILL.md has 1,050 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from anthropics/claude-plugins-official at commit d4226d0, republished under its Apache-2.0 licence (© anthropics). 1,050 words, ~3,361 tokens.
.claude/skills/plugin-structure/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.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:
.claude-plugin/plugin.json${CLAUDE_PLUGIN_ROOT}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:
plugin.json manifest MUST be in .claude-plugin/ directory.claude-plugin/The manifest defines plugin metadata and configuration. Located at .claude-plugin/plugin.json:
{
"name": "plugin-name"
}Name requirements:
code-review-assistant, test-runner, api-docs{
"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
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:
./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
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
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
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
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
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:
Where to use it:
Never use:
/Users/name/plugins/...)./scripts/... in commands)~/plugins/...)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"Commands: Use kebab-case .md files
code-review.md → /code-reviewrun-tests.md → /run-testsapi-docs.md → /api-docsAgents: Use kebab-case .md files describing role
test-generator.mdcode-reviewer.mdperformance-analyzer.mdSkills: Use kebab-case directory names
api-testing/database-migrations/error-handling/Scripts: Use descriptive kebab-case names with appropriate extensions
validate-input.shgenerate-report.pyprocess-data.jsDocumentation: Use kebab-case markdown files
api-reference.mdmigration-guide.mdbest-practices.mdConfiguration: Use standard names
hooks.json.mcp.jsonplugin.jsonClaude Code automatically discovers and loads components:
.claude-plugin/plugin.json when plugin enablescommands/ directory for .md filesagents/ directory for .md filesskills/ for subdirectories containing SKILL.mdhooks/hooks.json or manifest.mcp.json or manifestDiscovery timing:
Override behavior: Custom paths in plugin.json supplement (not replace) default directories
Logical grouping: Group related components together
scripts/ for different purposesMinimal manifest: Keep plugin.json lean
Documentation: Include README files
Consistency: Use consistent naming across components
test-runner, name related agent test-runner-agentClarity: Use descriptive names that indicate purpose
api-integration-testing/, code-quality-checker.mdutils/, misc.md, temp.shLength: Balance brevity with clarity
review-pr, run-ci)code-reviewer, test-generator)error-handling, api-design)Single command with no dependencies:
my-plugin/
├── .claude-plugin/
│ └── plugin.json # Just name field
└── commands/
└── hello.md # Single commandComplete 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 utilitiesPlugin providing only skills:
my-plugin/
├── .claude-plugin/
│ └── plugin.json
└── skills/
├── skill-one/
│ └── SKILL.md
└── skill-two/
└── SKILL.mdComponent not loading:
SKILL.md (not README.md or other name)Path resolution errors:
${CLAUDE_PLUGIN_ROOT}./ in manifestecho $CLAUDE_PLUGIN_ROOT in hook scriptsAuto-discovery not working:
.claude-plugin/)Conflicts between plugins:
For detailed examples and advanced patterns, see files in references/ and examples/ directories.
© anthropics, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 6 other files (references) in plugins/plugin-dev/skills/plugin-structure of anthropics/claude-plugins-official.
Open the folder on GitHubat commit d4226d0
We found 30 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 10 other GitHub owners. This page covers the copy in anthropics/claude-plugins-official, which our catalogue first saw on October 7, 2026.
Claude Code Plugin Structure next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Claude Code Plugin Structure this skillanthropics/claude-plugins-official | 37k | 10 repos | ~3.4k | Automated safety check: Pass | Apache-2.0 | |
| Agent Buildertestdouble/han | 279 | — | ~3.8k | Automated safety check: Pass | MIT | |
| Skill Buildertestdouble/han | 279 | — | ~4.1k | Automated safety check: Pass | MIT | |
| Writing Pluginsnukeop/nuclear | 19k | — | ~825 | Automated safety check: Pass | AGPL-3.0 | |
| OpenCode Plugin CreatorDevin-AXIS/iPolloWork | 6.7k | 1 repos | ~1.3k | Automated safety check: Pass | Custom licence | |
| Create Harnessruvnet/metaharness | 688 | — | ~777 | Automated safety check: Pass | MIT |
testdouble/han
Builds a new Claude Code agent (subagent) from scratch through a relentless, evidence-based interview that walks the agent's design tree decision-by-decision — entity fit, domain focus and…
testdouble/han
Builds a new Claude Code skill from scratch through a relentless, evidence-based interview that walks the skill's design tree decision-by-decision — entity fit, use cases, name, description…
nukeop/nuclear
A skill your agent uses when writing, scaffolding, or modifying Nuclear plugins.
Devin-AXIS/iPolloWork
Scaffolds an OpenCode plugin for iPolloWork with the right async factory shape, zod-based tool definitions and hook registration, and explains where to place and register it.
ruvnet/metaharness
Scaffold your own focused AI agent harness — pick host (Claude Code, Codex, pi.dev, Hermes), template, agents, skills, and ship a npm-publishable harness with its own npx CLI.
obra/superpowers-developing-for-claude-code
Workflows, patterns and examples for the whole Claude Code plugin lifecycle: creating, adding components, testing, troubleshooting, releasing and maintaining plugins.
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
anthropics/claude-plugins-official
Shows how Claude Code plugins keep per-project settings and state in .claude/plugin-name.local.md files with YAML frontmatter and a markdown body.
anthropics/claude-plugins-official
Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.
anthropics/claude-plugins-official
Explains how to write Claude Code slash commands: Markdown files with YAML frontmatter, arguments, file references, bash context and interactive prompts.
anthropics/claude-plugins-official
Finds every CLAUDE.md file in a repository, scores each against quality criteria, shows a report, then makes targeted updates after you approve.
Categories
Explains the directory layout, plugin.json manifest and component organization of a Claude Code plugin, including auto-discovery and portable paths. The skill describes how Claude Code plugins use a standard directory structure with automatic component discovery.claude-plugin.
Claude Code Plugin Structure fits situations like: scaffolding a new Claude Code plugin; deciding where commands, agents, skills and hooks belong in a plugin; setting up plugin.json and its component paths; making plugin file references portable with CLAUDE_PLUGIN_ROOT.
Run `npx skills add anthropics/claude-plugins-official --skill plugin-structure -a claude-code`. Or copy the skill folder (plugins/plugin-dev/skills/plugin-structure in anthropics/claude-plugins-official) into .claude/skills/plugin-structure in your project. Claude Code loads it when a task matches its description.
Run `npx skills add anthropics/claude-plugins-official --skill plugin-structure -a codex`. Or copy the skill folder (plugins/plugin-dev/skills/plugin-structure in anthropics/claude-plugins-official) into .agents/skills/plugin-structure in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add anthropics/claude-plugins-official --skill plugin-structure -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/plugin-structure, .gemini/skills/plugin-structure, .github/skills/plugin-structure and .opencode/skills/plugin-structure in your project.
Going by SKILL.md and its folder, Claude Code Plugin Structure needs credentials named API_KEY.
SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Claude Code Plugin Structure is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.4k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Claude Code Plugin Structure: Agent Builder (testdouble/han, 279 stars), Skill Builder (testdouble/han, 279 stars), Writing Plugins (nukeop/nuclear, 19k stars) and OpenCode Plugin Creator (Devin-AXIS/iPolloWork, 6.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
anthropics (a GitHub organization, an official publisher) maintains it in anthropics/claude-plugins-official, which has 37,477 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 7, 2026.
Source: anthropics/claude-plugins-official on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.