If you've received a repository packed into a single XML, Markdown, or JSON file via repomix, this extracts everything back into its original directory structure. You run a Python script, point it at the packed file and an output directory, and it reconstructs all the individual files with their proper paths. Most useful when someone shares a Claude skill or codebase as a repomix file and you need to actually work with it. The skill defaults to using temporary directories for extraction, which is smart since you'll want to review what you're unpacking before moving it anywhere permanent. It's basically the reverse operation of repomix, straightforward and does one thing well.
npx -y skills add daymade/claude-code-skills --skill repomix-unmixer --agent claude-codeInstalls into .claude/skills of the current project.
This skill extracts files from repomix-packed repositories and restores their original directory structure. Repomix packs entire repositories into single AI-friendly files (XML, Markdown, or JSON), and this skill reverses that process to restore individual files.
This skill activates when:
Extract all files from a repomix file and restore the original directory structure using the bundled unmix_repomix.py script:
python3 scripts/unmix_repomix.py \
"<path_to_repomix_file>" \
"<output_directory>"
Parameters:
<path_to_repomix_file>: Path to the repomix output file (XML, Markdown, or JSON)<output_directory>: Directory where files will be extracted (will be created if doesn't exist)Example:
python3 scripts/unmix_repomix.py \
"/path/to/repomix-output.xml" \
"/tmp/extracted-files"
The script will:
Example output:
Unmixing /path/to/skill.xml...
Output directory: /tmp/extracted-files
✓ Extracted: github-ops/SKILL.md
✓ Extracted: github-ops/references/api_reference.md
✓ Extracted: markdown-tools/SKILL.md
...
✅ Successfully extracted 20 files!
Extracted files are in: /tmp/extracted-files
Repomix XML format structure:
<file path="relative/path/to/file.ext">
file content here
</file>
The script uses regex to match <file path="...">content</file> blocks.
For markdown-style repomix output with file markers:
## File: relative/path/to/file.ext
file content
Refer to references/repomix-format.md for detailed format specifications.
For JSON-style repomix output:
{
"files": [
{
"path": "relative/path/to/file.ext",
"content": "file content here"
}
]
}
Extract skills that were shared as a repomix file:
python3 scripts/unmix_repomix.py \
"/path/to/skills.xml" \
"/tmp/unmixed-skills"
Then review, validate, or install the extracted skills.
Extract a packed repository to review its structure and contents:
python3 scripts/unmix_repomix.py \
"/path/to/repo-output.xml" \
"/tmp/review-repo"
# Review the structure
tree /tmp/review-repo
Restore files from a repomix backup to a working directory:
python3 scripts/unmix_repomix.py \
"/path/to/backup.xml" \
"~/workspace/restored-project"
After unmixing, validate the extracted files are correct:
tree or ls -R to inspect directory layoutRefer to references/validation-workflow.md for detailed validation procedures, especially for unmixing Claude skills.
Always provide an output directory to avoid cluttering the current working directory:
# Good: Explicit output directory
python3 scripts/unmix_repomix.py \
"input.xml" "/tmp/output"
# Avoid: Default output (may clutter current directory)
python3 scripts/unmix_repomix.py "input.xml"
Extract to temporary directories first for review:
# Extract to /tmp for review
python3 scripts/unmix_repomix.py \
"skills.xml" "/tmp/review-skills"
# Review the contents
tree /tmp/review-skills
# If satisfied, copy to final destination
cp -r /tmp/review-skills ~/.claude/skills/
Never extract directly to important directories without review:
# Bad: Might overwrite existing files
python3 scripts/unmix_repomix.py \
"repo.xml" "~/workspace/my-project"
# Good: Extract to temp, review, then move
python3 scripts/unmix_repomix.py \
"repo.xml" "/tmp/extracted"
# Review, then:
mv /tmp/extracted ~/workspace/my-project
Issue: Script completes but no files are extracted.
Possible causes:
Solution:
references/repomix-format.md for format detailsIssue: Cannot write to output directory.
Solution:
# Ensure output directory is writable
mkdir -p /tmp/output
chmod 755 /tmp/output
# Or use a directory you own
python3 scripts/unmix_repomix.py \
"input.xml" "$HOME/extracted"
Issue: Special characters appear garbled in extracted files.
Solution: The script uses UTF-8 encoding by default. If issues persist:
Issue: Files exist at extraction path.
Solution:
# Option 1: Use a fresh output directory
python3 scripts/unmix_repomix.py \
"input.xml" "/tmp/output-$(date +%s)"
# Option 2: Clear the directory first
rm -rf /tmp/output && mkdir /tmp/output
python3 scripts/unmix_repomix.py \
"input.xml" "/tmp/output"
/tmp or similar for initial reviewtree to inspect directory layout before useMain unmixing script that:
The script is self-contained and requires only Python 3 standard library.
Comprehensive documentation of repomix file formats including:
Load this reference when dealing with format-specific issues or supporting new repomix versions.
Detailed validation procedures for extracted content including:
Load this reference when users need to validate unmixed skills or verify extraction quality.
juliusbrussee/caveman
mattpocock/skills
shadcn/improve
obra/superpowers
forrestchang/andrej-karpathy-skills
vercel-labs/skills