Agent skill

Repomix Codebase Packer

by yamadashy in yamadashy/repomix

Packs a local directory or remote GitHub repository into one AI-friendly file with Repomix, then searches it to explore structure, find patterns and count tokens.

MITAuto-check: notesAgent Workflows

Install Repomix Codebase Packer

skills CLI
$ npx skills add yamadashy/repomix --skill repomix -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install yamadashy/repomix repomix --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/yamadashy/repomix.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/clawhub .claude/skills/repomix && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
repomix
GitHub stars
29k
Token cost
~1.3k tokens
SKILL.md length
451 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Packs a local directory or remote GitHub repository into one AI-friendly file with Repomix, then searches it to explore structure, find patterns and count tokens.

  • Works in 4 steps: Pack the Repository → Check Command Output → Analyze the Output → …
  • Exploring an unfamiliar repository before making changes
  • SKILL.md covers When to Use, Quick Reference, Workflow and Best Practices, plus 3 more sections
  • Calls npx

What it does

The agent runs `npx repomix@latest` against either a remote repository with `--remote` or a local directory, and for remote repositories always writes the output to a temporary directory so your working folder stays clean. Repomix respects `.gitignore`, runs security checks and produces structured output. Key options are `--style` (xml by default, or markdown, plain and json), `--compress` for Tree-sitter compression that cuts roughly 70% of tokens on large repos, `--include`, `--ignore`, `--output` and `--remote-branch`.

After packing, the agent reads the command summary, which reports files processed, total characters, total tokens and the output file location. It then analyzes the output: the file tree and metrics near the start give the structure, grep searches find exports and patterns, and large outputs are read in sections with offset and limit. Typical requests are exploring a repo, finding all authentication code, checking how many tokens a project is and preparing context for AI analysis.

When your agent uses it

  • Exploring an unfamiliar repository before making changes
  • Finding all code related to a feature such as authentication
  • Checking how many tokens a project would use as context
  • Packing a codebase into a single file for analysis by an AI tool

Example prompts

  • “Analyze the structure of facebook/react and show me the main packages.”
  • “How many tokens is this project? Use compression if it is large.”
  • “Pack only the TypeScript files and markdown under src for AI analysis.”
  • “Find all authentication-related code in vercel/next.js.”

Requirements

  • Node.js with `npx`
  • Network access when packing remote repositories

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Pack the Repository
  2. Check Command Output
  3. Analyze the Output
  4. Report Findings

What it can do on your machine

Read from SKILL.md and the folder at commit 8d64291. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Repomix Codebase Packer loads about 1.3k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 451 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~74
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:159
    sensitive files (API keys, credentials, `.env` files) through built-in security checks. Trust its security defaults unle

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from yamadashy/repomix at commit 8d64291, republished under its MIT licence (© yamadashy). 451 words, ~1,317 tokens.

