Skip to content

fix(just): install plugins at user scope; fail loudly on unresolved slash commands - #354

Merged
laurigates merged 1 commit into
mainfrom
fix/plugin-user-scope-install
Aug 6, 2026
Merged

fix(just): install plugins at user scope; fail loudly on unresolved slash commands#354
laurigates merged 1 commit into
mainfrom
fix/plugin-user-scope-install

Conversation

@laurigates

Copy link
Copy Markdown
Owner

Problem

just -g plugins-setup-repo still failed after #352:

Configuring Claude plugins for repository at .../podio-mcp...
Unknown command: /configure-claude-plugins

…and the recipe reported success anyway.

Root cause: install scope, not command name

All 40 marketplace plugins were installed at project scope, bound to
~/repos/ForumViriumHelsinki/thelma — the cwd of a plugins-install run on
2026-03-08. A project-scoped plugin's skills load only when cwd is that
project, so /configure-claude-plugins resolved in no other repo.

The failure was invisible because both status signals report enablement, not
reachability:

Signal Says Actually means
enabledPlugins in settings.json true user wants it on
claude plugin list Status: ✔ enabled it is not disabled
claude plugin list --json.scope project loads only in one directory

Confirmed empirically: the only plugin skills that loaded in any session were
session-plugin and comfyui-plugin — exactly the two records with
"scope": "user" in installed_plugins.json. Installing configure-plugin
with --scope user made /configure-claude-plugins resolve immediately.

#352 fixed the slash-command names (a real, separate bug). It verified them
against the marketplace inventory rather than by resolving them, so this layer
stayed hidden.

Changes

  • plugins-install passes --scope user. It is today's CLI default, but
    explicit means a future run from inside a repo can't silently re-scope the
    whole set again.
  • New plugins-install-audit — flags any marketplace plugin with no
    user-scope install record; exits 1 so it can gate.
  • New private _claude-slash — one call site for every headless
    claude -p "/<skill>". claude -p prints Unknown command: /foo and
    exits 0, so the old exit-code check reported ok while nothing ran. The
    guard greps the output and converts that to rc=3 with the fix instructions.
    Used by plugins-setup-repo, plugins-check-repo, and plugins-bulk.
  • _claude-slash cds into the target repo. Separate pre-existing bug:
    plugins-bulk ran every picked repo's claude call from the invocation cwd,
    so an N-repo selection configured the launch directory N times instead of
    each repo once.

Verification

  • just -g plugins-install-audit: 39 project-scoped-only before, clean
    (exit 0) after just -g plugins-install.
  • just -g plugins-check-repo in podio-mcp — previously Unknown command +
    exit 0 — now runs the skill to completion and returns a real report.
  • just -g --list parses; both new recipes render correct descriptions.
  • pre-commit run check-justfiles passes on the changed file.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ne1Yce6SxwJLknhroAfPVB

…lash commands

`just -g plugins-setup-repo` printed "Unknown command:
/configure-claude-plugins" in every repo and still reported success.

Root cause: all 40 marketplace plugins were installed at **project** scope,
bound to ~/repos/ForumViriumHelsinki/thelma by a `plugins-install` run from
that cwd on 2026-03-08. A project-scoped plugin's skills load only when cwd is
that project, so the skill existed nowhere else — while `enabledPlugins` said
true and `claude plugin list` said "Status: ✔ enabled", because both report
enablement, not reachability. Only `claude plugin list --json`'s `scope` field
tells the truth. Confirmed empirically: the only plugins whose skills loaded in
any session were session-plugin and comfyui-plugin — exactly the two installed
at user scope.

#352 fixed the slash-command *names*, which was a real but different bug; it
verified names against the marketplace inventory rather than by resolving them,
so this layer stayed hidden.

Changes:
- `plugins-install` passes `--scope user` (the default today, but explicit so a
  future run from inside a repo can't re-scope the whole set).
- New `plugins-install-audit`: flags any marketplace plugin lacking a
  user-scope install record. Exits 1 so it can gate.
- New private `_claude-slash`: single call site for every headless
  `claude -p "/<skill>"`. `claude -p` prints "Unknown command: /foo" and
  **exits 0**, so the old exit-code check reported ok while nothing ran — the
  guard greps the output and turns that into rc=3 with the fix instructions.
  Used by plugins-setup-repo, plugins-check-repo, and plugins-bulk.
- `_claude-slash` also cds into the target repo. plugins-bulk ran every picked
  repo's claude call from the invocation cwd, so a multi-repo selection
  configured the launch directory N times instead of each repo once.

Verified:
- `plugins-install-audit`: 39 project-scoped-only before, clean after.
- `just -g plugins-check-repo` in podio-mcp now runs the skill to completion
  and returns a real report (previously "Unknown command", exit 0).
- `just -g --list` parses; recipe descriptions render correctly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne1Yce6SxwJLknhroAfPVB
@github-actions github-actions Bot added the size/s label Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🤖 Claude analyzed the CI failures but determined no code changes are needed.

Failed workflow: https://github.com/laurigates/dotfiles/actions/runs/31080743939

This may indicate:

  • Flaky tests
  • Infrastructure issues
  • Transient failures
  • Configuration problems outside the codebase

Please review the failure logs manually.

@laurigates
laurigates merged commit c01d621 into main Aug 6, 2026
7 of 8 checks passed
@laurigates
laurigates deleted the fix/plugin-user-scope-install branch August 6, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant