Guide · Agent skill
How to use the Repomix Codebase Packer agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The Repomix agent skill is a set of instructions that teaches an AI agent to bundle a whole code project, either a local folder or a GitHub repository, into a single structured file, then search that file for structure, functions, routes, or models. This guide explains what the skill does, how to install it, how to ask for it in plain language, and what to watch for on privacy. By the end you will be able to get a codebase overview from an agent without opening every file yourself.
Quick start
- 1Download the ZIP. Download the repomix skill ZIP from this page.
- 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder.
- 3Or upload in the Claude apps. In the Claude apps, go to Settings, then Capabilities, then Skills, and upload the skill.
- 4Check Node.js. Make sure Node.js with npx is available, since Repomix runs through npx.
- 5Ask in plain language. Request an analysis such as 'Analyze this repo' or name a repository in owner/repo form.
- 6Review the metrics and findings. Check the file count, tokens and output location the agent reports, then ask for deeper searches.
What the repomix skill makes the agent do
Repomix is a command-line tool that packs a code project into one file. The skill tells the agent how to run it, how to read the result, and how to report back. The agent packs the repository, reads the command output for file count, character count and estimated tokens, searches the packed file with grep-style patterns, and summarises what it finds.
Repomix respects .gitignore and runs built-in security checks, according to the skill source. The skill also says the output format defaults to XML, with markdown, plain and json available.
- Packs a local directory or a remote GitHub repository (owner/repo)
- Reports files processed, total characters, estimated tokens and the output file location
- Searches the packed file for exports, auth code, API routes and database models
Install the repomix skill
Download the skill ZIP from this page. Then choose one of the following methods.
For Claude Code, unzip it into your personal skills folder ~/.claude/skills/, or into a project's .claude/skills/ folder if you want it only for that project.
In the Claude apps, open Settings, go to Capabilities, and upload the skill under Skills.
- Personal install: ~/.claude/skills/
- Project install: .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills, then upload
Requirements before you start
The skill lists Node.js with npx available as its requirement. Repomix itself is an npm package that is installed on demand through npx repomix@latest, so you do not install it separately in advance. Remote GitHub repositories also need internet access.
- Node.js with npx available
- Internet access for remote GitHub repositories
- Repomix npm package, fetched on demand
npx repomix@latest --remote <owner/repo> --output /tmp/<repo-name>-analysis.xmlTrigger the skill with natural requests
You do not need special syntax. Ask in plain language and the agent will pick the skill when the request matches its description. The skill is written to respond to requests to explore repositories, analyse code structure, find patterns, check token counts, or prepare codebase context for AI analysis.
Name a repository in owner/repo form for remote analysis, or point at a folder for local analysis.
- "Analyze this repo" or "Explore this codebase"
- "What's the structure of facebook/react?"
- "Find all authentication-related code"
- "How many tokens is this project?"
- "Pack this repo for AI analysis"
- "Show me the main components of vercel/next.js"
Pack a repository and read the results
For a remote repository, the skill runs Repomix against the owner/repo and writes the output to a temporary directory so your working folder stays clean. For a local folder, it packs the directory you name. Large repositories can use compression, which the skill says reduces token usage by about 70%. You can also limit the files with an include pattern, for example only TypeScript and Markdown files.
The agent then searches the output file for patterns such as exports, routes or models, and reports metrics, structure, key findings and suggested next steps.
- --remote <owner/repo> for GitHub repositories
- --compress to use tree-sitter compression on large repos
- --include to focus on specific file types or folders
- --remote-branch to choose a branch, tag or commit
- --style to pick xml (default), markdown, plain or json
npx repomix@latest --remote yamadashy/repomix --output /tmp/repomix-analysis.xml
npx repomix@latest --include "**/*.{ts,tsx,js,jsx}" --output /tmp/filtered-analysis.xmlSafety notes: scripts and network
This skill runs scripts and uses the network. Remote mode fetches from GitHub, and packing creates a copy of your code that the agent then reads. If the code is private or sensitive and should not leave your machine, use a local-only workflow and avoid the remote option.
Repomix automatically excludes files such as API keys, credentials and .env files through built-in checks, and the skill tells the agent to trust those defaults. The skill does not guarantee that every secret is removed, so do not rely on it as your only protection for credentials.
- Remote mode sends requests to GitHub
- Packing copies your code into an output file the agent reads
- Built-in checks may miss some credentials; review sensitive projects yourself
Tips for better results
Start with a narrow question, such as where authentication lives, rather than asking for a full review of a huge repository. The skill recommends searching the output before reading it in full, and narrowing scope with --include when output is too large.
If a remote fetch fails, check the repository name and your connection, and consider cloning the repository locally instead, as the skill suggests.
- Use --compress for repositories over about 100k lines
- Use --include to narrow scope when output is too large
- Ask for a specific pattern, such as routes or models, rather than everything
What people use it for
- Getting a structural overview of an unfamiliar open-source project before contributing
- Finding every authentication-related file in a local codebase
- Checking how many tokens a repository would use before sending it to an AI tool
- Locating API routes or database models in a large project
Frequently asked questions
How do I install the repomix agent skill?
Download the skill ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. In the Claude apps, you can instead upload it under Settings, then Capabilities, then Skills.
What do I need to run the repomix skill?
You need Node.js with npx available. Repomix is installed on demand through npx repomix@latest. Remote GitHub repositories also require internet access.
Is the repomix skill free?
The skill is listed under the MIT licence. The source does not state any pricing, so check the licence and the project page for details.
Is it safe to use with private code?
Be careful. Remote mode fetches from GitHub, and packing creates a copy of your code that the agent reads. For private or sensitive code, use a local-only workflow. Built-in checks exclude files like .env but may miss some credentials.
What is the difference between the XML, markdown, plain and json output?
XML is the default and recommended format, with clear file boundaries for structured analysis. Markdown suits human-readable documentation, plain is simple and grep-friendly, and json is for programmatic analysis.
What should I do if the output is too large or the remote fetch fails?
For output that is too large, use --compress or narrow the scope with --include. For a failed remote fetch, check the repository name and your connection, or clone the repository locally and analyse that copy.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you want an agent to get a quick, searchable overview of an unfamiliar codebase or estimate token counts without reading every file. Pick something else if the code is sensitive and must stay on your machine, or if you need guaranteed removal of secrets, since the skill relies on Repomix's built-in checks.
Download the skill