Agent skill

Repomix

by einverne in einverne/dotfiles

Guide for using Repomix - a powerful tool that packs entire repositories into single, AI-friendly files.

GPL-3.0Auto-check: notesAgent Workflows

Install Repomix

skills CLI
$ npx skills add einverne/dotfiles --skill repomix -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install einverne/dotfiles repomix --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/einverne/dotfiles.git skills-src && mkdir -p .claude/skills && cp -r skills-src/claude/skills/repomix .claude/skills/repomix && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
repomix
GitHub stars
121
Token cost
~2.5k tokens
SKILL.md length
669 words
Files
1
Skills in repo
39
Repo updated
First seen
Licence
GPL-3.0

At a glance

Guide for using Repomix - a powerful tool that packs entire repositories into single, AI-friendly files.

  • Works in 8 steps: Repository Packaging → Remote Repository Support → Comment Removal → …
  • Packaging codebases for AI analysis
  • SKILL.md covers When to Use This Skill, Core Capabilities, Installation and Basic Usage, plus 5 more sections
  • Calls npx, npm and yarn; reaches github.com

What it does

Repomix is an agent skill from einverne/dotfiles. 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.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Codebase knowledge for agents and Security review. The repository describes itself as: my personal dotfiles managed by dotbot, zinit. The licence is GPL-3.0.

When your agent uses it

  • Packaging codebases for AI analysis
  • Generating context for LLMs
  • Creating codebase snapshots
  • Analyzing third-party libraries

Example prompts

  • “/repomix”

Requirements

  • Node.js

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Repository Packaging
  2. Remote Repository Support
  3. Comment Removal
  4. Code Review Preparation
  5. Security Audit
  6. Documentation Generation
  7. Bug Investigation
  8. Implementation Planning

What it can do on your machine

Read from SKILL.md and the folder at commit c6c0686. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • npm
    • yarn
    • bun
    • brew

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    Also links to:

    • repomix.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Repomix loads about 2.5k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 669 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~74
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:201
    .env*
  • NoteMentions a .env fileSKILL.md:301
    4. Avoid packaging `.env` files

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from einverne/dotfiles at commit c6c0686, republished under its GPL-3.0 licence (© einverne). 669 words, ~2,492 tokens.

Download SKILL.mdSave it as .claude/skills/repomix/SKILL.md (or your agent's skills folder).
name
repomix
description
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.

Repomix Skill

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.

When to Use This Skill

Use this skill when:

  • User needs to package a codebase for AI analysis
  • Preparing repository context for LLM consumption
  • Generating codebase snapshots for documentation
  • Analyzing third-party libraries or repositories
  • Creating AI-friendly representations of code projects
  • Investigating bugs across large codebases
  • Performing security audits on repositories
  • Generating context for implementation planning

Core Capabilities

1. Repository Packaging

Repomix packages entire repositories into single files with:

  • 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
2. Remote Repository Support

Can process remote repositories without cloning:

  • Shorthand: npx repomix --remote yamadashy/repomix
  • Full URL: npx repomix --remote https://github.com/owner/repo
  • Specific commits: npx repomix --remote https://github.com/owner/repo/commit/hash
3. Comment Removal

Strips comments from supported languages when needed:

  • Supported: HTML, CSS, JavaScript, TypeScript, Vue, Svelte, Python, PHP, Ruby, C, C#, Java, Go, Rust, Swift, Kotlin, Dart, Shell, YAML
  • Enable with: --remove-comments or config file

Installation

Check if installed first:

bash
repomix --version

Install using preferred method:

bash
# npm
npm install -g repomix

# yarn
yarn global add repomix

# bun
bun add -g repomix

# Homebrew (macOS/Linux)
brew install repomix

Basic Usage

Package Current Directory
bash
# 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
Package Specific Directory
bash
repomix /path/to/directory
Package Remote Repository
bash
# 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

Command Line Options

File Selection
bash
# 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 Configuration
bash
# 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
Security & Analysis
bash
# Run security checks
repomix --no-security-check  # disable security scanning

# Copy to clipboard
repomix --copy  # copy output to clipboard

# Verbose output
repomix --verbose
Configuration
bash
# Use custom config file
repomix -c custom-config.json

# Initialize new config
repomix --init  # creates repomix.config.json

Configuration File

Create repomix.config.json in project root:

json
{
  "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
  }
}

Ignore Patterns

.repomixignore File

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/
Precedence Order
  1. CLI ignore patterns (-i flag)
  2. .repomixignore file
  3. Custom patterns in config file
  4. .gitignore file (if enabled)
  5. Default patterns (if enabled)

Output Formats

XML Format (Default)

Best for structured AI consumption:

bash
repomix --style xml
Markdown Format

Human-readable with syntax highlighting:

bash
repomix --style markdown
JSON Format

For programmatic processing:

bash
repomix --style json
Plain Text

Simple concatenation:

bash
repomix --style plain

