repomix

Package code repositories into single XML, Markdown, JSON, or plain text files.

Updated Nov 12, 2025
One-click install
npx skills add https://github.com/vumichien/bi-agent --skill repomix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: repomix
Source: https://github.com/vumichien/bi-agent/tree/main/.claude/skills/repomix
Command: npx skills add https://github.com/vumichien/bi-agent --skill repomix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires repomix, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Large code repositories are overwhelming for AI models due to context window limitations and unstructured data. This Skill solves that by intelligently packaging entire codebases into concise, AI-friendly formats, making them digestible for analysis, review, and understanding.

Core Features & Use Cases

  • AI-Optimized Packaging: Converts complex repositories into single XML, Markdown, JSON, or plain text files, preserving structure and context for LLM consumption.
  • Customizable Filtering: Use include/exclude patterns, .gitignore rules, and comment removal to tailor the output to specific AI analysis needs.
  • Security & Token Management: Integrates Secretlint for sensitive data detection and provides token counts to manage LLM context limits effectively.
  • Use Case: Before asking an AI to refactor a module, use Repomix to package only the relevant source files, stripping comments and ensuring it fits within the AI's context window, leading to more accurate and efficient code suggestions.

Quick Start

Package the current repository into a markdown file, removing all comments, and save it as 'codebase-snapshot.md'.

Frequently Asked Questions about repomix

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

FAQPage Schema
How do I package a codebase for AI analysis without hitting token limits?

Repomix converts entire repositories into single-file AI-friendly formats (XML, Markdown, JSON, plain text) with integrated token counting, letting you measure context usage before sending code to an LLM and trim files to fit your model's window limits.

Can I exclude sensitive files and comments when packaging code for an AI?

Yes. Repomix supports include/exclude filtering, respects `.gitignore` rules, removes comments on demand, and integrates Secretlint to detect and flag sensitive data before packaging, ensuring only safe, relevant code reaches the AI.

What's the best way to prepare a repository for security audits or documentation generation?

Package the repository using Repomix with filtering tailored to your analysis goal—strip comments for refactoring tasks, preserve structure for documentation, and include security checks to identify potential vulnerabilities in the packaged output.

How do I debug issues across multiple repositories with an AI?

Repomix lets you snapshot and package multiple codebases into structured single files, preserving file hierarchy and metadata, so you can share cross-repository context with an LLM for unified bug investigation and analysis.

Does Repomix work with remote repositories and different output formats?

Yes. Repomix packages both local and remote codebases into multiple formats—XML, Markdown, JSON, and plain text—each preserving structure and metadata for different downstream AI workflows and analysis needs.

What happens if my repository contains files I want to skip when packaging for AI?

Repomix offers customizable filtering via include/exclude patterns and automatic `.gitignore` awareness, so you control which files enter the package, reducing noise and keeping output focused on relevant code for LLM consumption.