Problem
The inject-claude-md.mjs SessionStart hook injects the full Vercel ecosystem knowledge graph (~19k tokens) on every session event (startup|resume|clear|compact), regardless of whether the session will touch Vercel-related code.
For users working across multiple projects (some Vercel, some not), this is a fixed ~19k token cost on every session — even when the session is pure backend work, data science, or non-Vercel frontend.
Current behavior
SessionStart (startup|resume|clear|compact)
→ inject-claude-md.mjs fires
→ Full vercel.md (~19k tokens) injected into conversation
→ Always, unconditionally
Desired behavior
A configuration option to control this injection. For example:
# Environment variable
VERCEL_PLUGIN_SESSION_INJECT=off # skip SessionStart injection
# Or a config in plugin settings
{ "sessionStartInject": "on-demand" }
When disabled, the plugin would still work via the existing on-demand hooks:
PreToolUse skill injection (fires when reading/editing Vercel-related files)
UserPromptSubmit skill injection (fires when the user's prompt mentions Vercel topics)
These on-demand hooks already provide excellent coverage — they inject the right skill at the right time. The SessionStart dump is redundant for sessions that trigger these hooks, and wasteful for sessions that don't.
Impact
- 1M context models: ~2% — tolerable but unnecessary
- 200k context models: ~10% — significant baseline cost
- Sessions per day: Multiplied across every session start, resume, clear, and compact event
Suggested approaches
- Environment variable toggle (
VERCEL_PLUGIN_SESSION_INJECT=off) — simplest, user controls it
- Project-level detection — skip injection if no
vercel.json, next.config.*, or .vercel/ in the working directory
- Lazy injection — defer the knowledge graph until the first Vercel-related PreToolUse or UserPromptSubmit match, then inject once per session
Option 3 would be the best UX — zero config, zero waste, same coverage.
Environment
- Plugin version: 0.22.1
- Claude Code with 1M context (claude-opus-4-6)
- Working directory contains both Vercel and non-Vercel projects
Problem
The
inject-claude-md.mjsSessionStart hook injects the full Vercel ecosystem knowledge graph (~19k tokens) on every session event (startup|resume|clear|compact), regardless of whether the session will touch Vercel-related code.For users working across multiple projects (some Vercel, some not), this is a fixed ~19k token cost on every session — even when the session is pure backend work, data science, or non-Vercel frontend.
Current behavior
Desired behavior
A configuration option to control this injection. For example:
When disabled, the plugin would still work via the existing on-demand hooks:
PreToolUseskill injection (fires when reading/editing Vercel-related files)UserPromptSubmitskill injection (fires when the user's prompt mentions Vercel topics)These on-demand hooks already provide excellent coverage — they inject the right skill at the right time. The SessionStart dump is redundant for sessions that trigger these hooks, and wasteful for sessions that don't.
Impact
Suggested approaches
VERCEL_PLUGIN_SESSION_INJECT=off) — simplest, user controls itvercel.json,next.config.*, or.vercel/in the working directoryOption 3 would be the best UX — zero config, zero waste, same coverage.
Environment