Use Cases & Examples

1. Code Review Preparation
bash
# Package feature branch for AI review
repomix --include "src/**/*.ts" --remove-comments -o feature-review.md --style markdown
2. Security Audit
bash
# Package third-party library for analysis
npx repomix --remote vendor/library --style xml -o audit.xml
3. Documentation Generation
bash
# Package with docs and code
repomix --include "src/**,docs/**,*.md" --style markdown -o context.md
4. Bug Investigation
bash
# Package specific modules
repomix --include "src/auth/**,src/api/**" -o debug-context.xml
5. Implementation Planning
bash
# Full codebase context for planning
repomix --remove-comments --copy

Token Management

Repomix automatically counts tokens for:

  • Individual files
  • Total repository
  • Per-format output

Use token counts to manage LLM context limits:

  • Claude: ~200K tokens
  • GPT-4: ~128K tokens
  • GPT-3.5: ~16K tokens

Security Considerations

Sensitive Data Detection

Repomix uses Secretlint to detect:

  • API keys and tokens
  • Passwords and credentials
  • Private keys
  • AWS secrets
  • Database connection strings

Disable if needed:

bash
repomix --no-security-check
Best Practices
  1. Always review output before sharing
  2. Use .repomixignore for sensitive files
  3. Enable security checks for unknown codebases
  4. Avoid packaging .env files
  5. Check for hardcoded credentials
Show full SKILL.md (263 more words)Show less

Performance Optimization

Large Repositories

Repomix uses worker threads for parallel processing:

  • Efficiently handles large codebases
  • Example: facebook/react processed 29x faster (123s → 4s)
Optimization Tips
bash
# 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

Workflow Integration

With Claude Code
bash
# Package and analyze in one workflow
repomix --style markdown --copy
# Then paste into Claude for analysis
With CI/CD
bash
# Generate codebase snapshot for releases
repomix --style markdown -o release-snapshot.md
With Git Hooks
bash
# Pre-commit hook to generate context
repomix --include "src/**" -o .context/latest.xml

Common Patterns

Full Repository Package
bash
repomix --remove-comments --style markdown -o full-repo.md
Source Code Only
bash
repomix --include "src/**/*.{ts,tsx,js,jsx}" -i "**/*.test.*"
Documentation Bundle
bash
repomix --include "**/*.md,docs/**" --style markdown
TypeScript Project
bash
repomix --include "**/*.ts,**/*.tsx" --remove-comments --no-line-numbers
Remote Analysis
bash
npx repomix --remote owner/repo --style xml -o analysis.xml

Troubleshooting

Issue: Output Too Large
bash
# Exclude unnecessary files
repomix -i "node_modules/**,dist/**,coverage/**"

# Process specific directories
repomix --include "src/**"
Issue: Missing Files
bash
# Disable .gitignore rules
repomix --no-gitignore

# Check ignore patterns
cat .repomixignore
Issue: Sensitive Data Warnings
bash
# Review flagged files
# Add to .repomixignore
# Or disable checks: --no-security-check

Implementation Workflow

When user requests repository packaging:

  1. Assess Requirements

    • Identify target repository (local/remote)
    • Determine output format needed
    • Check for sensitive data concerns
  2. Configure Filters

    • Set include patterns for relevant files
    • Add ignore patterns for unnecessary files
    • Enable/disable comment removal
  3. Execute Packaging

    • Run repomix with appropriate options
    • Monitor token counts
    • Verify security checks
  4. Validate Output

    • Review generated file
    • Confirm no sensitive data
    • Check token limits for target LLM
  5. Deliver Context

    • Provide packaged file to user
    • Include token count summary
    • Note any warnings or issues

Best Practices

  1. Start with defaults: Run basic repomix first, then refine
  2. Use .repomixignore: Better than CLI flags for complex patterns
  3. Enable security checks: Especially for third-party code
  4. Choose right format: XML for AI, Markdown for humans
  5. Monitor token counts: Stay within LLM limits
  6. Remove comments: When focusing on logic over documentation
  7. Version output: Include in .gitignore, regenerate as needed
  8. Test patterns: Verify include/exclude work as expected
  • Context7: For up-to-date library documentation
  • Git: For repository history analysis
  • Secretlint: For security scanning
  • Token counters: For LLM context management

Additional Resources

© einverne, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in claude/skills/repomix of einverne/dotfiles.

Open the folder on GitHubat commit c6c0686

Compare with similar skills

Repomix next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Repomix compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Repomix this skilleinverne/dotfiles121—~2.5kAutomated safety check: NotesGPL-3.0
RepomixMicrock/ordinary-claude-skills404—~1.4kAutomated safety check: NotesCustom licence
Security Scanaffaan-m/ECC276k5 repos~1.1kAutomated safety check: PassMIT
Security Scanaffaan-m/ECC276k2 repos~796Automated safety check: PassMIT
Review SwarmDimillian/Skills4k—~1.6kAutomated safety check: PassMIT
Autoresearchleo-kuang-ai/spec-first107—~2.2kAutomated safety check: PassMIT

