skills/tooling/agent-plugin-development/SKILL.md
Design, build, restructure, and ship Claude Code plugins using the modern skills-first + agents + externalized references model. Use this skill when creating a new plugin, writing or refactoring skills, building spawnable agents, externalizing reference material into references/ or docs/, de-emphasizing commands, or asking about "plugin development", "create skill", "write agent", "restructure plugin", "SKILL.md best practices", "references/ in plugins", "agent orchestration", "pr-review-toolkit", "docs-engineering plugin", or the 5 restructure principles. Also activates for questions about lean SKILL.md, progressive disclosure, scalekit-code-doctor pattern, plugin.json, tile.json, or packaging for devex-kit and marketplaces.
npx skillsauth add saif-shines/devex-kit agent-plugin-developmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build Claude Code plugins the modern way: skills as the primary orchestration layer, agents only for high-agency specialists, reference material aggressively externalized, and commands reduced to structural compatibility shims. This is the post-restructure model proven in devex-kit and the authstack consolidation.
This skill covers the full lifecycle of creating or refactoring effective plugins:
| Phase | What you do | Key question | |-------|-------------|-------------| | Model | Classify work as skill orchestration, agent specialist, or pure reference data | Does this belong in a lean SKILL.md, a spawnable agent, or a references/ file? | | Craft | Write lean SKILL.md using devex-kit patterns + extract to references/ | Does the main file stay focused and delegate via load calls? | | Specialize | Design and implement focused agents with rich example blocks | Is this truly narrow, high-agency, and self-contained enough to spawn independently? | | Structure | Lay out the plugin with skills/ primary and intentionally empty commands/agents/ where appropriate | Does the tree signal the 5 principles at a glance? | | Package | Add README, plugin.json, tile.json (if devex), examples, validation | Can another developer (or agent) land here and immediately understand the architecture? |
State the phase you are in, or describe the plugin or skill you are building — the skill routes accordingly.
These five points define current best practice. Every decision in this skill and every plugin you build with it must honor them.
For the full expanded explanation with authstack before/after, migration tactics, and anti-patterns, load
references/restructure-best-practices.md.
Internalize these before you write a single line of a new SKILL.md or agent.
The official Claude Code docs also provide a clear decision table for plugins vs standalone .claude/ configuration. Load the details (including when to start in .claude/ and when to convert) from references/plugin-structure.md.
Follow the layout used by restructured authstack plugins and the clean docs-engineering example.
my-plugin/
├── .claude-plugin/
│ └── plugin.json
├── skills/ # The only place new logic belongs
│ └── core-skill/
│ ├── SKILL.md # Lean, imperative, load references
│ ├── references/ # Or sibling .md files (AUDIT-CHECKLIST.md, *-reference.md)
│ └── examples/
├── agents/ # 0–6 or intentionally empty
├── commands/ # Present but empty or .deleted shims only
├── docs/ # Canonical durable content (link from skills with ../../)
├── references/ # Plugin-wide shared refs (optional)
├── rules/ # Cross-cutting (optional)
├── README.md
└── tile.json # When shipping via devex-kit
For the complete tree, plugin.json example, legacy-vs-restructured comparison table, rules about empty dirs, official plugin vs standalone guidance, local development with
--plugin-dir,claude plugin init, complex components (LSP/monitors/settings), and migration steps, loadreferences/plugin-structure.md.
Empty commands/ and agents/ directories are correct and intentional. They satisfy Claude Code layout expectations while signaling that logic lives in skills/.
Skills are the entry point users invoke (/agent-plugin-development, /sdk-craft, etc.). They must be lean, imperative, and delegate.
Follow these devex-kit conventions exactly:
license: MIT and metadata block.> For expanded ... load references/xxx.md`` blockquotes for every heavy section.For the exact frontmatter template, description best practices, full body organization, subagent handoff rules, common mistakes, and a ready-to-copy skeleton, load
references/skill-development.md.
The target length for the SKILL.md body itself is 1,500–2,000 words. Everything beyond that lives in references/.
Agents are for narrow, high-agency, spawnable specialists. They are not the default.
Use the pr-review-toolkit pattern as the canonical illustration: a skill (or thin shim) classifies the request, then spawns only the relevant subset of agents (code-reviewer, silent-failure-hunter, etc.) via the Task tool. The old approach of one giant command is deprecated.
Agent files live under agents/ (preferred) or inside a skill. Each must have:
description containing 2–4 concrete <example> blocks (Context / user / assistant / commentary).model (sonnet or opus).tools list.color.For the complete agent frontmatter shape, when-to-use criteria, orchestration-from-skill guidance, model/tool advice, color assignments, and checklist, load
references/agent-development.md.
Many excellent plugins have zero agents (see docs-engineering). Add agents only when the work genuinely benefits from isolation and focused context.
skills/, empty commands/, empty agents/, docs/, references/, rules/ as appropriate.references/skill-development.md. Frontmatter first.tile.json if this skill will live in devex-kit.claude --plugin-dir ./your-plugin (or point at a zip), then invoke the namespaced skill (/your-plugin:your-skill-name). Use /reload-plugins after edits. See the full local testing workflow and --plugin-url / multi-plugin options in references/examples-and-packaging.md.commands/review-foo.deleted.md (keep for history and compat).skills/review-foo/SKILL.md that performs the classification and orchestration.agents/.<example> blocks drawn from the scenarios the old command handled.references/REFERENCE.md or references/COMMON-MISTAKES.md (or equivalent) and move the data.For more migration and externalization patterns drawn from the actual authstack restructure, load
references/restructure-best-practices.md.
A plugin is not complete until it is self-documenting for both humans and future agents.
Required artifacts:
README.md at plugin root that explains the canonical content layer (docs/, skills/, rules/) vs the Claude adapters (commands/, agents/, hooks/), states the 5 principles, and gives real invocation examples.tile.json (exact shape used by every skill in this devex-kit) when the skill is part of devex-kit.examples/ demonstrating good usage.docs/.For the two primary study examples (pr-review-toolkit as agents+skill instead of command; docs-engineering as skills+refs+examples), the full authstack restructure trees, the packaging checklist, official quickstart, detailed local testing with
--plugin-dir//reload-plugins/--plugin-url, and migration from standalone.claude/, loadreferences/examples-and-packaging.md.
Model → Craft: Have you classified every piece of functionality using the 5 principles? Is the primary deliverable a lean skill rather than a command or a monolithic agent?
Craft → Specialize: SKILL.md written and already delegating via load references calls? Heavy data extracted before the main file grew too large?
Specialize → Structure: Any agents have rich descriptions with concrete <example> blocks? Are they narrow enough that a one-sentence handoff produces reliable output? Commands/ and agents/ dirs intentionally minimal?
Structure → Package: Plugin root has README explaining the layers and the 5 principles? examples/ and references/ populated? Empty dirs documented as intentional? Tile.json present if this is a devex-kit skill?
Before declaring the plugin or skill complete:
> For expanded ... load references/...``claude --plugin-dir ./plugin, /reload-plugins, namespaced /plugin:skill invocations, and optionally --plugin-url or multiple --plugin-dir flags). Run claude plugin validate before distribution.At the end of every session, ask: "Did this solve what you were trying to do?"
This skill itself follows the model it teaches. The authoritative patterns live in the references/ directory and in the live restructured plugins (authstack, skillkit examples). When official Claude Code plugin guidance (https://code.claude.com/docs/en/plugins, full index at https://code.claude.com/docs/llms.txt) or devex-kit conventions change, update the references first, then the orchestration in this SKILL.md.
When you create a new plugin using this skill, you are also contributing to the living catalog of good examples. Add it to the references when it demonstrates a new successful variation.
State the phase or the concrete task. Load the relevant reference. Build correctly.
tools
Route tasks and route the user to the correct devex-kit skill before any work begins. Use when starting conversations or tasks that may involve documentation contributions, writing style, cookbook quality, sidebar navigation, SDK design/build/ship, CLI or API tooling, MCP server craft, agent plugin or skill development, devrel storytelling, DX first-success and content taxonomy, or when the user says "using devex-kit", "which devex-kit skill should I use", "help me pick the right skill from the kit", "route this to the right devex skill", or is unsure which /docs-* /sdk-* /mcp-* /devrel-* skill applies. Activates at the start of relevant sessions just like using-superpowers.
tools
Design, build, document, and ship SDKs that developers love. Covers the full SDK lifecycle — from API surface design and type safety through implementation, bundling, documentation, versioning, and publishing. Use this skill whenever someone is creating a new SDK, extracting shared code into a client library, improving SDK developer experience, planning a breaking change or migration guide, or reviewing an SDK for quality. Also activates for questions about error message design, client library patterns, type-safe API design, SDK packaging (ESM/CJS), or npm publishing.
tools
Build MCP servers that AI agents actually want to use. Covers the full lifecycle — tool design (naming, schemas, descriptions), resource design (URIs, templates, subscriptions), project structure, transport selection (stdio vs Streamable HTTP), security, error handling, and testing. Use this skill when building a new MCP server, adding tools or resources to an existing one, reviewing an MCP server for quality, choosing between stdio and HTTP transport, designing tool schemas for LLM consumption, or hardening an MCP server for production. Also activates for questions about tool naming conventions, Pydantic Field descriptions, Zod validation for MCP, resource URI schemes, or MCP server security patterns.
tools
Build CLI tools and API utilities that developers on your platform actually use. Covers CLI design (command hierarchy, flags, completions, cross-platform UX) and API collection generation (Postman/OpenAPI from Express, Next.js, Fastify, Hono routes). Use this skill when building a developer-facing CLI tool, adding subcommands or flags, implementing shell completions, designing interactive prompts, generating Postman collections from code, creating API testing artifacts, or building any developer utility. Also activates for questions about argument parsing (commander, click, typer, cobra), progress indicators, terminal UX, or Postman collection format.