Skip to content

chore: stale vercel plugin install injects MANDATORY skill suggestions on every prompt #298

Description

@zachdunn

The vercel Claude Code plugin injects "MANDATORY" skill suggestions on essentially every prompt and tool call in this repo. Most of them are false positives — we're a Cloudflare Workers / Bun / D1 project, not a Vercel one.

Root cause

Two Vercel plugin installations were registered on this machine and the older one was doing the injection:

vercel@claude-plugins-official:
  - scope: user   → version 0.40.0         (no PreToolUse/UserPromptSubmit hooks registered)
  - scope: local  → version 2e79fc9698b0   (pre-0.32 commit, full injection hooks still registered)
                    projectPath: /Users/zachdunn/Code/rally
                    installPath: ~/.claude/plugins/cache/claude-plugins-official/vercel/2e79fc9698b0

vercel/vercel-plugin#57 dropped the injection hooks in 0.40.0. Its hooks.json only registers SessionStart / SessionEnd. But the older install's hooks.json still registered:

  • PreToolUse (matcher Read|Edit|Write|Bash) → pretooluse-skill-inject.mjs
  • UserPromptSubmituser-prompt-submit-skill-inject.mjs + user-prompt-submit-telemetry.mjs
  • PostToolUse, SubagentStart, SubagentStop — more injection points

When /plugin reported "vercel is already at the latest version (0.40.0)" it was reading the user-scope install and silently ignoring the stale project-scope one. Both hook registrations were active simultaneously, so the old hooks fired on every prompt and tool call globally.

Why this repo lights it up so hard (separate issue)

Even with the old install cleaned up, the plugin's active-matching design scores generously on generic vocabulary. In our case:

  • workers/api/** matches the api/** path pattern → triggers vercel-functions.
  • .github/workflows/** → triggers workflow (Vercel's WDK skill) and deployments-cicd.
  • package.json / bun.lock basenames → trigger bootstrap and next-upgrade.
  • Generic words in prompts (deploy, env, cache, frozen, broken, check) trigger lexical-recall matches. allOf: [broken, check] +4 alone is enough.
  • Our own files: reading wrangler.jsonc fires vercel-functions. Reading package.json fires bootstrap and next-upgrade. Reading .github/workflows/*.yml fires workflow and deployments-cicd.

Progress (2026-04-17)

Local machine now clean. Steps taken:

  1. Disabled vercel for the rally project in /Users/zachdunn/Code/rally/.claude/settings.local.json via /plugin — the local-scope install got upgraded from the pre-0.32 commit to 0.40.0 in the process.
  2. Ran /reload-plugins — plugin host picked up the new state (25 plugins / 18 hooks reloaded).
  3. Deleted orphan cache dirs that still had old injection-enabled hooks.json content on disk:
    rm -rf ~/.claude/plugins/cache/claude-plugins-official/vercel/{0.32.5,2e79fc9698b0}
    
    Only 0.40.0 remains under that directory now.
  4. Verified installed_plugins.json shows both installs at 0.40.0 and the local-scope install disabled:
    user-scope  → 0.40.0  (enabled globally)
    local-scope → 0.40.0  (disabled for /Users/zachdunn/Code/rally)
    

Note: even after all of the above, injection hooks continued to fire in the session that was already running when the fix landed. Hook registrations appear to be captured at Claude Code session start — /reload-plugins updates plugin definitions but does not appear to deregister already-live hooks. Starting a fresh Claude Code session in this repo should be clean. If it isn't, we know there's a deeper issue to file upstream.

Upstream

Filing the platform-level observations at vercel/vercel-plugin:

  1. When a newer plugin version supersedes an older install at a different scope, the plugin host should deregister the older install's hooks — otherwise chore: add custom domain route for API worker #57's fix silently doesn't take effect for users with multi-scope installs.
  2. Even on 0.40.0+, a repo-level opt-out (via .claude/settings.json or CLAUDE.md) for the injection signals would be useful — "this project is not a Vercel app; suppress injections."
  3. Injection scoring on generic basenames (package.json, api/**, .github/workflows/*) and generic prompt vocabulary (deploy, broken, check) is too loose; consider requiring stronger signal (Vercel-related deps present, .vercel/ directory, next.config.*, etc.) before matching.

Workaround / kill switch

/plugin → disable vercel@claude-plugins-official at user scope. Confirmed clean once the orphan cache dirs are gone and a fresh session is started.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions