Pack an entire repository (or a subdirectory / a curated file set) into a single AI-friendly file, ready to feed into a long-context LLM session. Wraps the `repomix` CLI (https://github.com/yamadashy/repomix) for use inside Claude Code. Use when you want to bring an external project into the current Claude session as cross-project context, when you need a shareable single-file dump of a codebase, when you are preparing a code review or audit and want one file to scroll through, or when you want to feed your own codebase to a different LLM for comparison. Activation hints: "pack repo", "bundle the repo", "feed codebase to LLM", "cross-project context", "repomix".
Ships in repomix. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Learnings (Maintainer): bekannte Probleme/Erkenntnisse zu diesem Skill in
docs/skill-learnings.md→ Sektion „repomix".
Prerequisite: the repomix CLI must be installed once before this skill
can do anything. Run repomix --version; if it errors, see Setup below.
repomix walks a directory tree, applies .gitignore and a configurable
include/exclude policy, and concatenates everything into one annotated
file (XML, Markdown, JSON, or plain text) sized to fit inside an LLM
context window.
This skill is a thin wrapper that documents the CLI for Claude Code use. It does not ship a re-implementation — install the upstream binary once, then invoke as shown below.
The install commands are intentionally not in this skill's
allowed-tools declaration — they are session-external operations that
the user runs at the shell, not commands Claude needs to issue
repeatedly.
# macOS / Linux via Homebrew
brew install repomix
# Or via npm (works on any platform with Node)
npm install -g repomix
Confirm: repomix --version should print a version number.
# Pack the current directory into repomix-output.xml
repomix .
# Same, but write to a named file (Markdown format)
repomix . --output context.md --style markdown
# Include only certain files
repomix . --include "src/**/*.ts,README.md"
# Exclude noisy paths beyond .gitignore
repomix . --ignore "**/*.test.ts,docs/**,node_modules/**"
# Pack a specific subdirectory
repomix ./packages/core
# Pack a remote repo without cloning first (clones to temp + cleans up)
repomix --remote https://github.com/owner/repo
The output file is the artifact Claude reads. After repomix . the file
repomix-output.xml (or whatever --output named) is the single source
of truth for the packed view.
repomix --remote <url>
produces a single file you can cat or open directly.| Format | Flag | Best for |
|---|---|---|
| XML (default) | --style xml | LLM-friendly, explicit tags around each file |
| Markdown | --style markdown | Human-readable, GitHub-renderable |
| Plain | --style plain | Minimal envelope, when you want the raw text |
# Show a file tree annotated with per-file token counts (lets you decide
# what to exclude before packing)
repomix . --token-count-tree
# Same, but only show files at or above a token threshold
repomix . --token-count-tree 1000
# Compress structure (Tree-sitter extracts key elements, drops bodies)
repomix . --compress
# Choose tokenizer model (defaults to o200k_base / GPT-4o)
repomix . --token-count-encoding cl100k_base
--compress typically saves 30-50% of tokens. Recommended for any
codebase you are about to feed into an LLM session. Normal repomix .
output already reports total token counts at the end — the
--token-count-tree flag adds the per-file breakdown.
grep, rg, or the project's
Explore subagent — repomix is for packing, not querying.--compress, a million-line repo will
exceed any LLM's context budget.cat or Read them
directly. repomix is for whole-tree or whole-package context, not
ad-hoc snippets.| Problem | Fix |
|---|---|
command not found: repomix | Re-run installation, restart the shell |
| Output too large for context | Use --compress, --include, or pack a subdir |
| Sensitive files included | Add to .repomixignore (same syntax as .gitignore) |
| Want repomix to also follow custom includes | Set repomix.config.json in the repo root |
For deeper configuration (config files, custom output templates, integration with CI), see the upstream README at https://github.com/yamadashy/repomix.
repomix itself is MIT (Copyright 2024 Kazuki Yamada). This wrapper SKILL.md
is also MIT under the lars-cc-skills marketplace. See LICENSE.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/repomix:repomixfrom repomix
npx claudepluginhub lars-hh/lars-cc-skills --plugin repomix