Fix sandbox errors: use relative paths for cross-project file access
Skills used absolute paths (~/dev/claude/projects/claude-foundations/...) which get blocked by Claude Code's sandbox when running from other projects. Changed to relative paths (../claude-foundations/) with local-first fallback and inline defaults so skills work regardless of sandbox restrictions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,19 +15,19 @@ You are extracting generalisable best practices from project-specific memory fil
|
|||||||
## Pre-gathered context
|
## Pre-gathered context
|
||||||
|
|
||||||
### Distill state
|
### Distill state
|
||||||
!`cat ~/dev/claude/projects/claude-foundations/best-practices/.distill-state.json 2>/dev/null || echo "{}"`
|
!`cat ../claude-foundations/best-practices/.distill-state.json 2>/dev/null || echo "{}"`
|
||||||
|
|
||||||
### Settings
|
### Settings
|
||||||
!`cat ~/dev/claude/projects/claude-foundations/settings.yaml 2>/dev/null || echo "No settings file found"`
|
!`cat settings.yaml 2>/dev/null || cat ../claude-foundations/settings.yaml 2>/dev/null || echo "No settings file found"`
|
||||||
|
|
||||||
### Current best-practices index
|
### Current best-practices index
|
||||||
!`cat ~/dev/claude/projects/claude-foundations/BESTPRACTICES.md 2>/dev/null || echo "No index found"`
|
!`cat ../claude-foundations/BESTPRACTICES.md 2>/dev/null || echo "No index found"`
|
||||||
|
|
||||||
### Available best-practices files
|
### Available best-practices files
|
||||||
!`ls -1 ~/dev/claude/projects/claude-foundations/best-practices/ 2>/dev/null || echo "No best-practices directory"`
|
!`ls -1 ../claude-foundations/best-practices/ 2>/dev/null || echo "No best-practices directory"`
|
||||||
|
|
||||||
### Projects directory listing
|
### Projects directory listing
|
||||||
!`ls -1d ~/dev/claude/projects/*/ 2>/dev/null || echo "No projects directory"`
|
!`ls -1d ../*/ 2>/dev/null || echo "No projects directory"`
|
||||||
|
|
||||||
## Instructions
|
## Instructions
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ You are capturing key points from the current session into a structured log file
|
|||||||
!`ls -1 memory/log/ 2>/dev/null || echo "No log directory yet"`
|
!`ls -1 memory/log/ 2>/dev/null || echo "No log directory yet"`
|
||||||
|
|
||||||
### Settings
|
### Settings
|
||||||
!`cat ~/dev/claude/projects/claude-foundations/settings.yaml 2>/dev/null || echo "No settings file found"`
|
!`cat settings.yaml 2>/dev/null || cat ../claude-foundations/settings.yaml 2>/dev/null || echo "No settings file found — using defaults: retention_days=7, warn_unreflected_days=14"`
|
||||||
|
|
||||||
### Reflection state (to check what has been reflected)
|
### Reflection state (to check what has been reflected)
|
||||||
!`cat .reflection-state.json 2>/dev/null || echo "No reflection state yet"`
|
!`cat .reflection-state.json 2>/dev/null || echo "No reflection state yet"`
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ You are processing session logs into structured, topic-based memory files.
|
|||||||
!`ls -1 memory/ 2>/dev/null || echo "No memory directory"`
|
!`ls -1 memory/ 2>/dev/null || echo "No memory directory"`
|
||||||
|
|
||||||
### Settings
|
### Settings
|
||||||
!`cat ~/dev/claude/projects/claude-foundations/settings.yaml 2>/dev/null || echo "No settings file found"`
|
!`cat settings.yaml 2>/dev/null || cat ../claude-foundations/settings.yaml 2>/dev/null || echo "No settings file found — using defaults: max_logs_per_run=10, retention_days=7, warn_unreflected_days=14"`
|
||||||
|
|
||||||
### Recent git log (for staleness detection)
|
### Recent git log (for staleness detection)
|
||||||
!`git log --oneline -30 2>/dev/null || echo "Not a git repo"`
|
!`git log --oneline -30 2>/dev/null || echo "Not a git repo"`
|
||||||
|
|||||||
Reference in New Issue
Block a user