Repository packaging for AI/LLM analysis. Capabilities: pack repositories into single files, generate AI-friendly context, codebase snapshots, security audit prep, filter/exclude patterns, token counting, multiple output formats. Actions: pack, generate, export, analyze repositories for LLMs. Keywords: Repomix, repository packaging, LLM context, AI analysis, codebase snapshot, Claude context, ChatGPT context, Gemini context, code packaging, token count, file filtering, security audit, third-party library analysis, context window, single file output. Use when: packaging codebases for AI, generating LLM context, creating codebase snapshots, analyzing third-party libraries, preparing security audits, feeding repos to Claude/ChatGPT/Gemini.
Repomix is a powerful tool that packs entire repositories into single, AI-friendly files. Perfect for when you need to feed codebases to Large Language Models (LLMs) or other AI tools like Claude, ChatGPT, and Gemini.
Use this skill when:
Repomix packages entire repositories into single files with:
Can process remote repositories without cloning:
npx repomix --remote yamadashy/repomixnpx repomix --remote https://github.com/owner/reponpx repomix --remote https://github.com/owner/repo/commit/hashStrips comments from supported languages when needed:
--remove-comments or config fileCheck if installed first:
repomix --version
Install using preferred method:
# npm
npm install -g repomix
# yarn
yarn global add repomix
# bun
bun add -g repomix
# Homebrew (macOS/Linux)
brew install repomix
# Basic packaging (generates repomix-output.xml)
repomix
# Specify output format
repomix --style markdown
repomix --style json
repomix --style plain
# Custom output path
repomix -o custom-output.xml
repomix /path/to/directory
# Shorthand format
npx repomix --remote owner/repo
# Full URL
npx repomix --remote https://github.com/owner/repo
# Specific commit
npx repomix --remote https://github.com/owner/repo/commit/abc123
# Include specific patterns
repomix --include "src/**/*.ts,*.md"
# Ignore additional patterns
repomix -i "tests/**,*.test.js"
# Disable .gitignore rules
repomix --no-gitignore
# Disable default ignore patterns
repomix --no-default-patterns
# Output format
repomix --style markdown # or xml, json, plain
# Output file path
repomix -o output.md
# Remove comments
repomix --remove-comments
# Show line numbers
repomix --no-line-numbers # disable line numbers
# Run security checks
repomix --no-security-check # disable security scanning
# Copy to clipboard
repomix --copy # copy output to clipboard
# Verbose output
repomix --verbose
# Use custom config file
repomix -c custom-config.json
# Initialize new config
repomix --init # creates repomix.config.json
Create repomix.config.json in project root:
{
"output": {
"filePath": "repomix-output.xml",
"style": "xml",
"removeComments": false,
"showLineNumbers": true,
"copyToClipboard": false
},
"include": ["**/*"],
"ignore": {
"useGitignore": true,
"useDefaultPatterns": true,
"customPatterns": [
"additional-folder",
"**/*.log",
"**/tmp/**"
]
},
"security": {
"enableSecurityCheck": true
}
}
Create .repomixignore for Repomix-specific ignore patterns (same format as .gitignore):
# Build artifacts
dist/
build/
*.min.js
# Test files
**/*.test.ts
**/*.spec.ts
coverage/
# Large files
*.mp4
*.zip
# Sensitive files
.env*
secrets/
-i flag).repomixignore file.gitignore file (if enabled)Best for structured AI consumption:
repomix --style xml
Human-readable with syntax highlighting:
repomix --style markdown
For programmatic processing:
repomix --style json
Simple concatenation:
repomix --style plain
# Package feature branch for AI review
repomix --include "src/**/*.ts" --remove-comments -o feature-review.md --style markdown
# Package third-party library for analysis
npx repomix --remote vendor/library --style xml -o audit.xml
# Package with docs and code
repomix --include "src/**,docs/**,*.md" --style markdown -o context.md
# Package specific modules
repomix --include "src/auth/**,src/api/**" -o debug-context.xml
# Full codebase context for planning
repomix --remove-comments --copy
Repomix automatically counts tokens for:
Use token counts to manage LLM context limits:
Repomix uses Secretlint to detect:
Disable if needed:
repomix --no-security-check
.repomixignore for sensitive files.env filesRepomix uses worker threads for parallel processing:
# Exclude unnecessary files
repomix -i "node_modules/**,dist/**,*.min.js"
# Process specific directories only
repomix --include "src/**/*.ts"
# Disable line numbers for smaller output
repomix --no-line-numbers
# Package and analyze in one workflow
repomix --style markdown --copy
# Then paste into Claude for analysis
# Generate codebase snapshot for releases
repomix --style markdown -o release-snapshot.md
# Pre-commit hook to generate context
repomix --include "src/**" -o .context/latest.xml
repomix --remove-comments --style markdown -o full-repo.md
repomix --include "src/**/*.{ts,tsx,js,jsx}" -i "**/*.test.*"
repomix --include "**/*.md,docs/**" --style markdown
repomix --include "**/*.ts,**/*.tsx" --remove-comments --no-line-numbers
npx repomix --remote owner/repo --style xml -o analysis.xml
# Exclude unnecessary files
repomix -i "node_modules/**,dist/**,coverage/**"
# Process specific directories
repomix --include "src/**"
# Disable .gitignore rules
repomix --no-gitignore
# Check ignore patterns
cat .repomixignore
# Review flagged files
# Add to .repomixignore
# Or disable checks: --no-security-check
When user requests repository packaging:
Assess Requirements
Configure Filters
Execute Packaging
Validate Output
Deliver Context
repomix first, then refineSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer