repo-clipboard

santiago-afonso's avatarfrom santiago-afonso

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.

⭐1stars🔀0forks📁View on GitHub🕐Updated Dec 19, 2025

When & Why to Use This Skill

repo-clipboard is a specialized Claude skill designed to optimize how developers share codebases with Large Language Models (LLMs). It snapshots directories into a structured pseudo-XML format, making it easier for agents to parse and understand repository structures. By supporting .gitignore rules, extension filtering, and token-efficient line-range snippets, it ensures that LLMs receive high-quality, relevant context for complex programming tasks without wasting tokens.

Use Cases

  • Code Review & Debugging: Quickly provide an LLM with the full context of a sub-tree or specific files to identify bugs or suggest architectural improvements.
  • Token-Efficient Context Injection: Use line-range snippets and extension filtering to feed only the most relevant code sections into an LLM, staying within context window limits.
  • Automated Development Pipelines: Pipe repository snapshots directly into CLI tools like 'llm' for automated documentation generation, refactoring, or security audits.
  • Agent-Friendly Repo Mapping: Generate structured 'repo snapshots' that help AI agents navigate large projects by providing a clear overview of the file hierarchy and content.
namerepo-clipboard
descriptionSnapshot 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