Coding

Repomix

Try it

Pack a local or remote codebase with repomix-rs and analyze the generated output. Invoke for high-level exploration, structure summaries, or pattern discover...

What it does

Use (the CLI) to pack a codebase into a single AI-friendly file, then analyze it with agent tools.

The skill document

Repomix-rs Explorer

Use repomix (the repomix-rs CLI) to pack a codebase into a single AI-friendly file, then analyze it with agent tools.

When to use

  • Explore an unfamiliar local or remote repository
  • Summarize structure, entry points, or module boundaries
  • Find patterns (auth, routes, models, error handling) across many files
  • Get token/file metrics before deciding what to read in detail

Use repomix-context-skill instead when a MindMesh index already exists at .mind-mesh/agent/repomix.md.

Installation

Package name is repomix-rs; the installed command is repomix.

# Global install — `repomix` available everywhere
npm install -g repomix-rs

# One-off run without global install
npx repomix-rs .

# Run the MCP server on stdio
npx -y repomix-rs --mcp

Supported platforms: Linux (x64, arm64), macOS (x64, arm64), Windows (x64). Node >= 18 required.

If both the original TypeScript repomix and repomix-rs are installed globally, the last install wins the repomix command. Use npx repomix-rs or npx repomix explicitly if both are present.

From source

# Install to ~/.cargo/bin/repomix
cargo install --path crates/cli

# Or build a release binary at ./target/release/repomix
cargo build --release

Prerequisites

Git-related features (--remote, --include-diffs, --include-logs, sort-by-changes, MCP pack_remote_repository) shell out to the git executable on PATH. If git is missing, these features are skipped with a warning rather than failing the pack.

Core commands

IntentCommand
Pack current directoryrepomix .
Pack a remote repositoryrepomix --remote https://github.com/owner/repo --output /tmp/.xml
Pack with compressionrepomix --compress .
Pack only specific filesrepomix --include "**/*.{ts,tsx}" --ignore "tests/**" .
Markdown outputrepomix --style markdown --output /tmp/.md .
Include git diff/logrepomix --include-diffs --include-logs .
Start MCP serverrepomix --mcp
Show all optionsrepomix --help

Default output file is style-dependent (repomix-output.xml, .md, .json, or .txt). Always use --output to place the file where you expect.

Agent workflow

  1. Pack

    • Local: repomix [ROOT]
    • Remote: repomix --remote --output /tmp/.xml
    • Note the metrics printed by the command (files, characters, tokens, output path).
  2. Inspect structure

    • Read the start of the output file for the file tree and metrics summary.
    • For large outputs, read with offset/limit rather than loading the whole file.
  3. Search patterns

    • Use the agent's Grep tool on the output file, not shell grep.
    • Common patterns: export.*function, export.*class, import.*from, router\.|route\.|endpoint, auth|login|jwt, model|schema|database, error|exception|try.*catch.
  4. Read slices

    • After locating a relevant ### path or `` boundary, read that slice with offset/limit.
  5. Summarize

    • Report metrics, top-level structure, and findings.
    • Cite output file paths and line numbers.
    • Suggest next steps for deeper exploration or targeted edits.

Best practices

  • Remote repos: always write to /tmp or a temp directory to avoid polluting the current workspace.
  • Large repos: use --compress to extract signatures via tree-sitter and reduce token count.
  • Narrow scope: use --include / --ignore before reading large outputs.
  • Output path: explicitly pass --output so you know exactly where the pack lives.
  • Clean up: delete large /tmp output files after analysis unless the user asks to keep them.
  • Security: suspicious files are detected and excluded automatically; trust the exclusion list in the output report.

Do not

  • Use this skill for targeted file edits — pack, analyze, then switch to direct file tools.
  • Read entire multi-megabyte output files into context; grep first, then read slices.
  • Run rm on project files unless you are certain they are temporary output files you created.
  • Confuse repomix-rs (Rust, npm package repomix-rs) with the original TypeScript repomix (npm package repomix).

Error handling

SymptomAction
repomix: command not foundInstall via npm install -g repomix-rs or use npx repomix-rs.
Remote clone failsVerify the URL, network, and that git is on PATH. Try a local clone instead.
Output is too largeRe-run with --compress, narrower --include, or --split-output .
Expected files missingCheck the file tree and ignored/excluded files section in the output report.
Git features missingEnsure git is installed and the target is inside a git repository.

Resources

Related skills

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván2 installs

Run Git operations — commits, branches, merges, rebases, conflict resolution, and recovery — with safety rules enforced.

by Iván532 installs31 stars

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai21 installs8 stars

More from sopaco

Browse all skills

Track your portfolio, monitor market sentiment, and generate rebalancing suggestions through a local ledger CLI.

by sopaco25 installs

MemClaw — High-performance memory plugin for OpenClaw. Outperforms native and other memory-solutions in complex scenarios with superior AI memory management,...

by sopaco51 installs2 stars

MemClaw Maintenance Guide — Installation, configuration, and maintenance guidance. For daily usage and tool operations, use the [`memclaw` skill](https://cla...

by sopaco24 installs1 stars

Generates .ai-context knowledge base for coding agents. Activate when: (1) setting up a new project for AI-assisted development, (2) user asks to "create pro...

by sopaco15 installs

Personal AI chief-of-staff for technical managers. Use when the user wants a persistent workspace-based system for daily logs, decision support, upward-manag...

by sopaco13 installs

Persistent memory enhancement for AI agents. Store conversations, search memories with semantic retrieval, and recall context across sessions. Use this skill...

by sopaco13 installs