From dirigent
Scan a codebase and build a Claude Code plugin tailored to its stack, test setup, and dev workflow. Creates CLAUDE.md, skills, and agents specific to this project.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dirigent:build-pluginThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Scan the current codebase and produce a complete plugin configuration that makes Claude Code maximally effective for THIS specific project.
Scan the current codebase and produce a complete plugin configuration that makes Claude Code maximally effective for THIS specific project.
Output directory: $ARGUMENTS (defaults to .claude if no argument given).
Parse the output directory: if $ARGUMENTS is empty or not provided, use .claude. Otherwise use the first argument as the target directory.
This is NOT a generic plugin. The output encodes the project's actual commands, test patterns, service setup, auth mechanism, and conventions — so Claude Code can develop on this codebase without asking how things work.
Use the codebase-mapper agent (runs on Opus) to produce a deep operational analysis.
Prompt for the agent:
Analyze this repository and produce an operational map. Write it to
.dirigent/codebase-map.md.I need to understand:
- Stack & services (languages, frameworks, databases, how services start)
- Dev workflow (install, run, test, lint — exact commands)
- Test infrastructure (frameworks, directories, fixtures, CI pipeline)
- Auth & access (mechanism, test credentials, roles)
- Existing AI/plugin config (.claude/, .opencode/, CLAUDE.md, conventions)
- Key patterns & gotchas (naming, imports, error handling, non-obvious things)
Be precise — include exact commands that work. Run discovery commands to verify. Your output drives a plugin generator.
After the agent returns, read .dirigent/codebase-map.md.
Before generating, check what already exists in the output directory:
{output-dir}/CLAUDE.md if it exists — preserve user customizations{output-dir}/skills/ if it exists — don't duplicate existing skills.opencode/ if it exists — consider porting useful skills to Claude formatCLAUDE.md at repo root if it existsNote what to preserve, what to port, and what to create fresh.
Use the plugin-writer agent to create the plugin configuration.
Prompt for the agent:
Build a plugin configuration at
{output-dir}/for this project based on the operational map below.{paste the contents of .dirigent/codebase-map.md}
Output directory: {output-dir} — write ALL files under this directory.
Existing config to preserve: {list what you found in Step 2, or "None — fresh setup"}
Create:
{output-dir}/CLAUDE.md— project instructions (under 100 lines){output-dir}/skills/run-tests/SKILL.md— how to run tests in THIS project{output-dir}/skills/dev-server/SKILL.md— how to start dev environment (if applicable){output-dir}/skills/e2e-verify/SKILL.md— how to verify features e2e (if applicable){output-dir}/agents/test-writer.md— test specialist for THIS project's patterns (if useful)Every command must be verified — run it before writing it into a skill. Don't write generic skills.
After the agent returns, verify the output:
{output-dir}/CLAUDE.md and confirm it has the right stack info{output-dir}/skills/ and confirm skills were createdTell the user what was created:
{output-dir}/ with a one-line descriptionrun-tests and whether it passed{output-dir}/CLAUDE.md without preserving user content (merge, don't replace).opencode/ skills, mention them in the report as candidates for portingnpx claudepluginhub bidequity/outbid-dirigent --plugin dirigentDocuments Claude Code plugin structure including directory layout, plugin.json manifest, commands/agents/skills/hooks organization, naming conventions, and auto-discovery.
Guides creation and organization of Claude Code plugins: directory layout, plugin.json manifest, component structure for commands, agents, skills, and hooks.
Creates Claude Code plugin directory structure with .claude-plugin/plugin.json manifest and optional components like commands, agents, skills, hooks, MCP servers, scripts. Use when building a new plugin from scratch.