Claude Code plugin packaging (--claude-plugin install) #3432
Replies: 2 comments
|
Hi Marc — speaking up since I'm CC'd and I've spent the most time recently on the operational surface this would replace. The proposal is technically sound and the bugs it'd fix (#3426, #2303, #3091, #3342) are real. The Some operational traps I've hit maintaining
Two design questions:
What
Some of these are pure plugin-architecture-only (PreCompact hook patterns; the On Happy to share concrete patch diffs or do a focused review of — Jasper |
|
Thanks Jasper — this is exactly the second pair of eyes the proposal needed, and the trap list is concrete in a way only someone who's actually shipped a plugin build can produce. Before going point-by-point: I want to be upfront that I've deliberately narrowed this discussion to "is On the operational traps
Design questions
The 7-months-of-gsd-plugin listEverything you listed (auto-resume across CoexistenceStrong agree. The framing proposed matches yours: Cross-review offerYes please. The most useful artifact for me would be a diff or list — "here are the |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi maintainers — pinging here rather than filing a fresh issue because the enhancement template has a pre-flight checkbox I can't honestly tick.
What I want to propose
An enhancement to the existing
--claudeinstall mode: a new--claude-pluginflag that swaps the on-disk layout for a Claude Code local marketplace (.claude-plugin/marketplace.json) + plugin tree, and registers it viaclaude plugin marketplace add/claude plugin installafter emit. Samenpx … installCLI surface, same/gsd:*command namespace, no marketplace publishing, no fork.--codex,--opencode, and the existing--claudemode are untouched.By the enhancement template's own definitions this fits: I'm not adding new commands, workflows, or concepts — only re-targeting how
--claudewrites to disk.What blocks me from filing directly
The enhancement template requires me to check:
It has, multiple times, in materially different shapes:
${CLAUDE_PLUGIN_ROOT}bug fixed)I can't honestly check the box. I also don't want to file as
feature_request.yml, because by CONTRIBUTING.md's definitions it isn't one.What block me from filing directly (2)
The enhancement template also requires me to check:
Which would not be truthful. There is a current
--claudeinstall path, but it has several issues (see below) and this proposed approach avoids them.What's different from prior art
PR #13 needed a SessionStart symlink hook to bridge
@~/.claude/...references to the plugin cache path, which was rejected as too hacky.This proposal reuses the installer's existing path-rewrite machinery (
bin/install.js:copyWithPathReplacement) and rewrites references at install time to the marketplace+plugin layout. No symlink, no dependence on${CLAUDE_PLUGIN_ROOT}(anthropics/claude-code#9354still open), no marketplace publishing.#2017 is a downstream fork; this proposal keeps one source of truth and adds
--claude-pluginas an install-format flag.Concrete bugs this would resolve as a side effect
The structural mechanism: in plugin mode the installer never calls
writeSettings()on~/.claude/settings.json. Claude Code itself writes the only required setting (extraKnownMarketplaces/enabledPluginsin project- or user-scope.claude/settings.json) via theclaude pluginsubprocess — sidestepping our settings-write code entirely.settings.jsoncorruption (root cause: ourwriteSettings())/gsd-updateand successfully updated to the latest version. But after restarting CC I'm getting⚠ stale hooks — run /gsd-update. #2303 — "stale hooks" warning (hook scripts + VERSION co-located inside the plugin; desync impossible)--localSDK resolution gaps (plugin layout is self-contained)Also, the current install method exposes GSD to all projects (on global install) with no easy way to enable/disable GSD. By leveraging the plugin system, enable/disable is a couple of keystrokes away.
Status
A working implementation lives on
marcfargas:feat/claude-plugin-installthat I wrote for my local use on Windows ARMQuestion
In summary: On the fly Claude Code plugin creation as a new install path. Is this approach preferred to the already rejected ones and acceptable?
All reactions