Layer: sharing. Proof: make prove LEVEL=sharing.
Package the agents, skills and guard you built as one plugin that a team installs, updates and checks, while .claude/ stays the only place you edit them.
A teammate wants your factory. They copy .claude/ by hand. The hooks point at scripts that were not copied. A week later one skill is out of date in their repo, and nobody knows which.
Copy the folder. There is no version, no update, and no way to tell whether the copy still matches the original.
.claude-plugin/marketplace.jsonlists one plugin,factory-kit. This repo is the marketplace.plugins/factory-kit/.claude-plugin/plugin.jsonholds the name, the version and the author. Users get an update only whenversionchanges.scripts/plugin.tscopies the four generic skills, the five agents and the secrets guard from.claude/into the plugin. Nothing app-specific goes in:worksheet-bandsandrules/api.mdstay behind.plugins/factory-kit/hooks/hooks.jsonruns the guard with${CLAUDE_PLUGIN_ROOT}, not the project folder, because the plugin is copied to a cache when it is installed.plugins/factory-kit/evals/has two cases: one where the plugin should fire (triage a bug) and one where it should stay out (a question about France).
A teammate runs two commands in their repo:
claude plugin marketplace add learnwithparam/claude-code-workshop
claude plugin install factory-kit@claude-code-workshop --scope project
When you bump version and push, claude plugin update brings the change to every repo that installed it.
- Type
npx tsx scripts/plugin.ts. Expectbuilt plugins/factory-kitand no change ingit status. - Type
claude plugin validate plugins/factory-kit --strict. ExpectValidation passed. - Add a line to
.claude/skills/handoff/SKILL.mdand typemake prove LEVEL=sharing. Expect FAIL withskill handoff is stale. Run step 1 and the proof passes again. - Optional, spends tokens: type
claude plugin eval plugins/factory-kit --threshold 0.8 --no-publish --trust-plugin. It runs both cases with and without the plugin and prints the score difference.
make prove LEVEL=sharing rebuilds the plugin in a temporary folder, compares each skill with the committed copy, checks the marketplace lists factory-kit, and runs claude plugin validate --strict when claude is on the path. tests/structure/plugin.test.ts also checks that every file is a byte copy of .claude/, every hook path resolves inside the plugin, and that the version changed if any plugin file changed since the last tag.
Track A: install the kit into a fresh empty repo and run /factory-kit:issue-triage on an issue. Track B: move one more skill into the kit, add it to KIT in scripts/plugin.ts, bump the version, add an eval case for it, and pass claude plugin validate --strict.
.claude/commands/gate.md is one file that runs by name. A skill is a folder Claude chooses to open; a command is a prompt you type. plugins/factory-status is a mod that draws the newest factory run above the prompt. Check it with claude plugin validate plugins/factory-status and claude plugin test plugins/factory-status.
A plugin's hooks run with your rights, outside the sandbox. Who reviews a marketplace before your team adds it, and what stops a later commit from changing what a hook does?
