agentleFS
GerardoRdz96GerardoRdz96/aios-starter-kit/.claude/skills/plugin-builder/SKILL.md

plugin-builder

Skill3 starsChanged 5 months agoMITView on GitHub

Use when the user asks to build, package, bundle, optimize, or audit a Claude Code plugin or marketplace — a distributable bundle of skills + agents + commands + hooks installed via `/plugin`. Triggers — "build a plugin", "package this as a plugin", "bundle my skills", "make a marketplace", "turn these skills into something shareable", or `/plugin-builder`. The packaging + distribution sibling of `/skill-builder`, `/agent-builder`, `/agents-team-builder`, `/routines-builder`, `/hooks-builder`, `/workflow-builder`. Runs a decision gate and Discovery Interview before writing files.

5 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    MCP check: If the plugin wraps an external tool, prefer a CLI-backed skill/command over an MCP server (CLI > API > MCP — MCP burns far more …

    line 33
  2. Distinctive:

    If 1–2 don't justify a plugin, recommend the right primitive builder and stop.

    line 35
  3. Distinctive:

    Update CLAUDE.md (one line) the same session.

    line 89

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

What This Skill Does

Guides creating, optimizing, and auditing Claude Code plugins and marketplaces. A plugin is a single installable package bundling any mix of commands, agents, skills, and hooks, distributed through a marketplace and installed with claude plugin install.

The six primitive builders each make one loose capability in .claude/. This one bundles capabilities and makes them shippable — to teammates, the public, or your own other machines. Build primitives with their builders first; package here.

Plugin vs the primitive builders

You want…UseWhy
One reusable workflow/SOP hereSkill (/skill-builder)Lives loose in .claude/skills/
One isolated-context delegate jobAgent (/agent-builder)Lives loose in .claude/agents/
A small crew working in parallelTeam (/agents-team-builder)Lives loose in .claude/teams/
Something unattended on a scheduleRoutine (/routines-builder)Scheduled, runs as you
An event-driven local triggerHooks (/hooks-builder)Lives in settings.json hooks; bundleable into a plugin
Width fan-out to N parallel agentsWorkflow (/workflow-builder)Lives loose in .claude/workflows/
To bundle + version + ship any mix of the abovePlugin (this skill)Distribution is the whole point

Mode 1: Build / Package a Plugin

Step 0 — Decision Gate (FIRST, before any interview)

  1. Real distribution need? Will this leave the project — a teammate, the public, another machine? No → don't build a plugin. A plugin you never distribute is just overhead.
  2. More than a single trivial primitive? One tiny skill used only here doesn't need a package.
  3. Confidentiality gate (hard). A plugin is built to leave the machine. If the bundle would contain employer-confidential content, client IP, or anything you're not free to publish → stop. Shipped plugins are personal- or public-data only.
  4. MCP check. If the plugin wraps an external tool, prefer a CLI-backed skill/command over an MCP server (CLI > API > MCP — MCP burns far more tokens). Keep MCP only with a reason.

If 1–2 don't justify a plugin, recommend the right primitive builder and stop.

Step 1 — Discovery Interview (one round at a time; skip rounds already answered)

  1. Purpose & name — what it delivers, who installs it. Name: lowercase-hyphens; it becomes plugin install <name> and namespaces every component.
  2. The bundle — which existing skills/agents/commands get packaged (copied in), which are new.
  3. Distribution — local test only → this-repo-as-marketplace → standalone public repo. Starting version (default 0.1.0).
  4. Manifest & guardrails — author, license (MIT default for public), keywords; re-confirm the confidentiality gate; secrets come from env at runtime, never committed.
  5. Confirmation — summarize the whole plan back; build only after a yes.

Step 2 — Build

(claude plugin new <name> can scaffold the skeleton for you, then fill it in.)

Scaffold under plugins/<name>/:

plugins/<name>/
├── .claude-plugin/
│   ├── plugin.json          ← manifest (name, version, description, author, keywords)
│   └── marketplace.json     ← required to install via a marketplace; lives in the dir you run `marketplace add` against ("source": "./")
├── skills/<skill>/SKILL.md  ← components live at the plugin ROOT, not in .claude-plugin/
├── agents/<agent>.md
├── commands/<cmd>.md
└── README.md                ← what it does, install line, components, quick start
  • Components at the ROOT — the #1 structural mistake is putting them inside .claude-plugin/.
  • No hardcoded paths — use ${CLAUDE_PLUGIN_ROOT} in every hook/script reference.
  • Minimal manifest: name, version, description, author, keywords. Nothing unused.
  • Minimal marketplace.json (one entry per plugin in the repo):
{ "name": "<market>", "owner": { "name": "..." }, "plugins": [ { "name": "<plugin>", "source": "./", "description": "what the plugin does" } ] }

source is the path to the plugin dir relative to the marketplace root — use "./" only when the plugin IS the repo root; otherwise point at it (e.g. "./plugins/<name>").

Step 3 — Validate (don't skip)

claude plugin validate ./plugins/<name>/.claude-plugin/plugin.json
claude plugin validate --strict ./plugins/<name>/.claude-plugin/plugin.json   # fail on warnings before shipping (use in CI)
claude plugin marketplace add ./plugins/<name> --scope local   # the dir holding .claude-plugin/marketplace.json (use "./" only if the plugin IS the repo root)
claude plugin install <name>@<marketplace> --scope local
claude plugin details <name>                       # inventory + token cost
# exercise each component, then tear down:
claude plugin uninstall <name> --scope local && claude plugin marketplace remove <marketplace>

Report exactly what ran and what passed. Don't claim it works without validate + a local install.

Step 4 — Document & Register

Update CLAUDE.md (one line) the same session; note durable facts in the wiki; log the decision if it was one.

Mode 2: Optimize / Mode 3: Audit

Read the plugin's plugin.json + tree first — never optimize what you haven't read. Checklist: components at the root (not in .claude-plugin/) · manifest minimal, semver matches the marketplace entry · ${CLAUDE_PLUGIN_ROOT} everywhere (no absolute paths) · claude plugin validate passes on both manifests · no secrets committed · nothing confidential in a public bundle · README present. Show the diff and the why per change before applying. For a review of a plugin you just built, route to a different-lineage model (No-Self-Review Law in multi-brain).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.