Skip to content

fix: scope plugin source to ./skills so installs ship 50 KB, not 230 MB - #795

Open
rymalia wants to merge 1 commit into
tobi:mainfrom
rymalia:fix/plugin-payload-scope
Open

fix: scope plugin source to ./skills so installs ship 50 KB, not 230 MB#795
rymalia wants to merge 1 commit into
tobi:mainfrom
rymalia:fix/plugin-payload-scope

Conversation

@rymalia

@rymalia rymalia commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Fixes #790. Related: #789 / PR #794 (same manifest, different lines — the two changes are merge-independent; a three-way merge test of both diffs combines cleanly).

Problem

The plugin entry in .claude-plugin/marketplace.json declares "source": "./" — the repository root. Two consequences:

  1. Every install copies the entire repository into ~/.claude/plugins/cache/, when the plugin machinery only reads the skill files and the manifest metadata (~50 KB total).
  2. Because the copied plugin root contains a package.json, claude plugin install also runs a full npm dependency install inside the cache. On a canonical install (claude plugin marketplace add tobi/qmd + claude plugin install qmd@qmd) the resulting ~/.claude/plugins/cache/qmd/qmd/0.1.0/ folder is 230 MB with 9,000+ items, including node_modules with native builds — per machine, for a few KB of skills.

Fix

Scope the plugin source to the skills directory — nothing is added or removed, both skills (qmd and release) ship exactly as before:

Note: #790 led with the narrower "source": "./skills/qmd" as its verified fix, which would also stop shipping the release skill. This PR deliberately implements the issue's other offered scoping which does not alter which skills are included so there is no disruption to either skill functionalities.

-			"source": "./",
+			"source": "./skills",
...
-			"skills": ["./skills/"],
+			"skills": ["./qmd", "./release"],

The payload drops 230 MB → ~50 KB, and no dependency install runs (there is no package.json anywhere under skills/).

The mcpServers declaration is untouched and unaffected: "command": "qmd" resolves via PATH, not relative to the plugin root.

Verified locally with the equivalent scoping ("source": "./skills/qmd"): the install snapshot shrinks as described, the skill arrives byte-identical (md5-checked), no dependency install runs, and claude plugin details parses the component inventory cleanly.

Notes

@PowderAddicts

PowderAddicts commented Jul 26, 2026 via email

Copy link
Copy Markdown

The plugin's source was the repo root, so every install copied the
entire repository into ~/.claude/plugins/cache/ — and because that
copy includes package.json, 'claude plugin install' also ran a full
npm dependency install: 230 MB / 9,000+ items for a few KB of skills.
Scoping source to the skills directory eliminates both. No feature
change: both skills (qmd, release) still ship, and the PATH-resolved
mcpServers entry is unaffected.

Fixes tobi#790
@rymalia
rymalia force-pushed the fix/plugin-payload-scope branch from 12cc093 to d79ffb6 Compare July 26, 2026 19:34
rymalia added a commit to rymalia/qmd that referenced this pull request Jul 26, 2026
…bi#795, tobi#796) + index recovery

Ships the plugin-staleness fixes upstream: PR tobi#794 (version-sync, fixes
release skill's dangling release-context.sh reference. Also records the
post-pull re-embed verification (doctor 3/3 vector sample green) and
daemon bounce.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude Code plugin: ships the whole repo for a 24 KB skill

2 participants