Skip to main content

Module plugin_dedup

Module plugin_dedup 

Source
Expand description

Detect when a Claude Code / Codex plugin already provides our skills, so devboy onboard can skip re-installing into the same agent dir.

ADR-018 §5: when the user runs /plugin install devboy@meteora-devboy, Claude Code records the plugin in ~/.claude/settings.json#enabledPlugins. At that point the plugin’s skills/ directory is already on the agent’s search path; another copy of ~/.claude/skills/devboy-* would just shadow the namespaced versions. We detect the marker and skip the Claude (or Codex) install target entirely.

Detection is exact — we match the plugin id against three concrete enabledPlugins shapes that Claude Code and Codex CLI have produced across their releases. A loose substring scan would be unsafe: a false positive here causes devboy onboard to skip skill installation, which would leave the user without skills (the plugin we thought was loaded turns out not to be ours).

Structs§

PluginId
A plugin’s identity inside a marketplace.

Constants§

DEVBOY_PLUGIN
The DevBoy plugin identity. Used by the onboard dedup logic.

Functions§

is_claude_plugin_enabled
true if ~/.claude/settings.json enables the given plugin.
is_codex_plugin_enabled
true if ~/.codex/settings.json enables the given plugin.