Ship a build pipeline that mirrors the agentics-kit marketplace into a single clean distribution repo — keeping only each plugin's manifest, components, README, and CHANGELOG — so users who install pull plugin-required files instead of docs/ , scratch markdown, and repo configs.
Read and implement all steps in the plan at docs/plans/build-clean-plugin-dist.md — Publish a clean plugin distribution repo. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/build-clean-plugin-dist.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
More ways to run this plan — goal & workflow prompts, file path
Achieve this goal: Publish a clean plugin distribution repo. The plan at docs/plans/build-clean-plugin-dist.md describes one approach — use it as reference, but optimize for the outcome. Fan out across parallel subagents where that serves the outcome. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/build-clean-plugin-dist.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
Run a workflow to implement the plan at docs/plans/build-clean-plugin-dist.md — Publish a clean plugin distribution repo. Brief subagents with the plan file at docs/plans/build-clean-plugin-dist.md. Reserve a final verification phase for the lead agent, not a subagent. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/build-clean-plugin-dist.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
build-clean-plugin-dist.html
docs/plans/build-clean-plugin-dist.html
docs/plans/build-clean-plugin-dist.md
Context
The story behind this plan — what prompted the work and why it matters now.
The agentics repo is both the development workspace and the install source. Its .claude-plugin/marketplace.json registers 12 active plugins via git-subdir sources whose url points at https://github.com/shawn-sandy/agentics.git . When a user installs, Claude Code pulls the plugin's path subtree — but the working repo carries a lot that has no business in an install: a 35 KB root README.md , docs/ , examples/ , scripts/ , .playwright-mcp/ , a session .png , CLAUDE.local.md , .DS_Store files, and assorted top-level markdown ( ROADMAP.md , SECURITY.md , SOCIAL.md ). Inside individual plugin dirs there can also be scratch notes that ship unintentionally.
The fix is a dedicated, clean distribution repo — one repo shaped exactly like the marketplace (not per-plugin repos) — generated from this source repo by a build script. The build reads marketplace.json plugins[] as the source of truth (so the six entries in removed[] and any reference-only directories never ship), copies only an allowlisted set of files per plugin, rewrites each source.url to point at the distribution repo, and publishes the result. A GitHub Action reruns the build and publishes on every release so the clean repo never drifts from source.
Decisions locked in clarification: keep rules = manifest + component dirs + README + CHANGELOG; shape = one marketplace-style repo like agentics-kit ; automation = a build script plus a GitHub Action that publishes on release.
Superseded by publish-plugins-to-dist-repo-daily.html — the --publish implementation, GitHub Action, and dist repo setup described here were completed under that plan with a daily cron trigger instead of release-triggered.
Files that change
Every file this plan touches, and what happens to each one.
scripts/build-dist.mjsnew- .github/workflows/
publish-dist.ymlnewREADME.mdmodified add Distribution section: build command, strip rules, new install pathCLAUDE.mdmodified add Distribution section
.claude/rules/marketplace.mdmodified note that source.url rewriting is handled by the build script, not hand-editeddist/generated build output — not committed to source repo.claude-plugin/marketplace.jsongeneratedREADME.mdgeneratedLICENSEgeneratedkit/plugins/<name>/ × 12generated
Steps
The step-by-step work, in order — each step says what to do, why it matters, and how to check it worked.
Definition of done
The plan counts as done when every statement below is true — check each one off as you verify it.
Final check
One last pass to confirm the whole change works end to end.
Run node scripts/build-dist.mjs locally and inspect the tree: find dist -type f | sort should show 12 plugin directories, each carrying only allowlisted files, plus a rewritten root marketplace.json , slim README.md , and LICENSE . Confirm jq reports a single distribution-repo source.url and a null removed . Run node scripts/build-dist.mjs --check and confirm exit code 0, then verify the leak tripwire by temporarily allowlisting docs and confirming a non-zero exit. Trigger the Action via workflow_dispatch and confirm it publishes a commit to the distribution repo. Finally, in a clean session, register shawn-sandy/agentics-kit and install plan-agent , then list the installed files to confirm zero cruft. The source agentics repo and its existing marketplace.json must remain unchanged except for the new script, workflow, and docs.
Wrapping up
Three gates that must all pass before this plan is marked completed.
Completion Report
No items to report — all requirements met.