fix: Replace hardcoded paths with skill-relative paths in repomix-unmixer
Replace all hardcoded absolute paths (~/.claude/skills/repomix-unmixer/scripts/) with skill-relative paths (scripts/) to ensure the skill works correctly regardless of installation method (user skills, project skills, marketplace plugins). Changes: - Replace 13 occurrences of hardcoded script paths - Use skill-relative paths following Anthropic best practices - Maintain compatibility across all installation contexts This fixes the error where the skill failed when installed as a marketplace plugin because it assumed the ~/.claude/skills/ directory structure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ This skill activates when:
|
|||||||
Extract all files from a repomix file and restore the original directory structure using the bundled `unmix_repomix.py` script:
|
Extract all files from a repomix file and restore the original directory structure using the bundled `unmix_repomix.py` script:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 ~/.claude/skills/repomix-unmixer/scripts/unmix_repomix.py \
|
python3 scripts/unmix_repomix.py \
|
||||||
"<path_to_repomix_file>" \
|
"<path_to_repomix_file>" \
|
||||||
"<output_directory>"
|
"<output_directory>"
|
||||||
```
|
```
|
||||||
@@ -36,7 +36,7 @@ python3 ~/.claude/skills/repomix-unmixer/scripts/unmix_repomix.py \
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
python3 ~/.claude/skills/repomix-unmixer/scripts/unmix_repomix.py \
|
python3 scripts/unmix_repomix.py \
|
||||||
"/path/to/repomix-output.xml" \
|
"/path/to/repomix-output.xml" \
|
||||||
"/tmp/extracted-files"
|
"/tmp/extracted-files"
|
||||||
```
|
```
|
||||||
@@ -118,7 +118,7 @@ For JSON-style repomix output:
|
|||||||
Extract skills that were shared as a repomix file:
|
Extract skills that were shared as a repomix file:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 ~/.claude/skills/repomix-unmixer/scripts/unmix_repomix.py \
|
python3 scripts/unmix_repomix.py \
|
||||||
"/path/to/skills.xml" \
|
"/path/to/skills.xml" \
|
||||||
"/tmp/unmixed-skills"
|
"/tmp/unmixed-skills"
|
||||||
```
|
```
|
||||||
@@ -130,7 +130,7 @@ Then review, validate, or install the extracted skills.
|
|||||||
Extract a packed repository to review its structure and contents:
|
Extract a packed repository to review its structure and contents:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 ~/.claude/skills/repomix-unmixer/scripts/unmix_repomix.py \
|
python3 scripts/unmix_repomix.py \
|
||||||
"/path/to/repo-output.xml" \
|
"/path/to/repo-output.xml" \
|
||||||
"/tmp/review-repo"
|
"/tmp/review-repo"
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ tree /tmp/review-repo
|
|||||||
Restore files from a repomix backup to a working directory:
|
Restore files from a repomix backup to a working directory:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 ~/.claude/skills/repomix-unmixer/scripts/unmix_repomix.py \
|
python3 scripts/unmix_repomix.py \
|
||||||
"/path/to/backup.xml" \
|
"/path/to/backup.xml" \
|
||||||
"~/workspace/restored-project"
|
"~/workspace/restored-project"
|
||||||
```
|
```
|
||||||
@@ -167,11 +167,11 @@ Always provide an output directory to avoid cluttering the current working direc
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Good: Explicit output directory
|
# Good: Explicit output directory
|
||||||
python3 ~/.claude/skills/repomix-unmixer/scripts/unmix_repomix.py \
|
python3 scripts/unmix_repomix.py \
|
||||||
"input.xml" "/tmp/output"
|
"input.xml" "/tmp/output"
|
||||||
|
|
||||||
# Avoid: Default output (may clutter current directory)
|
# Avoid: Default output (may clutter current directory)
|
||||||
python3 ~/.claude/skills/repomix-unmixer/scripts/unmix_repomix.py "input.xml"
|
python3 scripts/unmix_repomix.py "input.xml"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Use Temporary Directories for Review
|
### Use Temporary Directories for Review
|
||||||
@@ -180,7 +180,7 @@ Extract to temporary directories first for review:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Extract to /tmp for review
|
# Extract to /tmp for review
|
||||||
python3 ~/.claude/skills/repomix-unmixer/scripts/unmix_repomix.py \
|
python3 scripts/unmix_repomix.py \
|
||||||
"skills.xml" "/tmp/review-skills"
|
"skills.xml" "/tmp/review-skills"
|
||||||
|
|
||||||
# Review the contents
|
# Review the contents
|
||||||
@@ -196,11 +196,11 @@ Never extract directly to important directories without review:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Bad: Might overwrite existing files
|
# Bad: Might overwrite existing files
|
||||||
python3 ~/.claude/skills/repomix-unmixer/scripts/unmix_repomix.py \
|
python3 scripts/unmix_repomix.py \
|
||||||
"repo.xml" "~/workspace/my-project"
|
"repo.xml" "~/workspace/my-project"
|
||||||
|
|
||||||
# Good: Extract to temp, review, then move
|
# Good: Extract to temp, review, then move
|
||||||
python3 ~/.claude/skills/repomix-unmixer/scripts/unmix_repomix.py \
|
python3 scripts/unmix_repomix.py \
|
||||||
"repo.xml" "/tmp/extracted"
|
"repo.xml" "/tmp/extracted"
|
||||||
# Review, then:
|
# Review, then:
|
||||||
mv /tmp/extracted ~/workspace/my-project
|
mv /tmp/extracted ~/workspace/my-project
|
||||||
@@ -234,7 +234,7 @@ mkdir -p /tmp/output
|
|||||||
chmod 755 /tmp/output
|
chmod 755 /tmp/output
|
||||||
|
|
||||||
# Or use a directory you own
|
# Or use a directory you own
|
||||||
python3 ~/.claude/skills/repomix-unmixer/scripts/unmix_repomix.py \
|
python3 scripts/unmix_repomix.py \
|
||||||
"input.xml" "$HOME/extracted"
|
"input.xml" "$HOME/extracted"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -255,12 +255,12 @@ The script uses UTF-8 encoding by default. If issues persist:
|
|||||||
**Solution:**
|
**Solution:**
|
||||||
```bash
|
```bash
|
||||||
# Option 1: Use a fresh output directory
|
# Option 1: Use a fresh output directory
|
||||||
python3 ~/.claude/skills/repomix-unmixer/scripts/unmix_repomix.py \
|
python3 scripts/unmix_repomix.py \
|
||||||
"input.xml" "/tmp/output-$(date +%s)"
|
"input.xml" "/tmp/output-$(date +%s)"
|
||||||
|
|
||||||
# Option 2: Clear the directory first
|
# Option 2: Clear the directory first
|
||||||
rm -rf /tmp/output && mkdir /tmp/output
|
rm -rf /tmp/output && mkdir /tmp/output
|
||||||
python3 ~/.claude/skills/repomix-unmixer/scripts/unmix_repomix.py \
|
python3 scripts/unmix_repomix.py \
|
||||||
"input.xml" "/tmp/output"
|
"input.xml" "/tmp/output"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user