Download SKILL.mdSave it as .claude/skills/repomix/SKILL.md (or your agent's skills folder).
name
repomix
description
Pack and analyze codebases into AI-friendly single files using Repomix. Use when the user wants to explore repositories, analyze code structure, find patterns, check token counts, or prepare codebase context for AI analysis. Supports both local directories and remote GitHub repositories.
version
1.0.0
tags
code-analysis, repository, codebase, ai-context, code-explorer, token-count, tree-sitter
author
yamadashy

Repomix — Codebase Packer & Analyzer

Pack entire codebases into a single, AI-friendly file for analysis. Repomix intelligently collects repository files, respects .gitignore, runs security checks, and generates structured output optimized for LLM consumption.

When to Use

  • "Analyze this repo" / "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"

Quick Reference

Pack a Remote Repository
bash
npx repomix@latest --remote <owner/repo> --output /tmp/<repo-name>-analysis.xml

Always output to a temporary directory (/tmp on Unix, %TEMP% on Windows) for remote repositories to avoid polluting the user's working directory.

Pack a Local Directory
bash
npx repomix@latest [directory] --output /tmp/<name>-analysis.xml
Key Options
OptionDescription
--style <format>Output format: xml (default, recommended), markdown, plain, json
--compressTree-sitter compression (~70% token reduction) — use for large repos
--include <patterns>Include only matching patterns (e.g., "src/**/*.ts,**/*.md")
--ignore <patterns>Additional ignore patterns
--output <path>Custom output path (default: repomix-output.xml)
--remote-branch <name>Specific branch, tag, or commit (for remote repos)

Workflow

Step 1: Pack the Repository

Choose the appropriate command based on the target:

bash
# Remote repository (always output to /tmp)
npx repomix@latest --remote yamadashy/repomix --output /tmp/repomix-analysis.xml

# Large remote repo with compression
npx repomix@latest --remote facebook/react --compress --output /tmp/react-analysis.xml

# Local directory
npx repomix@latest ./src --output /tmp/src-analysis.xml

# Specific file types only
npx repomix@latest --include "**/*.{ts,tsx,js,jsx}" --output /tmp/filtered-analysis.xml
Step 2: Check Command Output

The command displays:

  • Files processed: Number of files included
  • Total characters: Size of content
  • Total tokens: Estimated AI tokens
  • Output file location: Where the file was saved

Note the output file location for subsequent analysis.

Step 3: Analyze the Output

Structure overview:

  1. Search for the file tree section (near the beginning of the output)
  2. Check the metrics summary for overall statistics

Search for patterns (use the output file path from Step 2):

bash
# Find exports and main entry points
grep -iE "export.*function|export.*class" <output-file>

# Search with context
grep -iE -A 5 -B 5 "authentication|auth" <output-file>

# Find API endpoints
grep -iE "router|route|endpoint|api" <output-file>

# Find database models
grep -iE "model|schema|database|query" <output-file>

Read specific sections using offset/limit for large outputs.

Show full SKILL.md (195 more words)Show less
Step 4: Report Findings
  • Metrics: Files, tokens, size from command output
  • Structure: Directory layout from file tree analysis
  • Key findings: Based on pattern search results
  • Next steps: Suggestions for deeper exploration

Best Practices

  1. Use --compress for large repos (>100k lines) to reduce token usage by ~70%
  2. Use pattern search first before reading entire output files
  3. Use a temporary directory for output (/tmp on Unix, %TEMP% on Windows) to keep the user's workspace clean
  4. Use --include to focus on specific parts of a codebase
  5. XML is the default and recommended format — it has clear file boundaries for structured analysis

Output Formats

FormatBest For
XML (default)Structured analysis, clear file boundaries
MarkdownHuman-readable documentation
PlainSimple grep-friendly output
JSONProgrammatic/machine analysis

Error Handling

  • Command fails: Check error message, verify repository URL/path, check permissions
  • Output too large: Use --compress, narrow scope with --include
  • Network issues (remote): Verify connection, suggest local clone as alternative
  • Pattern not found: Try alternative patterns, check file tree to verify files exist

Security

Repomix automatically excludes potentially sensitive files (API keys, credentials, .env files) through built-in security checks. Trust its security defaults unless the user explicitly requests otherwise.

© yamadashy, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/clawhub of yamadashy/repomix.

Open the folder on GitHubat commit 8d64291

Compare with similar skills

Repomix Codebase Packer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Repomix Codebase Packer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Repomix Codebase Packer this skillyamadashy/repomix29k—~1.3kAutomated safety check: NotesMIT
ccc Semantic Code Searchcocoindex-io/cocoindex-code2.8k—~938Automated safety check: PassApache-2.0
Ripwire Codebase Orientationredhat-et/ripwire2.4k—~4.5kAutomated safety check: NotesApache-2.0
tilth Code Reading CLIjahala/tilth352—~1.1kAutomated safety check: PassMIT
BTCA Local Repo Searchstickerdaniel/linkedin-mcp-server3.8k—~660Automated safety check: PassApache-2.0
Codebase Handbook BuilderRuhan-Wang/Harness_Handbook333—~2.2kAutomated safety check: PassApache-2.0

Similar skills

  • ccc Semantic Code Search

    cocoindex-io/cocoindex-code

    Semantic code search and index management with the ccc CLI: the agent initializes, indexes and queries the project by concept, filtering by language or path.

    2.8k GitHub stars~938 tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • Maps an unfamiliar repo or subsystem with the ripwire CLI before reading files, climbing an escalation ladder only until you are oriented.

    2.4k GitHub stars~4.5k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Replaces grep, cat, find and ls with the tilth CLI, which returns AST-aware outlines, definitions, usages and callers across many languages in one call.

    352 GitHub stars~1.1k tokensUpdated 12 days ago
    DevelopmentAuto-check passed
  • BTCA Local Repo Search

    stickerdaniel/linkedin-mcp-server

    Searches git repositories cloned locally under a sandbox folder to answer questions with cited links and complete code snippets.

    3.8k GitHub stars~660 tokensUpdated today
    DevelopmentAuto-check passed
  • Codebase Handbook Builder

    Ruhan-Wang/Harness_Handbook

    Generates, refreshes, validates and uses a compact handbook that maps where a change touches in a repository, using the active Codex session and no external LLM API.

    333 GitHub stars~2.2k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Codemap

    JordanCoin/codemap

    Gives an agent a quick map of a codebase's structure, dependencies, changes and handoffs, and tunes per-project config so the output stays code-first.

    704 GitHub stars~1.8k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from yamadashy/repomix

  • Writes Conventional Commits whose bodies carry action lines recording the intent, decisions and constraints behind a change, not only what changed.

    29k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Agent Carnet Notebook

    yamadashy/repomix

    Saves and recalls markdown notes between agent sessions with the agent-carnet CLI, tracking which notes proved useful so stale ones expire and good ones stay.

    29k GitHub stars~1.2k tokensUpdated 5 days ago
    Auto-check passed
  • Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content…

    29k GitHub starsUsed in 1 repo~288 tokens
    Auto-check passed
  • Repomix Codebase Explorer

    yamadashy/repomix

    Packs a local or remote repository into a single AI-friendly file with the Repomix CLI, then reads and searches that output to explain structure, find patterns or report metrics.

    29k GitHub stars~2.7k tokensUpdated 5 days ago
    Auto-check passed
  • Guides edits to the Repomix documentation site's VitePress configuration, per-language content, and translation workflow across 14 languages.

    29k GitHub starsUsed in 1 repo~342 tokens
    Auto-check passed

Works with

Questions about Repomix Codebase Packer

What does Repomix Codebase Packer do?

Packs a local directory or remote GitHub repository into one AI-friendly file with Repomix, then searches it to explore structure, find patterns and count tokens. The agent runs `npx repomix@latest` against either a remote repository with `--remote` or a local directory, and for remote repositories always writes the output to a temporary directory so your working folder stays clean.gitignore`, runs security checks and produces structured output.

When should I use Repomix Codebase Packer?

Repomix Codebase Packer fits situations like: exploring an unfamiliar repository before making changes; finding all code related to a feature such as authentication; checking how many tokens a project would use as context; packing a codebase into a single file for analysis by an AI tool.

How do I install Repomix Codebase Packer in Claude Code?

Run `npx skills add yamadashy/repomix --skill repomix -a claude-code`. Or copy the skill folder (.agents/clawhub in yamadashy/repomix) into .claude/skills/repomix in your project. Claude Code loads it when a task matches its description.

How do I install Repomix Codebase Packer in Codex?

Run `npx skills add yamadashy/repomix --skill repomix -a codex`. Or copy the skill folder (.agents/clawhub in yamadashy/repomix) into .agents/skills/repomix in your project. Codex loads it when a task matches its description.

Can I use Repomix Codebase Packer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add yamadashy/repomix --skill repomix -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/repomix, .gemini/skills/repomix, .github/skills/repomix and .opencode/skills/repomix in your project.

What does Repomix Codebase Packer need to run?

Going by SKILL.md and its folder, Repomix Codebase Packer needs the command-line tools its instructions call (npx). Our summary lists: Node.js with `npx`; Network access when packing remote repositories.

Does Repomix Codebase Packer access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Repomix Codebase Packer safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Repomix Codebase Packer use?

Repomix Codebase Packer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Repomix Codebase Packer use?

About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Repomix Codebase Packer?

Skills that share tags, products or a category with Repomix Codebase Packer: ccc Semantic Code Search (cocoindex-io/cocoindex-code, 2.8k stars), Ripwire Codebase Orientation (redhat-et/ripwire, 2.4k stars), tilth Code Reading CLI (jahala/tilth, 352 stars) and BTCA Local Repo Search (stickerdaniel/linkedin-mcp-server, 3.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Repomix Codebase Packer?

yamadashy (a GitHub user) maintains it in yamadashy/repomix, which has 28,767 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 3, 2026.

Source: yamadashy/repomix on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.