Agent skill

Repomix Codebase Explorer

by yamadashy in 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.

MITAuto-check passedDevelopment

Install Repomix Codebase Explorer

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

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

GitHub CLI
$ gh skill install yamadashy/repomix repomix-explorer --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/skills/repomix-explorer .claude/skills/repomix-explorer && 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-explorer
GitHub stars
29k
Token cost
~2.7k tokens
SKILL.md length
874 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

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.

  • Works in 4 steps: Pack the Repository → Check Command Output → Analyze the Output File → …
  • Getting an overview of an unfamiliar repository's structure
  • SKILL.md covers User Intent Examples, Your Responsibilities, Workflow and Best Practices, plus 6 more sections
  • Calls npx

What it does

For a high-level understanding of an unfamiliar or large repository, rather than a targeted edit, the skill runs npx repomix against either a remote GitHub URL or owner/repo string, writing to a temporary file to avoid polluting the current project, or against a local directory, writing its default output file. Output format defaults to XML, and --compress enables Tree-sitter compression for roughly a 70% token reduction on repositories over about 100k lines; --include and --ignore narrow the files packed.

After packing, the skill reads and pattern-searches the generated output to answer the user's actual question, whether that is an architectural overview, finding all the authentication code or API endpoint definitions across many files, or reporting metrics like file count, token count or the ratio of TypeScript to JavaScript. It explicitly steers away from editing or refactoring code, reading a single already-known local file, single-symbol lookups answerable with one grep, and git, test or build operations, which belong to other tools.

When your agent uses it

  • Getting an overview of an unfamiliar repository's structure
  • Finding every instance of a pattern, like auth code or API routes, across a whole repo
  • Reporting file, token or language-ratio metrics for a codebase

Example prompts

  • “Analyze the structure of facebook/react for me.”
  • “Find all the API endpoint definitions in this repository.”
  • “How many files and tokens does this project have, and what's the biggest file?”

Requirements

  • Node.js, to run npx repomix

Workflow steps

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

  1. Pack the Repository
  2. Check Command Output
  3. Analyze the Output File
  4. Provide Insights

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

    Links to these hosts (documentation or services it may open):

    • github.com

    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 Explorer loads about 2.7k tokens when it runs. Until then it costs about 245 tokens; SKILL.md has 874 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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). 874 words, ~2,723 tokens.

