Repomix packer

From event4u-app/agent-config · View interactive version

Repomix packer is an AI agent skill from the GitHub repository event4u-app/agent-config. Use when packaging a codebase to a single AI-friendly file for LLM analysis — local or remote, XML/Markdown/JSON, token counting, gitignore filtering, peer-side `repomix` CLI.

How to use this skill

Skill file

Pinned upstream: repomix CLI (npm: repomix, brew: repomix). Re-verify per minor bump. Repomix is an optional dependency — this skill never installs it silently.

repomix-packer

Wraps the upstream CODE0 CLI for codebase-snapshot workflows: pack a local or remote repo into a single XML / Markdown / JSON file with token counts and secret detection, then feed it to an LLM for review, audit, or migration scoping.

When to use

Do NOT use when:

Procedure: Snapshot a repo for LLM review

1. Inspect: verify `repomix` is installed (peer-side)

repomix --version

If the binary is missing, surface one of the install recipes and STOP — do not install silently:

# npm (preferred for project-local installs)
npm install -g repomix

# Homebrew (macOS / Linux)
brew install repomix

2. Decide local vs remote

# Local: pack the current directory.
repomix

# Remote shorthand: owner/repo
npx repomix --remote owner/repo

# Remote URL with a pinned commit
npx repomix --remote https://github.com/owner/repo/commit/<sha>

3. Filter the snapshot to the smallest useful slice

# Include patterns
repomix --include "src/**/*.php,*.md"

# Add ignore patterns on top of .gitignore
repomix -i "tests/**,*.test.js"

# Strip comments to save tokens
repomix --remove-comments

4. Pick the output format and destination

repomix --style markdown -o snapshot.md   # human-readable
repomix --style xml -o snapshot.xml       # default; clearest separators for LLMs
repomix --style json -o snapshot.json     # programmatic post-processing
repomix --copy                            # also copy to clipboard

5. Verify token budget and secrets

Repomix prints per-file and total token counts and runs Secretlint on the output. Check the totals against the target LLM context window:

| Model | Approx context |

|--------------------|----------------|

| Claude Sonnet 4.5 | ~200K tokens |

| GPT-4 family | ~128K tokens |

| GPT-3.5 | ~16K tokens |

If Secretlint flags anything, STOP — sanitize the input or add the offending paths to .repomixignore before re-packing. Never use --no-security-check on an unfamiliar codebase.

6. Hand the snapshot to the consumer skill

Most workflows that call this skill pass the snapshot to:

Cite the snapshot path so the consumer skill can read it.

Output format

  1. The repomix invocation (one shell line, with all filters and the output path).
  2. The output file path + format + total token count.
  3. Any Secretlint findings, verbatim. Empty section if none.

Gotcha

Do NOT

Auto-trigger keywords

Provenance

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.