Expand description
Plugin-shadow detector (Claude Code).
The runner stages eval skills into each dispatch’s project-local
.claude/skills/ dir, but every claude -p dispatch ALSO loads the user/global
plugins and the global skills dir from its Claude config. When a staged skill
name collides with one of those, both copies are discoverable and the
with/without comparison is contaminated. The runner cannot strip an installed
plugin from a dispatch, so this module only detects and reports the overlap,
reading declared settings as a best-effort proxy. The report/banner shapes are
harness-neutral and live in skill_shadow.
Functions§
- config_
dir_ from_ env - The Claude Code config dir, reading the
CLAUDE_CONFIG_DIRoverride from the environment (else~/.claude). Thin convenience overresolve_config_dirfor the call sites that should honor the env var — the override logic itself is covered byresolve_config_dir’s tests. - detect_
plugin_ shadows - Which of
staged_skill_namesare also discoverable from enabled plugins or the global skills dir. Matches on the skill folder name (exact). - resolve_
config_ dir - The Claude Code config dir: a non-empty
CLAUDE_CONFIG_DIRoverride (passed in), else~/.claude. - shadow_
preflight - The build-time preflight:
Some(report)only when a staged name is shadowed.config_diris passed in so the env-reading caller (the adapter’sdetect_shadowed_skills) stays a thin wrapper.