claude/skills/repomix/SKILL.md
Guide for using Repomix - a powerful tool that packs entire repositories into single, AI-friendly files. Use when packaging codebases for AI analysis, generating context for LLMs, creating codebase snapshots, analyzing third-party libraries, or preparing repositories for security audits.
npx skillsauth add einverne/dotfiles repomixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 refinedevelopment
生成符合项目规范的 React 组件。当用户要求创建组件、新建 React 组件或生成组件文件时使用
development
生成符合 Conventional Commits 规范的 Git 提交信息。当用户要求生成提交、创建 commit 或写提交信息时使用
devops
将当前分支部署到测试环境。当用户要求部署、发布到测试或在 staging 环境测试时使用
development
进行系统化的代码审查,检查代码质量、安全性和性能。当用户要求审查代码、review 或检查代码时使用