Skip to content

fix: correct script path references in skills and agents#11

Merged
Lisztos merged 1 commit intomainfrom
fix/script-path-references
Mar 25, 2026
Merged

fix: correct script path references in skills and agents#11
Lisztos merged 1 commit intomainfrom
fix/script-path-references

Conversation

@Lisztos
Copy link
Copy Markdown
Owner

@Lisztos Lisztos commented Mar 24, 2026

Ported from parcadei/Continuous-Claude-v3#138 by @tkavelli


Summary

  • Added CLAUDE_CC_DIR environment variable export in wizard (CC repository root)
  • Updated 7 skills and 8 agents to use $CLAUDE_CC_DIR or $CLAUDE_OPC_DIR instead of $CLAUDE_PROJECT_DIR for CC-internal script references

Problem

$CLAUDE_PROJECT_DIR is set by Claude Code to the user's current working project. Multiple skills and agents use it to locate CC's own scripts, which only works if the user happens to be working inside the CC repo itself.

Path mapping

Old path New path
$CLAUDE_PROJECT_DIR/.claude/scripts/*.sh $CLAUDE_CC_DIR/.claude/scripts/*.sh
$CLAUDE_PROJECT_DIR/.claude/scripts/cc_math/ $CLAUDE_OPC_DIR/scripts/cc_math/
$CLAUDE_PROJECT_DIR/.claude/skills/*/SKILL.md $CLAUDE_CC_DIR/.claude/skills/*/SKILL.md

Test plan

  • Run wizard — verify both CLAUDE_CC_DIR and CLAUDE_OPC_DIR are exported
  • From a non-CC project, run /commit — verify generate-reasoning.sh is found

WHAT CHANGED:

1. opc/scripts/setup/wizard.py:
   - Added CLAUDE_CC_DIR env var export (CC repository root)
   - CLAUDE_CC_DIR = parent of CLAUDE_OPC_DIR
   - WHY: Skills reference scripts at $CC_DIR/.claude/scripts/
     but only CLAUDE_OPC_DIR was exported

2. Skills (7 files):
   - commit, git-commits: $CLAUDE_PROJECT_DIR → $CLAUDE_CC_DIR
     for generate-reasoning.sh
   - describe_pr: $CLAUDE_PROJECT_DIR → $CLAUDE_CC_DIR
     for aggregate-reasoning.sh
   - recall-reasoning: $CLAUDE_PROJECT_DIR → $CLAUDE_CC_DIR
     for search-reasoning.sh
   - tldr-stats: $CLAUDE_PROJECT_DIR → $CLAUDE_CC_DIR
     for tldr_stats.py
   - math-unified: $CLAUDE_PROJECT_DIR/.claude/scripts/cc_math/
     → $CLAUDE_OPC_DIR/scripts/cc_math/
   - skill-developer: mixed $CLAUDE_PROJECT_DIR → $CLAUDE_OPC_DIR
     (scripts) and $CLAUDE_CC_DIR (.claude/ resources)

3. Agents (8 files):
   - braintrust-analyst, session-analyst: $CLAUDE_PROJECT_DIR
     → $CLAUDE_OPC_DIR for runtime.harness and braintrust scripts
   - memory-extractor: $CLAUDE_PROJECT_DIR/opc → $CLAUDE_OPC_DIR
     for core extraction scripts
   - agentica-agent, plan-agent, validate-agent, scribe,
     debug-agent: $CLAUDE_PROJECT_DIR → $CLAUDE_CC_DIR for
     skill file reads (cat SKILL.md)

CONTEXT:
$CLAUDE_PROJECT_DIR is set by Claude Code to the user's current
working project (e.g. /Users/x/myapp). Skills and agents were
using it to locate CC's own scripts, which only works if the user
happens to be working inside the CC repo itself. This breaks for
any user who installed CC in a different directory.

Fixes parcadei#106
@Lisztos Lisztos force-pushed the fix/script-path-references branch from 542129a to 592d193 Compare March 25, 2026 02:20
@Lisztos Lisztos merged commit ecbd54e into main Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants