repomix

Pack codebases into token-aware single files for LLM context.

3|Updated Jul 17, 2024
One-click install
npx skills add https://github.com/Castrozan/.dotfiles --skill repomix-castrozan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: repomix
Source: https://github.com/Castrozan/.dotfiles/tree/main/agents/skills/repomix
Command: npx skills add https://github.com/Castrozan/.dotfiles --skill repomix-castrozan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Repomix eliminates the fragmentation of large codebases by consolidating an entire repository into a single, AI-friendly document suitable for context sharing with LLMs and coding agents.

Core Features & Use Cases

  • Codebase Packaging: Produce a structured, token-aware document including a file tree, token counts, and full file contents.
  • Context for AI Agents: Provide comprehensive repository context for analysis, reviews, migrations, and onboarding.
  • Migration & Documentation: Generate migration-ready artifacts and onboarding material from codebases.

Quick Start

Use the repomix tool to pack the current directory, or specify a path, enabling rapid generation of a single-file repository context.

Frequently Asked Questions about repomix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I pack an entire codebase into a single file for LLM context sharing?

You can pack a codebase for LLM context by running npx repomix, which consolidates the repository into a single, AI-optimized document. The output includes a file tree, token counts, and full file contents for analysis.

What is the best way to provide remote repository context to an AI coding agent?

Providing remote repository context to an AI agent is done using the --remote flag. This fetches and consolidates the remote codebase directly into a structured, token-aware document suitable for comprehensive AI analysis.

Do I need Node.js and npm to consolidate a repository into an AI-ready document?

Yes, you need Node.js and npm installed because the repository packaging process runs via the npx repomix command. This environment is required to parse the codebase and generate the structured output file with token counts.

Can I exclude specific files when generating a token-aware document for code review?

Yes, you can exclude specific files when generating a token-aware document by using the --exclude flag. You can also use --include to specify target paths, ensuring the repository context only contains relevant code.

When do I need a single-file repository packaging tool for migrations and onboarding?

You need single-file repository packaging for migrations and onboarding when you must provide an LLM with comprehensive project context. It eliminates codebase fragmentation by producing a structured document with full file contents and token counts.

Does repomix support custom output formats when packing local directories?

Repomix supports custom output handling for local directories via the --output flag. This allows you to define the destination of the generated structured document containing the file tree and token counts for AI-assisted analysis.