Repomix Unmixer
Extract files from a repomix-packed file and restore the original directory tree.
Workflow
python3 scripts/unmix_repomix.py "<repomix_file>" "<output_dir>"
Parses the format, extracts each file path + content, recreates dirs, writes files, reports count.
Supported formats
- XML (default):
<file path="...">content</file>blocks (regex matched). - Markdown:
## File: pathfollowed by fenced code block. - JSON:
{"files":[{"path":...,"content":...}]}.
Principles
- Always specify an output dir — never dump into cwd.
- Extract to
/tmpfirst for review, thentreeit, spot-check content, then move to final dest. - Never extract directly over important dirs — verify before overwriting (use a fresh dir or
output-$(date +%s)). - For skills: validate after unmixing with skill-creator tools.
Troubleshooting
- No files extracted → wrong/unsupported format; inspect file manually.
- Permission error →
mkdir -p+ writable dir, or use$HOME/extracted. - Garbled chars → script is UTF-8; check source encoding.
- Path exists → fresh output dir or clear it first.