repomix

A tool that combines a local folder or remote GitHub repository into one structured file for an AI to read and analyze.

In plain words
What is it for?
Use it to explore project structure, find code patterns, inspect areas such as authentication, and prepare repository context for AI analysis.
Why use it?
It removes the need to inspect many files separately when trying to understand an unfamiliar codebase. It also helps identify which files to include and estimate the amount of text involved.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/yamadashy/repomix/clawhub
Any agent
npx skills add yamadashy/repomix --skill clawhub
Clone the repo
git clone --depth 1 https://github.com/yamadashy/repomix

Made for: Claude Code, Codex.

Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,293 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00058 $0.01293
Opus 5 $0.00029 $0.00647
Sonnet 5 $0.00012 $0.00259
Haiku 4.5 $0.00006 $0.00129

Measured yesterday against content hash 367064bbb384, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

repomix scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/clawhub/SKILL.md · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

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

npx repomix@latest [directory] --output /tmp/<name>-analysis.xml

Key Options

Option Description
--style <format> Output format: xml (default, recommended), markdown, plain, json
--compress 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 (for remote repos)

Workflow

Step 1: Pack the Repository

Choose the appropriate command based on the target:

# 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

Read the full file on GitHub · 160 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 160 lines · 58 tokens per session scan A 367064bbb384

Subscribe to this mod's changes

repomix is a skill published in the GitHub repository yamadashy/repomix (28,125 stars, last pushed 2d ago), licensed MIT. It adds 58 tokens to every session and 1,293 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

survey-open-threads

Mine the ecosystem for open workstreams — paused arcs, abandoned/soft-abandoned sessions, parked design questions — apply the liveness discriminator, and produce two artifacts: registry entries for docs/open-threads/ and a fresh WIP snapshot. Use when the user wants to find loose ends, recover dropped threads, audit…

rhi-zone/normalize · 82 tokens

polish

Interactive codebase polish loop. Run parallel audit agents across chosen lenses, synthesize findings, and persist state in POLISH.md for incremental improvement across sessions.

rhi-zone/normalize · 34 tokens

improve-codebase-architecture

Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable.

rhi-zone/normalize · 56 tokens

domain-model

Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates CONTEXT.md inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.

rhi-zone/normalize · 48 tokens

think-with-the-engineering-taste

Use when starting design or architecture work and you want the session to think with the rhi engineering taste — to reach for the right moves by reflex instead of reverting to the conventional distribution-mode.

rhi-zone/normalize · 46 tokens

handoff

Hand off to a fresh session when current topic is complete, drifts off-topic, context grows heavy, or after a major mid-session correction. One topic per session.

rhi-zone/normalize · 37 tokens