repomix-unmixer by daymade/claude-code-skills
npx skills add https://github.com/daymade/claude-code-skills --skill repomix-unmixer此技能用于从 repomix 打包的仓库中提取文件并恢复其原始目录结构。Repomix 将整个仓库打包成单个对 AI 友好的文件(XML、Markdown 或 JSON),而此技能则逆转该过程以恢复单个文件。
此技能在以下情况下激活:
使用捆绑的 unmix_repomix.py 脚本从 repomix 文件中提取所有文件并恢复原始目录结构:
python3 scripts/unmix_repomix.py \
"<path_to_repomix_file>" \
"<output_directory>"
参数:
<path_to_repomix_file>:repomix 输出文件的路径(XML、Markdown 或 JSON)<output_directory>:文件将被提取到的目录(如果不存在则会创建)示例:
python3 scripts/unmix_repomix.py \
"/path/to/repomix-output.xml" \
"/tmp/extracted-files"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
脚本将:
示例输出:
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 格式结构:
<file path="relative/path/to/file.ext">
file content here
</file>
脚本使用正则表达式来匹配 <file path="...">content</file> 块。
对于带有文件标记的 markdown 风格 repomix 输出:
## File: relative/path/to/file.ext
文件内容
有关详细格式规范,请参阅 references/repomix-format.md。
对于 JSON 风格的 repomix 输出:
{
"files": [
{
"path": "relative/path/to/file.ext",
"content": "file content here"
}
]
}
提取以 repomix 文件形式共享的技能:
python3 scripts/unmix_repomix.py \
"/path/to/skills.xml" \
"/tmp/unmixed-skills"
然后审查、验证或安装提取的技能。
提取打包的仓库以审查其结构和内容:
python3 scripts/unmix_repomix.py \
"/path/to/repo-output.xml" \
"/tmp/review-repo"
# 审查结构
tree /tmp/review-repo
从 repomix 备份恢复文件到工作目录:
python3 scripts/unmix_repomix.py \
"/path/to/backup.xml" \
"~/workspace/restored-project"
解混后,验证提取的文件是否正确:
tree 或 ls -R 检查目录布局有关详细的验证流程,特别是解混 Claude 技能时,请参阅 references/validation-workflow.md。
始终提供输出目录,以避免弄乱当前工作目录:
# 良好:显式指定输出目录
python3 scripts/unmix_repomix.py \
"input.xml" "/tmp/output"
# 避免:默认输出(可能弄乱当前目录)
python3 scripts/unmix_repomix.py "input.xml"
首先提取到临时目录进行审查:
# 提取到 /tmp 进行审查
python3 scripts/unmix_repomix.py \
"skills.xml" "/tmp/review-skills"
# 审查内容
tree /tmp/review-skills
# 如果满意,复制到最终目的地
cp -r /tmp/review-skills ~/.claude/skills/
切勿在未经审查的情况下直接提取到重要目录:
# 不良:可能覆盖现有文件
python3 scripts/unmix_repomix.py \
"repo.xml" "~/workspace/my-project"
# 良好:提取到临时目录,审查,然后移动
python3 scripts/unmix_repomix.py \
"repo.xml" "/tmp/extracted"
# 审查,然后:
mv /tmp/extracted ~/workspace/my-project
问题:脚本完成但未提取任何文件。
可能原因:
解决方案:
references/repomix-format.md问题:无法写入输出目录。
解决方案:
# 确保输出目录可写
mkdir -p /tmp/output
chmod 755 /tmp/output
# 或使用您拥有的目录
python3 scripts/unmix_repomix.py \
"input.xml" "$HOME/extracted"
问题:提取的文件中特殊字符显示乱码。
解决方案: 脚本默认使用 UTF-8 编码。如果问题持续存在:
问题:提取路径已存在文件。
解决方案:
# 选项 1:使用新的输出目录
python3 scripts/unmix_repomix.py \
"input.xml" "/tmp/output-$(date +%s)"
# 选项 2:先清空目录
rm -rf /tmp/output && mkdir /tmp/output
python3 scripts/unmix_repomix.py \
"input.xml" "/tmp/output"
/tmp 或类似位置进行初步审查tree 检查目录布局主要的解混脚本,功能包括:
该脚本是独立的,仅需要 Python 3 标准库。
repomix 文件格式的全面文档,包括:
处理特定格式问题或支持新的 repomix 版本时,请加载此参考文档。
提取内容的详细验证流程,包括:
当用户需要验证解混的技能或验证提取质量时,请加载此参考文档。
每周安装次数
75
仓库
GitHub 星标数
628
首次出现
2026年1月21日
安全审计
安装于
claude-code61
opencode55
codex52
gemini-cli51
cursor47
github-copilot44
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.
Weekly Installs
75
Repository
GitHub Stars
628
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubFailSocketFailSnykWarn
Installed on
claude-code61
opencode55
codex52
gemini-cli51
cursor47
github-copilot44