repomix
Bundle entire repositories into AI-friendly files for easier analysis.
Install
mkdir -p .claude/skills/repomix && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7710" && unzip -o skill.zip -d .claude/skills/repomix && rm skill.zipInstalls to .claude/skills/repomix
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Package entire code repositories into single AI-friendly files using Repomix. Capabilities include pack codebases with customizable include/exclude patterns, generate multiple output formats (XML, Markdown, plain text), preserve file structure and context, optimize for AI consumption with token counting, filter by file types and directories, add custom headers and summaries. Use when packaging codebases for AI analysis, creating repository snapshots for LLM context, analyzing third-party libraries, preparing for security audits, generating documentation context, or evaluating unfamiliar codebases.Key capabilities
- →Consolidates complex directory trees into single text files
- →Filters content using include/exclude patterns
- →Calculates tokens for LLM context management
- →Processes remote repositories via URL
- →Strips source code comments
How it works
Traverses the directory structure, ignores excluded files, and aggregates the remaining contents into a single formatted file optimized for AI ingestion.
Inputs & outputs
When to use repomix
- →Prepare codebase for AI analysis
- →Generate snapshot of repository
- →Investigate bugs across a project
About this skill
Repomix Skill
Repomix packs entire repositories into single, AI-friendly files. Perfect for feeding codebases to LLMs like Claude, ChatGPT, and Gemini.
When to Use
Use when:
- Packaging codebases for AI analysis
- Creating repository snapshots for LLM context
- Analyzing third-party libraries
- Preparing for security audits
- Generating documentation context
- Investigating bugs across large codebases
- Creating AI-friendly code representations
Quick Start
Check Installation
repomix --version
Install
# npm
npm install -g repomix
# Homebrew (macOS/Linux)
brew install repomix
Basic Usage
# Package current directory (generates repomix-output.xml)
repomix
# Specify output format
repomix --style markdown
repomix --style json
# Package remote repository
npx repomix --remote owner/repo
# Custom output with filters
repomix --include "src/**/*.ts" --remove-comments -o output.md
Core Capabilities
Repository Packaging
- AI-optimized formatting with clear separators
- Multiple output formats: XML, Markdown, JSON, Plain text
- Git-aware processing (respects .gitignore)
- Token counting for LLM context management
- Security checks for sensitive information
Remote Repository Support
Process remote repositories without cloning:
# Shorthand
npx repomix --remote yamadashy/repomix
# Full URL
npx repomix --remote https://github.com/owner/repo
# Specific commit
npx repomix --remote https://github.com/owner/repo/commit/hash
Comment Removal
Strip comments from supported languages (HTML, CSS, JavaScript, TypeScript, Vue, Svelte, Python, PHP, Ruby, C, C#, Java, Go, Rust, Swift, Kotlin, Dart, Shell, YAML):
repomix --remove-comments
Common Use Cases
Code Review Preparation
# Package feature branch for AI review
repomix --include "src/**/*.ts" --remove-comments -o review.md --style markdown
Security Audit
# Package third-party library
npx repomix --remote vendor/library --style xml -o audit.xml
Documentation Generation
# Package with docs and code
repomix --include "src/**,docs/**,*.md" --style markdown -o context.md
Bug Investigation
# Package specific modules
repomix --include "src/auth/**,src/api/**" -o debug-context.xml
Implementation Planning
# Full codebase context
repomix --remove-comments --copy
Command Line Reference
File Selection
# Include specific patterns
repomix --include "src/**/*.ts,*.md"
# Ignore additional patterns
repomix -i "tests/**,*.test.js"
# Disable .gitignore rules
repomix --no-gitignore
Output Options
# Output format
repomix --style markdown # or xml, json, plain
# Output file path
repomix -o output.md
# Remove comments
repomix --remove-comments
# Copy to clipboard
repomix --copy
Configuration
# Use custom config file
repomix -c custom-config.json
# Initialize new config
repomix --init # creates repomix.config.json
Token Management
Repomix automatically counts tokens for individual files, total repository, and per-format output.
Typical LLM context limits:
- Claude Sonnet 4.5: ~200K tokens
- GPT-4: ~128K tokens
- GPT-3.5: ~16K tokens
Security Considerations
Repomix uses Secretlint to detect sensitive data (API keys, passwords, credentials, private keys, AWS secrets).
Best practices:
- Always review output before sharing
- Use
.repomixignorefor sensitive files - Enable security checks for unknown codebases
- Avoid packaging
.envfiles - Check for hardcoded credentials
Disable security checks if needed:
repomix --no-security-check
Implementation Workflow
When user requests repository packaging:
-
Assess Requirements
- Identify target repository (local/remote)
- Determine output format needed
- Check for sensitive data concerns
-
Configure Filters
- Set include patterns for relevant files
- Add ignore patterns for unnecessary files
- Enable/disable comment removal
-
Execute Packaging
- Run repomix with appropriate options
- Monitor token counts
- Verify security checks
-
Validate Output
- Review generated file
- Confirm no sensitive data
- Check token limits for target LLM
-
Deliver Context
- Provide packaged file to user
- Include token count summary
- Note any warnings or issues
Reference Documentation
For detailed information, see:
- Configuration Reference - Config files, include/exclude patterns, output formats, advanced options
- Usage Patterns - AI analysis workflows, security audit preparation, documentation generation, library evaluation
Additional Resources
- GitHub: https://github.com/yamadashy/repomix
- Documentation: https://repomix.com/guide/
- MCP Server: Available for AI assistant integration
When not to use it
- →Projects with extreme binary dependencies
- →Extremely large repositories exceeding LLM context windows
- →Environments where gitignore files are misconfigured
Prerequisites
Limitations
- →Limited utility for non-text binary assets
- →Output can still exceed context limits if not filtered properly
How it compares
It generates a token-aware, AI-ready snapshot instead of just dumping directory contents.
Compared to similar skills
repomix side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| repomix (this skill) | 4 | 9mo | Review | Beginner |
| obsidian | 29 | 27d | No flags | Intermediate |
| cursor-rules-config | 4 | 27d | Review | Intermediate |
| rust-deps-visualizer | 2 | 6mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by mrgoonie
View all by mrgoonie →You might also like
obsidian
gapmiss
Comprehensive guidelines for Obsidian.md plugin development including all 27 ESLint rules, TypeScript best practices, memory management, API usage (requestUrl vs fetch), UI/UX standards, and submission requirements. Use when working with Obsidian plugins, main.ts files, manifest.json, Plugin class, MarkdownView, TFile, vault operations, or any Obsidian API development.
cursor-rules-config
jeremylongshore
Configure .cursorrules for project-specific AI behavior. Triggers on "cursorrules", ".cursorrules", "cursor rules", "cursor config", "cursor project settings". Use when configuring systems or services. Trigger with phrases like "cursor rules config", "cursor config", "cursor".
rust-deps-visualizer
actionbook
Visualize Rust project dependencies as ASCII art. Triggers on: /deps-viz, dependency graph, show dependencies, visualize deps, 依赖图, 依赖可视化, 显示依赖
readme-generator
aws-samples
This skill should be used when users want to create or improve README.md files for their projects. It generates professional documentation following the Deep Insight/Strands SDK style - comprehensive yet focused, with clear structure and practical examples.
doc-author
mintlify
Write and maintain documentation autonomously. Use when assigned to create, update, or improve documentation without direct human oversight. Always opens PRs for review. Built by Mintlify.
teachbook-generate-teaching-notebook
elloza
>