Extracts files from repomix-packed repositories, restoring original directory structures from XML/Markdown/JSON formats. Activates when users need to unmix repomix files, extract packed repositories, restore file structures from repomix output, or reverse the repomix packing process.
Install with Tessl CLI
npx tessl i github:fernandezbaptiste/claude-code-skills --skill repomix-unmixer94
Does it follow best practices?
Validation for skill structure
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-filesRepomix 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.extfile 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-repoRestore 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-projectIssue: 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.
4f0eae8
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.