repomix — Claude Code skill: pack a repo into one file
This skill packs a whole repository into a single file you can hand to an LLM. Useful when an agent needs project context or you want to read someone else's library.
npx skills add mrgoonie/claudekit-skills --skill repomix -a claude-codeWhat repomix does
The skill teaches the agent to drive Repomix, a tool that folds repository files into one document with clear separators. You pick the format: XML, Markdown, JSON or plain text. Token counts come per file and for the whole repo, so you can tell up front whether the context fits the model's limit.
The instructions cover the full path: check the install with repomix --version, add the package via npm install -g repomix or brew install repomix, narrow the scope with --include and -i, strip comments with --remove-comments. Remote repositories get their own section — npx repomix --remote owner/repo works without cloning. The agent follows five steps: assess the request, set filters, run the pack, review the output, deliver the file with a token summary.
Before the file leaves your machine, turn on the secret scan. Repomix uses Secretlint to catch API keys, passwords and private keys. You can switch it off with --no-security-check, and then the risk is yours. The skill suggests a .repomixignore for sensitive paths and says to keep .env out of the pack. For a third-party repo, read the output yourself before it goes anywhere near a model.
What it helps with
- pack a full repository into one file for LLM context
- inspect a third-party library without cloning it
- prepare a code snapshot for a security audit
- strip comments before sending code to a model
- count tokens to see if the project fits the context limit
Example prompts for the agent
- Pack this repo as markdown, only
src/**/*.ts, comments removed - Snapshot the remote repo
vendor/libraryas XML for an audit - Build context from
src/auth/**andsrc/api/**and show the token count
How to install repomix
1Skills CLI (Vercel)
npx skills add mrgoonie/claudekit-skills --skill repomix -a claude-code2Manually: put the files in place
~/.claude/skills/repomix/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/repomix/
1Skills CLI (Vercel)
npx skills add mrgoonie/claudekit-skills --skill repomix -a codex2Manually: put the files in place
.agents/skills/repomix/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add mrgoonie/claudekit-skills --skill repomix -a cursor2Manually: put the files in place
.cursor/skills/repomix/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install mrgoonie/claudekit-skills repomix2Manually: put the files in place
.github/skills/repomix/SKILL.md1Skills CLI (Vercel)
npx skills add mrgoonie/claudekit-skills --skill repomix -a gemini-cli2Platform CLI
gemini skills install https://github.com/mrgoonie/claudekit-skills --path .claude/skills/repomixManually: put the files in place
.devin/skills/repomix/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add mrgoonie/claudekit-skills --skill repomix -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about repomix
How do I install repomix in Claude?
Run npx skills add mrgoonie/claudekit-skills --skill repomix -a claude-code. The skill lands in ~/.claude/skills/repomix/SKILL.md.
What does repomix do?
It packs repository files into one document as XML, Markdown, JSON or plain text. It counts tokens and scans the output for secrets with Secretlint.
Do I need to install Repomix separately?
Yes. The skill only describes how to use the tool. Install Repomix with npm install -g repomix or brew install repomix, then confirm with repomix --version.