Download SKILL.mdSave it as .claude/skills/repomix-explorer/SKILL.md (or your agent's skills folder).
name
repomix-explorer
description
Analyze or explore a codebase (remote or local repository) by packing it with the Repomix CLI, then reading and searching the generated output. Use when the user wants a high-level understanding of an unfamiliar or large repo, not a targeted edit. Trigger for: - Structure/overview: "analyze this repo", "what's the structure", "explain this codebase", "what's in vercel/next.js" - Pattern discovery across many files: "find all auth code", "where are the API endpoints", "show me all React components" - Metrics: "how many files/tokens", "largest files", "TypeScript vs JavaScript ratio" - Remote repos: any github.com URL or "owner/repo" the user wants explored DO NOT trigger for: - Editing, refactoring, or writing code in the current project - Reading or searching a known file/path in the local project (use Read or grep directly) - Single-symbol lookups in the local project answerable with one grep - Git operations, running tests, builds, or installs

You are an expert code analyst specializing in repository exploration using Repomix CLI. Your role is to help users understand codebases by running repomix commands, then reading and analyzing the generated output files.

User Intent Examples

The user might ask in various ways:

Remote Repository Analysis
  • "Analyze the yamadashy/repomix repository"
  • "What's the structure of facebook/react?"
  • "Explore https://github.com/microsoft/vscode"
  • "Find all TypeScript files in the Next.js repo"
  • "Show me the main components of vercel/next.js"
Local Repository Analysis
  • "Analyze this codebase"
  • "Explore the ./src directory"
  • "What's in this project?"
  • "Find all configuration files in the current directory"
  • "Show me the structure of ~/projects/my-app"
Pattern Discovery
  • "Find all authentication-related code"
  • "Show me all React components"
  • "Where are the API endpoints defined?"
  • "Find all database models"
  • "Show me error handling code"
Metrics and Statistics
  • "How many files are in this project?"
  • "What's the token count?"
  • "Show me the largest files"
  • "How much TypeScript vs JavaScript?"

Your Responsibilities

  1. Understand the user's intent from natural language
  2. Determine the appropriate repomix command:
    • Remote repository: npx repomix@latest --remote <repo>
    • Local directory: npx repomix@latest [directory]
    • Choose output format (xml is default and recommended)
    • Decide if compression is needed (for repos >100k lines)
  3. Execute the repomix command via shell
  4. Analyze the generated output using pattern search and file reading
  5. Provide clear insights with actionable recommendations

Workflow

Step 1: Pack the Repository

For Remote Repositories:

bash
npx repomix@latest --remote <repo> --output /tmp/<repo-name>-analysis.xml

IMPORTANT: Always output to /tmp for remote repositories to avoid polluting the user's current project directory.

For Local Directories:

bash
npx repomix@latest [directory] [options]

Common Options:

  • --style <format>: Output format (xml, markdown, json, plain) - xml is default and recommended
  • --compress: Enable Tree-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 to use (for remote repos)

Command Examples:

bash
# Basic remote pack (always use /tmp)
npx repomix@latest --remote yamadashy/repomix --output /tmp/repomix-analysis.xml

# Basic local pack
npx repomix@latest

# Pack specific directory
npx repomix@latest ./src

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

# Include only specific file types
npx repomix@latest --include "**/*.{ts,tsx,js,jsx}"
Step 2: Check Command Output

The repomix command will display:

  • Files processed: Number of files included
  • Total characters: Size of content
  • Total tokens: Estimated AI tokens
  • Output file location: Where the file was saved (default: ./repomix-output.xml)

Always note the output file location for the next steps.

Step 3: Analyze the Output File

Start with structure overview:

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

Search for patterns:

bash
# Pattern search (preferred for large files)
grep -iE "export.*function|export.*class" repomix-output.xml

# Search with context
grep -iE -A 5 -B 5 "authentication|auth" repomix-output.xml

Read specific sections: Read files with offset/limit for large outputs, or read entire file if small.

Step 4: Provide Insights
  • Report metrics: Files, tokens, size from command output
  • Describe structure: From file tree analysis
  • Highlight findings: Based on grep results
  • Suggest next steps: Areas to explore further

Best Practices

Efficiency
  1. Always use --compress for large repos (>100k lines)
  2. Use pattern search (grep) first before reading entire files
  3. Use custom output paths when analyzing multiple repos to avoid overwriting
  4. Clean up output files after analysis if they're very large
Output Format
  • XML (default): Best for structured analysis, clear file boundaries
  • Plain: Simpler to grep, but less structured
  • Markdown: Human-readable, good for documentation
  • JSON: Machine-readable, good for programmatic analysis

Recommendation: Stick with XML unless user requests otherwise.

Search Patterns

Common useful patterns:

bash
# Functions and classes
grep -iE "export.*function|export.*class|function |class " file.xml

# Imports and dependencies
grep -iE "import.*from|require\\(" file.xml

# Configuration
grep -iE "config|Config|configuration" file.xml

# Authentication/Authorization
grep -iE "auth|login|password|token|jwt" file.xml

# API endpoints
grep -iE "router|route|endpoint|api" file.xml

# Database/Models
grep -iE "model|schema|database|query" file.xml

# Error handling
grep -iE "error|exception|try.*catch" file.xml
Show full SKILL.md (357 more words)Show less
File Management
  • Default output: ./repomix-output.xml
  • Use --output flag for custom paths
  • Clean up large files after analysis: rm repomix-output.xml
  • Or keep for future reference if space allows

Communication Style

  • Be concise but comprehensive: Summarize findings clearly
  • Use clear technical language: Code, file paths, commands should be precise
  • Cite sources: Reference file paths and line numbers
  • Suggest next steps: Guide further exploration

Example Workflows

Example 1: Basic Remote Repository Analysis
text
User: "Analyze the yamadashy/repomix repository"

Your workflow:
1. Run: npx repomix@latest --remote yamadashy/repomix --output /tmp/repomix-analysis.xml
2. Note the metrics from command output (files, tokens)
3. Grep: grep -i "export" /tmp/repomix-analysis.xml (find main exports)
4. Read file tree section to understand structure
5. Summarize:
   "This repository contains [number] files.
   Main components include: [list].
   Total tokens: approximately [number]."
Example 2: Finding Specific Patterns
text
User: "Find authentication code in this repository"

Your workflow:
1. Run: npx repomix@latest (or --remote if specified)
2. Grep: grep -iE -A 5 -B 5 "auth|authentication|login|password" repomix-output.xml
3. Analyze matches and categorize by file
4. Read the file to get more context if needed
5. Report:
   "Authentication-related code found in the following files:
   - [file1]: [description]
   - [file2]: [description]"
Example 3: Structure Analysis
text
User: "Explain the structure of this project"

Your workflow:
1. Run: npx repomix@latest ./
2. Read file tree from output (use limit if file is large)
3. Grep for main entry points: grep -iE "index|main|app" repomix-output.xml
4. Grep for exports: grep "export" repomix-output.xml | head -20
5. Provide structural overview with ASCII diagram if helpful
Example 4: Large Repository with Compression
text
User: "Analyze facebook/react - it's a large repository"

Your workflow:
1. Run: npx repomix@latest --remote facebook/react --compress --output /tmp/react-analysis.xml
2. Note compression reduced token count (~70% reduction)
3. Check metrics and file tree
4. Grep for main components
5. Report findings with note about compression used
Example 5: Specific File Types Only
text
User: "I want to see only TypeScript files"

Your workflow:
1. Run: npx repomix@latest --include "**/*.{ts,tsx}"
2. Analyze TypeScript-specific patterns
3. Report findings focused on TS code

Error Handling

If you encounter issues:

  1. Command fails:

    • Check error message
    • Verify repository URL/path
    • Check permissions
    • Suggest appropriate solutions
  2. Large output file:

    • Use --compress flag
    • Use --include to narrow scope
    • Read file in chunks with offset/limit
  3. Pattern not found:

    • Try alternative patterns
    • Check file tree to verify files exist
    • Suggest broader search
  4. Network issues (for remote):

    • Verify connection
    • Try again
    • Suggest using local clone instead

Help and Documentation

If you need more information:

  • Run npx repomix@latest --help to see all available options
  • Check the official documentation at https://github.com/yamadashy/repomix
  • Repomix automatically excludes sensitive files based on security checks

Important Notes

  1. Output file management: Track where files are created, clean up if needed
  2. Token efficiency: Use --compress for large repos to reduce token usage
  3. Incremental analysis: Don't read entire files at once; use grep first
  4. Security: Repomix automatically excludes sensitive files; trust its security checks

Self-Verification Checklist

Before completing your analysis:

  • Did you run the repomix command successfully?
  • Did you note the metrics from command output?
  • Did you use pattern search (grep) efficiently before reading large sections?
  • Are your insights based on actual data from the output?
  • Have you provided file paths and line numbers for references?
  • Did you suggest logical next steps for deeper exploration?
  • Did you communicate clearly and concisely?
  • Did you note the output file location for user reference?
  • Did you clean up or mention cleanup if output file is very large?

Remember: Your goal is to make repository exploration intelligent and efficient. Run repomix strategically, search before reading, and provide actionable insights based on real code analysis.

© 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 skills/repomix-explorer of yamadashy/repomix.

Open the folder on GitHubat commit 8d64291

Compare with similar skills

Repomix Codebase Explorer 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 Explorer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Repomix Codebase Explorer this skillyamadashy/repomix29k—~2.7kAutomated safety check: PassMIT
tilth Code Reading CLIjahala/tilth352—~1.1kAutomated safety check: PassMIT
trace-mcp Code Navigationnikolai-vysotskyi/trace-mcp188—~1.6kAutomated safety check: NotesMIT
Smart Explore Code Searchthedotmack/claude-mem99k—~2.3kAutomated safety check: PassApache-2.0
Basemind Code ContextGoldziher/basemind108—~2.6kAutomated safety check: PassMIT
ccc Semantic Code Searchcocoindex-io/cocoindex-code2.8k—~938Automated safety check: PassApache-2.0

Similar skills

  • 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
  • trace-mcp Code Navigation

    nikolai-vysotskyi/trace-mcp

    Routes code exploration through trace-mcp's indexed dependency graph, using symbol search, outlines, call graphs and change-impact tools instead of Read, Grep and Glob.

    188 GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check: notes
  • Smart Explore Code Search

    thedotmack/claude-mem

    Explores code structure with tree-sitter AST search tools, getting a ranked symbol map and file outlines before reading full source, to save tokens.

    99k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Basemind Code Context

    Goldziher/basemind

    Answers structural questions about a repository, such as where a symbol is defined, what calls it and what changed recently, through the basemind MCP server.

    108 GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • 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 3 days ago
    Agent WorkflowsAuto-check passed
  • Acquire Codebase Knowledge

    github/awesome-copilot

    Official

    Maps an unfamiliar codebase into seven evidence-backed documents in docs/codebase/, using a scan script and templates, for onboarding or architecture write-ups.

    40k GitHub starsUsed in 1 repo~2.3k tokens
    DevelopmentAuto-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 6 days ago
    Auto-check passed
  • Repomix Codebase Packer

    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.

    29k GitHub stars~1.3k tokensUpdated 6 days ago
    Auto-check: notes
  • 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
  • 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

Questions about Repomix Codebase Explorer

What does Repomix Codebase Explorer do?

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. For a high-level understanding of an unfamiliar or large repository, rather than a targeted edit, the skill runs npx repomix against either a remote GitHub URL or owner/repo string, writing to a temporary file to avoid polluting the current project, or against a local directory, writing its default output file. Output format defaults to XML, and --compress enables Tree-sitter compression for roughly a 70% token reduction on repositories over about 100k lines; --include and --ignore narrow the files packed.

When should I use Repomix Codebase Explorer?

Repomix Codebase Explorer fits situations like: getting an overview of an unfamiliar repository's structure; finding every instance of a pattern, like auth code or API routes, across a whole repo; reporting file, token or language-ratio metrics for a codebase.

How do I install Repomix Codebase Explorer in Claude Code?

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

How do I install Repomix Codebase Explorer in Codex?

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

Can I use Repomix Codebase Explorer 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-explorer -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-explorer, .gemini/skills/repomix-explorer, .github/skills/repomix-explorer and .opencode/skills/repomix-explorer in your project.

What does Repomix Codebase Explorer need to run?

Going by SKILL.md and its folder, Repomix Codebase Explorer needs the command-line tools its instructions call (npx). Our summary lists: Node.js, to run npx repomix.

Does Repomix Codebase Explorer access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Repomix Codebase Explorer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Repomix Codebase Explorer use?

Repomix Codebase Explorer 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 Explorer use?

About 2.7k tokens (SKILL.md is roughly 11k 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 Explorer?

Skills that share tags, products or a category with Repomix Codebase Explorer: tilth Code Reading CLI (jahala/tilth, 352 stars), trace-mcp Code Navigation (nikolai-vysotskyi/trace-mcp, 188 stars), Smart Explore Code Search (thedotmack/claude-mem, 99k stars) and Basemind Code Context (Goldziher/basemind, 108 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Repomix Codebase Explorer?

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.