Similar skills

  • Repomix

    Microck/ordinary-claude-skills

    Package entire code repositories into single AI-friendly files using Repomix.

    404 GitHub stars~1.4k tokensUpdated 1 mo ago
    SecurityAuto-check: notes
  • Security Scan

    affaan-m/ECC

    Scan your Claude Code configuration (.claude/ directory) for security vulnerabilities, misconfigurations, and injection risks using AgentShield.

    276k GitHub starsUsed in 5 repos~1.1k tokens
    Agent WorkflowsAuto-check passed
  • Security Scan

    affaan-m/ECC

    AgentShield を使用して、Claude Code の設定(.claude/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CLAUDE.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。

    276k GitHub starsUsed in 2 repos~796 tokens
    Agent WorkflowsAuto-check passed
  • Review Swarm

    Dimillian/Skills

    Parallel read-only multi-agent review of a current git diff or explicit file scope to find behavioral regressions, security or privacy risks, performance or reliability issues, and contract or test…

    4k GitHub stars~1.6k tokensUpdated 6 mo ago
    Agent WorkflowsAuto-check passed
  • Autoresearch

    leo-kuang-ai/spec-first

    Autonomous goal-directed iteration loop: modify, verify, keep/discard against a metric or a checkable success predicate, with bounded cycles, plateau/ceiling backstops, safety-screened commands, and…

    107 GitHub stars~2.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Openiap Workflows

    hyodotdev/openiap

    A skill your agent uses for OpenIAP monorepo work that should follow the repository's slash-command workflows when the user asks in natural language instead of typing a slash command, including…

    155 GitHub stars~766 tokensUpdated today
    Agent WorkflowsAuto-check passed

More from einverne/dotfiles

All 39 skills in this repo
  • DOCX

    einverne/dotfiles

    Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction.

    121 GitHub starsUsed in 35 repos~2.5k tokens
    Auto-check: notes
  • Chrome Devtools

    einverne/dotfiles

    Browser automation, debugging, and performance analysis using Puppeteer CLI scripts.

    121 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check: notes
  • PDF

    einverne/dotfiles

    Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms.

    121 GitHub starsUsed in 47 repos~1.8k tokens
    Auto-check passed
  • Gemini Audio

    einverne/dotfiles

    Guide for implementing Google Gemini API audio capabilities - analyze audio with transcription, summarization, and understanding (up to 9.5 hours), plus generate speech with controllable TTS.

    121 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check: notes
  • Guide for implementing Google Gemini API document processing - analyze PDFs with native vision to extract text, images, diagrams, charts, and tables.

    121 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check: notes
  • PPTX

    einverne/dotfiles

    Presentation creation, editing, and analysis. An agent skill from einverne/dotfiles.

    121 GitHub starsUsed in 38 repos~6.4k tokens
    Auto-check: notes

Questions about Repomix

What does Repomix do?

Guide for using Repomix - a powerful tool that packs entire repositories into single, AI-friendly files. Repomix is an agent skill from einverne/dotfiles. Guide for using Repomix - a powerful tool that packs entire repositories into single, AI-friendly files.

When should I use Repomix?

Repomix fits situations like: packaging codebases for AI analysis; generating context for LLMs; creating codebase snapshots; analyzing third-party libraries.

How do I install Repomix in Claude Code?

Run `npx skills add einverne/dotfiles --skill repomix -a claude-code`. Or copy the skill folder (claude/skills/repomix in einverne/dotfiles) into .claude/skills/repomix in your project. Claude Code loads it when a task matches its description.

How do I install Repomix in Codex?

Run `npx skills add einverne/dotfiles --skill repomix -a codex`. Or copy the skill folder (claude/skills/repomix in einverne/dotfiles) into .agents/skills/repomix in your project. Codex loads it when a task matches its description.

Can I use Repomix in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add einverne/dotfiles --skill repomix -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/repomix, .gemini/skills/repomix, .github/skills/repomix and .opencode/skills/repomix in your project.

What does Repomix need to run?

Going by SKILL.md and its folder, Repomix needs the command-line tools its instructions call (npx, npm, yarn, bun and brew). Our summary lists: Node.js.

Does Repomix access the network?

SKILL.md names 2 domains. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. As links in the text: repomix.com. This is read from the text; nothing was executed.

Is Repomix safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Repomix use?

Repomix is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Repomix use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Repomix?

Skills that share tags, products or a category with Repomix: Repomix (Microck/ordinary-claude-skills, 404 stars), Security Scan (affaan-m/ECC, 276k stars), Security Scan (affaan-m/ECC, 276k stars) and Review Swarm (Dimillian/Skills, 4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Repomix?

einverne (a GitHub user) maintains it in einverne/dotfiles, which has 121 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on September 9, 2026.

Source: einverne/dotfiles on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.