diff --git a/plugins/compound-engineering/skills/ce-run/SKILL.md b/plugins/compound-engineering/skills/ce-run/SKILL.md index e12d2802e..066b92d47 100644 --- a/plugins/compound-engineering/skills/ce-run/SKILL.md +++ b/plugins/compound-engineering/skills/ce-run/SKILL.md @@ -21,7 +21,14 @@ If no orchestrator name is provided, list available orchestrators and ask which Find the plugin's install location: ```bash -PLUGIN_DIR=$(find "$HOME/.claude" "$HOME/.claude-"* -path "*/compound-engineering/*/orchestrators" -type d 2>/dev/null | head -1 | sed 's|/orchestrators$||') +# Prefer the active Claude profile ($CLAUDE_CONFIG_DIR) over a global search +if [ -n "$CLAUDE_CONFIG_DIR" ]; then + PLUGIN_DIR=$(find "$CLAUDE_CONFIG_DIR" -path "*/compound-engineering/*/orchestrators" -type d 2>/dev/null | head -1 | sed 's|/orchestrators$||') +fi +# Fall back to searching all Claude profiles if not found via CLAUDE_CONFIG_DIR +if [ -z "$PLUGIN_DIR" ]; then + PLUGIN_DIR=$(find "$HOME/.claude" "$HOME/.claude-"* -path "*/compound-engineering/*/orchestrators" -type d 2>/dev/null | head -1 | sed 's|/orchestrators$||') +fi ``` Fall back to relative path if not found: diff --git a/plugins/compound-engineering/skills/ce-user-scenarios/SKILL.md b/plugins/compound-engineering/skills/ce-user-scenarios/SKILL.md index f8899e236..cce600c0b 100644 --- a/plugins/compound-engineering/skills/ce-user-scenarios/SKILL.md +++ b/plugins/compound-engineering/skills/ce-user-scenarios/SKILL.md @@ -28,7 +28,14 @@ If no stage is specified, use these heuristics: Find the plugin's install location: ```bash -PLUGIN_DIR=$(find "$HOME/.claude" "$HOME/.claude-"* -path "*/compound-engineering/*/agents/user" -type d 2>/dev/null | head -1 | sed 's|/agents/user$||') +# Prefer the active Claude profile ($CLAUDE_CONFIG_DIR) over a global search +if [ -n "$CLAUDE_CONFIG_DIR" ]; then + PLUGIN_DIR=$(find "$CLAUDE_CONFIG_DIR" -path "*/compound-engineering/*/agents/user" -type d 2>/dev/null | head -1 | sed 's|/agents/user$||') +fi +# Fall back to searching all Claude profiles if not found via CLAUDE_CONFIG_DIR +if [ -z "$PLUGIN_DIR" ]; then + PLUGIN_DIR=$(find "$HOME/.claude" "$HOME/.claude-"* -path "*/compound-engineering/*/agents/user" -type d 2>/dev/null | head -1 | sed 's|/agents/user$||') +fi ``` Fall back to relative path if not found: diff --git a/plugins/compound-engineering/skills/refresh/SKILL.md b/plugins/compound-engineering/skills/refresh/SKILL.md index 1aab87837..1da13a825 100644 --- a/plugins/compound-engineering/skills/refresh/SKILL.md +++ b/plugins/compound-engineering/skills/refresh/SKILL.md @@ -12,7 +12,14 @@ Syncs reviewer persona files, orchestrator definitions, and user persona files f Find the plugin's install location in the Claude plugin cache: ```bash -PLUGIN_DIR=$(find "$HOME/.claude" "$HOME/.claude-"* -path "*/compound-engineering/*/agents/review" -type d 2>/dev/null | head -1 | sed 's|/agents/review$||') +# Prefer the active Claude profile ($CLAUDE_CONFIG_DIR) over a global search +if [ -n "$CLAUDE_CONFIG_DIR" ]; then + PLUGIN_DIR=$(find "$CLAUDE_CONFIG_DIR" -path "*/compound-engineering/*/agents/review" -type d 2>/dev/null | head -1 | sed 's|/agents/review$||') +fi +# Fall back to searching all Claude profiles if not found via CLAUDE_CONFIG_DIR +if [ -z "$PLUGIN_DIR" ]; then + PLUGIN_DIR=$(find "$HOME/.claude" "$HOME/.claude-"* -path "*/compound-engineering/*/agents/review" -type d 2>/dev/null | head -1 | sed 's|/agents/review$||') +fi ``` Fall back to relative path if not found (e.g., running from source repo):