Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问clear审计提醒

repomixrepomix 工具

Agent Skill

repomix 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

760

周安装

32

GitHub Stars

10

下载量

266
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:repomix(repomix 工具)
来源仓库:https://github.com/samhvw8/dot-claude
仓库路径:skills/repomix
安装命令:
npx skills add https://github.com/samhvw8/dot-claude --skill repomix
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/samhvw8/dot-claude --skill repomix

简介

repomix 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。
  • 通过 npx skills add 命令从指定仓库安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • repomix 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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:

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 Usage

Package Current Directory

# 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

repomix /path/to/directory

Package Remote Repository

# 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

# 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

# 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

# Run security checks
repomix --no-security-check  # disable security scanning

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

# Verbose output
repomix --verbose

Configuration

# 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:

{
  "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:

repomix --style xml

Markdown Format

Human-readable with syntax highlighting:

repomix --style markdown

JSON Format

For programmatic processing:

repomix --style json

Plain Text

Simple concatenation:

repomix --style plain

Use Cases & Examples

1. Code Review Preparation

# Package feature branch for AI review
repomix --include "src/**/*.ts" --remove-comments -o feature-review.md --style markdown

2. Security Audit

# Package third-party library for analysis
npx repomix --remote vendor/library --style xml -o audit.xml

3. Documentation Generation

# Package with docs and code
repomix --include "src/**,docs/**,*.md" --style markdown -o context.md

4. Bug Investigation

# Package specific modules
repomix --include "src/auth/**,src/api/**" -o debug-context.xml

5. Implementation Planning

# 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:

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

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

# 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

# Package and analyze in one workflow
repomix --style markdown --copy
# Then paste into Claude for analysis

With CI/CD

# Generate codebase snapshot for releases
repomix --style markdown -o release-snapshot.md

With Git Hooks

# Pre-commit hook to generate context
repomix --include "src/**" -o .context/latest.xml

Common Patterns

Full Repository Package

repomix --remove-comments --style markdown -o full-repo.md

Source Code Only

repomix --include "src/**/*.{ts,tsx,js,jsx}" -i "**/*.test.*"

Documentation Bundle

repomix --include "**/*.md,docs/**" --style markdown

TypeScript Project

repomix --include "**/*.ts,**/*.tsx" --remove-comments --no-line-numbers

Remote Analysis

npx repomix --remote owner/repo --style xml -o analysis.xml

Troubleshooting

Issue: Output Too Large

# Exclude unnecessary files
repomix -i "node_modules/**,dist/**,coverage/**"

# Process specific directories
repomix --include "src/**"

Issue: Missing Files

# Disable .gitignore rules
repomix --no-gitignore

# Check ignore patterns
cat .repomixignore

Issue: Sensitive Data Warnings

# 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

  1. Configure Filters

- Set include patterns for relevant files - Add ignore patterns for unnecessary files - Enable/disable comment removal

  1. Execute Packaging

- Run repomix with appropriate options - Monitor token counts - Verify security checks

  1. Validate Output

- Review generated file - Confirm no sensitive data - Check token limits for target LLM

  1. 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

Related Tools

  • Context7: For up-to-date library documentation
  • Git: For repository history analysis
  • Secretlint: For security scanning
  • Token counters: For LLM context management

Additional Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.96%
按下载量换算77

windsurf

22.84%
按下载量换算61

Antigravity

17.36%
按下载量换算46

trae

11.48%
按下载量换算31

OpenCode

7.89%
按下载量换算21

Gemini CLI

2.97%
按下载量换算8

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills