Skip to main content

Module skill_shadow

Module skill_shadow 

Source
Expand description

Live-skill shadow detector and reporting for OpenCode.

OpenCode discovers skills from more roots than any other built-in harness: project .opencode/skills, .claude/skills, and .agents/skills (walked up from the dispatch cwd to the git worktree), and global $XDG_CONFIG_HOME/opencode/skills (default ~/.config/opencode/skills), $OPENCODE_CONFIG_DIR/skills (additive, not a replacement), the legacy ~/.opencode/skills, ~/.claude/skills, and ~/.agents/skills. The .claude/.agents roots are a cross-harness contamination vector: a skill installed for Claude Code or Codex is visible to OpenCode sessions by default. A logical eval skill present in any of these sources contaminates the control arm even though eval-magic stages its test copy under a generated slug. Detection is deliberately best-effort: missing directories and unreadable/malformed skills are ignored while all other roots continue to be scanned.

Functions§

format_shadow_banner
OpenCode-specific build-time banner. Empty when nothing is shadowed.
shadow_preflight
Detect logical eval skill names that OpenCode can also load from live sources.
shadow_validity_warnings
One OpenCode-specific validity_warnings line per shadowed skill.