Skip to content

plugins: make claude-plugin-reset derive from the settings.json manifest - #59

Draft
yulonglin wants to merge 1 commit into
worktree-plugin-overhaulfrom
plugin-overhaul-fixes
Draft

plugins: make claude-plugin-reset derive from the settings.json manifest#59
yulonglin wants to merge 1 commit into
worktree-plugin-overhaulfrom
plugin-overhaul-fixes

Conversation

@yulonglin

Copy link
Copy Markdown
Owner

What

Stacked on #58 — fixes the review findings so the manifest is genuinely the single source of truth.

Changes

  • claude-plugin-reset now derives from the manifest. config.sh's hand-maintained OFFICIAL_PLUGINS/PLUGIN_MARKETPLACES arrays contradicted plugins: replace enable-first profiles with a native all-true manifest #58: they still listed the pruned plugin-dev and ralph-loop, five plugins not in the manifest at all (code-review, feature-dev, pr-review-toolkit, Notion, vercel), and only 2 of 6 marketplaces — running the reset script would have reinstalled what plugins: replace enable-first profiles with a native all-true manifest #58 pruned. Both arrays are deleted; the script reads extraKnownMarketplaces and enabledPlugins from claude/settings.json at runtime and installs at --scope user (which also serves plugins: replace enable-first profiles with a native all-true manifest #58's reinstall-at-user-scope follow-up).
  • Restored the per-session symlink cleanup as a minimal SessionStart hook (clean_plugin_symlinks_session.sh). The deleted context_auto_apply.sh was also the thing running clean_plugin_symlinks.sh every session; without it, duplicate skill-picker entries accumulate until the next deploy.
  • deploy.sh: dropped the hardcoded "24" plugin count.
  • statusline.sh: removed the dead profiles_info variable and its printf slot.
  • stale-claims.sh: settings path now passed via sys.argv instead of string interpolation.

Verification

  • claude-plugin-reset --dry-run derives exactly the 6 marketplaces and 24 manifest plugins from claude/settings.json
  • shellcheck clean on changed scripts; bash -n/zsh -n pass
  • statusLine/hooks/permissions gate passes; new hook registered in SessionStart
  • New hook exits 0 standalone

https://claude.ai/code/session_01WoJYQoyUNVUn56h87MHDQ7

Follow-up to #58, which made claude/settings.json the single source of
truth but left two contradictory hand-lists behind:

- config.sh OFFICIAL_PLUGINS/PLUGIN_MARKETPLACES still listed pruned
  plugins (plugin-dev, ralph-loop), five plugins not in the manifest at
  all, and 2 of 6 marketplaces — claude-plugin-reset would have
  reinstalled what #58 pruned. Both arrays are deleted; the script now
  derives marketplaces from extraKnownMarketplaces and plugins from
  enabledPlugins at runtime, installing at user scope.
- Restore the per-session symlink cleanup that died with
  context_auto_apply.sh as a minimal SessionStart hook — without it,
  duplicate skill-picker entries accumulate between deploys.
- deploy.sh: drop the hardcoded plugin count (count-shaped claims drift).
- statusline.sh: remove the dead profiles_info variable.
- stale-claims.sh: pass the settings path via sys.argv, not interpolation.

Claude-Session: https://claude.ai/code/session_01WoJYQoyUNVUn56h87MHDQ7
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.

1 participant