repo-clipboard

将当前目录快照为伪XML用于LLM上下文。当您需要与Codex/LLMs共享仓库(或子树)时使用,特别是用于代码审查/调试、生成代理友好的"仓库快照",或将上下文传递到`llm`等工具(参见技能$llm-cli)。支持.gitignore感知的文件发现、常见忽略模式、扩展过滤、正则表达式包含/排除、可选文件列表打印、行范围片段,并写入/tmp/repo_clipboard.{stdout,stderr}以便重用。

📖 中文导读:将当前目录快照为伪XML用于LLM上下文。当您需要与Codex/LLMs共享仓库(或子树)时使用,特别是用于代码审查/调试、生成代理友好的"仓库快照",或将上下文传递到`llm`等工具(参见技能$llm-cli)。支持.gitignore感知的文件发现、常见忽略模式、扩展过滤、正则表达式包含/排除、可选文件列表打印、行范围片段,并写入/tmp/repo_clipboard.{stdout,stderr}以便重用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: repo-clipboard description: Snapshot the current directory into pseudo-XML for LLM context. Use when you need to share a repo (or a sub-tree) with Codex/LLMs, especially for code review/debugging, generating an agent-friendly “repo snapshot”, or piping context into tools like llm (see skill $llm-cli). Supports .gitignore-aware file discovery, common ignore patterns, extension filtering, regex include/exclude, optional file-list printing, line-range snippets, and writes /tmp/repo_clipboard.{stdout,stderr} for reuse.

repo-clipboard

Quick start

  • Snapshot the current directory to stdout (for piping), while writing /tmp/repo_clipboard.stdout and metadata to stderr:
    • scripts/repo_clipboard --llm -e py,md,yml --print-files
  • Copy the snapshot to the Windows clipboard (WSL) and also write /tmp/repo_clipboard.stdout:
    • scripts/repo_clipboard -e py,md,yml

Snippets (token-efficient context)

  • Include only specific line ranges:
    • scripts/repo_clipboard --llm -e md --snippet README.md:5-25 --snippets-only

Reference

  • For full CLI usage, examples, and flag semantics, read repo-clipboard/references/usage.md.

LLM review loop (with llm; see skill $llm-cli)

  • Default intelligence picks:
    • wbg:claude-opus-4.5
    • wbg:gpt-5.2-xhigh (very slow; reserve for the hardest reviews)
  • Large-context pick (when the repo snapshot is huge):
    • wbg-gemini-3-pro-preview