repomix-gh

GitHub 仓库打包工具(gh + zip download,默认 lean 模式)

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "repomix-gh" with this command: npx skills add cug-hydro/cug-hydro-skills/cug-hydro-cug-hydro-skills-repomix-gh

GitHub 仓库打包工具,使用 gh + zip download 快速生成 LLM 可学习的单文件文档。

快速开始

# Lean 模式(默认,排除测试和多语言文档)
bash src/repomix-gh.sh affaan-m/everything-claude-code

# Full 模式(包含所有文件)
bash src/repomix-gh.sh affaan-m/everything-claude-code output.md --full

用法

bash src/repomix-gh.sh owner/repo [output.md] [--force] [--full]

参数说明

参数说明
owner/repoGitHub 仓库(如 affaan-m/everything-claude-code
output.md输出文件名(默认:{repo}.md
--force强制重新下载(跳过缓存)
--fullFull 模式,包含所有文件(默认为 lean 模式)

示例

# 基本用法(默认 lean 模式)
bash src/repomix-gh.sh jl-pkgs/StrategicRandomSearch.jl

# 指定输出文件
bash src/repomix-gh.sh Deltares/Wflow.jl Wflow.md

# Full 模式(包含所有文件)
bash src/repomix-gh.sh affaan-m/everything-claude-code ecc.md --full

# 强制更新缓存
bash src/repomix-gh.sh owner/repo output.md --force

输出示例

📦 repomix-gh: affaan-m/everything-claude-code
================================
✓ 使用缓存: ~/.cache/repomix-gh/...zip
🎯 Lean 模式:排除测试和多语言文档(默认)
📝 生成文档: output.md
================================
[repomix 输出...]

📊 文件类型统计 (Top 20):
================================
  .md                      430 个文件
  .js                       34 个文件
  .json                     18 个文件
  ...

================================
✓ 完成!输出文件:
  output.md (1.4M)

📈 总计: 398,690 tokens, 233 个文件

生成的 md 文件头部包含:

<!-- Token 总数: 398,690 -->
<!-- 文件总数: 233 -->
<!-- 生成时间: 2026-02-23 05:41:13 UTC -->
<!-- 仓库: affaan-m/everything-claude-code@main -->
<!-- 模式: --lean -->

模式对比

模式文件大小文件数Tokens说明
完整4.9M6271.5M包含所有内容
Lean2.1M350632K排除测试和多语言文档

工作流程

gh api 获取默认分支 → curl 下载 zip → unzip 解压 → repomix 打包

速度对比(everything-claude-code 示例):

方式时间速度
gh + zip2s26 MB/s
git clone~30s~2 MB/s
npx --remote~60s~1 MB/s

缓存机制

~/.cache/repomix-gh/
├── owner_repo-main.zip     # 缓存 zip
└── owner_repo-main/        # 解压目录
  • 首次运行:下载并缓存
  • 二次运行:直接使用缓存(<1s)
  • --force: 强制重新下载

依赖

经验总结

✅ 为什么优先 gh + zip?

  1. 快速: 直接下载 zip,比 git clone 快 10 倍+
  2. 轻量: 不包含 .git 历史,节省空间
  3. 可靠: 失败自动回退到 gh api
  4. 灵活: gh 自动检测默认分支

⚠️ 常见问题

Q: 解压后路径错误? A: 使用 "$TMP"/*/ 匹配解压后的目录

Q: 下载失败? A: 检查网络,或 gh auth login 获取更高速率限制

Q: 仓库太大? A: 默认 lean 模式已优化,如需完整内容使用 --full

Q: 重新生成不同参数? A: 直接再次运行,使用缓存,无需重新下载

参考资料

详见 Config.md

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

code-simplify

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated