Skip to main content

Module plugin_shadow

Module plugin_shadow 

Source
Expand description

Plugin-shadow detector (Claude Code).

The runner stages eval skills into the project-local .claude/skills/ dir, but eval subagents are dispatched via the Task tool and run in-process — so they ALSO inherit whatever skills the orchestrator session loaded from installed plugins and the global skills dir. When a staged skill name collides with one of those, both copies are discoverable and the with/without comparison is contaminated. The runner cannot unload a plugin from a running session, so this module only detects and reports the overlap, reading declared settings as a best-effort proxy.

Structs§

PluginShadowReport
The detector’s findings for a run.

Enums§

ShadowSource
A staged skill that is also discoverable from the live environment.

Functions§

config_dir_from_env
The Claude Code config dir, reading the CLAUDE_CONFIG_DIR override from the environment (else ~/.claude). Thin convenience over resolve_config_dir for the call sites that should honor the env var — the override logic itself is covered by resolve_config_dir’s tests.
detect_plugin_shadows
Which of staged_skill_names are also discoverable from enabled plugins or the global skills dir. Matches on the skill folder name (exact).
format_shadow_banner
Build-time banner for the runner. Empty string when nothing is shadowed.
resolve_config_dir
The Claude Code config dir: a non-empty CLAUDE_CONFIG_DIR override (passed in), else ~/.claude.
shadow_validity_warnings
One validity_warnings line per shadowed skill (for benchmark.json).