AI Skill Hub 强烈推荐:Repomix仓库打包工具 是一款优质的MCP工具。在 GitHub 上收获超过 24.9k 颗 Star,AI 综合评分 8.5 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
将整个代码仓库打包成单一文件的强大工具,支持MCP协议,便于将项目上下文发送给AI模型。适合开发者、AI工程师快速共享项目信息,提高AI辅助编程效率。
Repomix仓库打包工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
将整个代码仓库打包成单一文件的强大工具,支持MCP协议,便于将项目上下文发送给AI模型。适合开发者、AI工程师快速共享项目信息,提高AI辅助编程效率。
Repomix仓库打包工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/yamadashy/repomix
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"repomix------": {
"command": "npx",
"args": ["-y", "repomix"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 Repomix仓库打包工具 执行以下任务... Claude: [自动调用 Repomix仓库打包工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"repomix______": {
"command": "npx",
"args": ["-y", "repomix"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
.gitignore, .ignore, and .repomixignore files.--compress option uses Tree-sitter to extract key code elements, reducing token count while preserving structure.npm install -g repomix
You can also run Repomix using Docker. This is useful if you want to run Repomix in an isolated environment or prefer using containers.
Basic usage (current directory):
docker run -v .:/app -it --rm ghcr.io/yamadashy/repomix
To pack a specific directory:
docker run -v .:/app -it --rm ghcr.io/yamadashy/repomix path/to/directory
Process a remote repository and output to a output directory:
docker run -v ./output:/app -it --rm ghcr.io/yamadashy/repomix --remote https://github.com/yamadashy/repomix
/plugin install repomix-mcp@repomix
/plugin install repomix-commands@repomix
/plugin install repomix-explorer@repomix
**Note**: The `repomix-mcp` plugin is recommended as a foundation. The `repomix-commands` plugin provides convenient slash commands, while `repomix-explorer` adds AI-powered analysis capabilities. While you can install them independently, using all three provides the most comprehensive experience.
**Alternatively, use the interactive plugin installer:**
text /plugin
This will open an interactive interface where you can browse and install available plugins.
#### Available Plugins
**1. repomix-mcp** (MCP Server Plugin)
Foundation plugin that provides AI-powered codebase analysis through MCP server integration.
**Features:**
- Pack local and remote repositories
- Search through packed outputs
- Read files with built-in security scanning (Secretlint)
- Automatic Tree-sitter compression (~70% token reduction)
**2. repomix-commands** (Slash Commands Plugin)
Provides convenient slash commands for quick operations with natural language support.
**Available Commands:**
- `/repomix-commands:pack-local` - Pack local codebase with various options
- `/repomix-commands:pack-remote` - Pack and analyze remote GitHub repositories
**Example usage:**text /repomix-commands:pack-local Pack this project as markdown with compression
/repomix-commands:pack-remote yamadashy/repomix Pack only TypeScript files from the yamadashy/repomix repository
**3. repomix-explorer** (AI Analysis Agent Plugin)
AI-powered repository analysis agent that intelligently explores codebases using Repomix CLI.
**Features:**
- Natural language codebase exploration and analysis
- Intelligent pattern discovery and code structure understanding
- Incremental analysis using grep and targeted file reading
- Automatic context management for large repositories
**Available Commands:**
- `/repomix-explorer:explore-local` - Analyze local codebase with AI assistance
- `/repomix-explorer:explore-remote` - Analyze remote GitHub repositories with AI assistance
**Example usage:**text /repomix-explorer:explore-local ./src Find all authentication-related code
/repomix-explorer:explore-remote facebook/react Show me the main component architecture ```
The agent automatically: 1. Runs npx repomix@latest to pack the repository 2. Uses Grep and Read tools to efficiently search the output 3. Provides comprehensive analysis without consuming excessive context
npx repomix@latest for up-to-date featuresFor more details, see the plugin documentation in the .claude/plugins/ directory.
To pack your entire repository:
repomix
To pack a specific directory:
repomix path/to/directory
To pack specific files or directories using glob patterns:
repomix --include "src/**/*.ts,**/*.md"
To exclude specific files or directories:
repomix --ignore "**/*.log,tmp/"
To pack a remote repository:
```bash repomix --remote https://github.com/yamadashy/repomix
Once you have generated the packed file with Repomix, you can use it with AI tools like ChatGPT, DeepSeek, Perplexity, Gemini, Gemma, Llama, Grok, and more. Here are some example prompts to get you started:
For a comprehensive code review and refactoring suggestions:
This file contains my entire codebase. Please review the overall structure and suggest any improvements or refactoring opportunities, focusing on maintainability and scalability.
To generate project documentation:
Based on the codebase in this file, please generate a detailed README.md that includes an overview of the project, its main features, setup instructions, and usage examples.
For generating test cases:
Analyze the code in this file and suggest a comprehensive set of unit tests for the main functions and classes. Include edge cases and potential error scenarios.
Evaluate code quality and adherence to best practices:
Review the codebase for adherence to coding best practices and industry standards. Identify areas where the code could be improved in terms of readability, maintainability, and efficiency. Suggest specific changes to align the code with best practices.
Get a high-level understanding of the library
This file contains the entire codebase of library. Please provide a comprehensive overview of the library, including its main purpose, key features, and overall architecture.
Feel free to modify these prompts based on your specific needs and the capabilities of the AI tool you're using.
repomix
repomix --stdout | llm "Please explain what this code does."
repomix --remote user/repo --skill-generate my-skill --skill-output ./output --force
#### Generated Structure
The Skills are generated with the following structure:
text .claude/skills/<skill-name>/ ├── SKILL.md # Main Skills metadata & documentation └── references/ ├── summary.md # Purpose, format, and statistics ├── project-structure.md # Directory tree with line counts ├── files.md # All file contents (grep-friendly) └── tech-stacks.md # Languages, frameworks, dependencies
#### What's Included
- **SKILL.md**: Contains Skills metadata, file/line/token counts, overview, and usage instructions
- **summary.md**: Explains the Skills' purpose, usage guidelines, and provides statistics breakdown by file type and language
- **project-structure.md**: Directory tree with line counts per file for easy file discovery
- **files.md**: All file contents with syntax highlighting headers, optimized for grep-friendly searching
- **tech-stacks.md**: Auto-detected tech stack per package from dependency files (`package.json`, `requirements.txt`, `Cargo.toml`, etc.)
#### Auto-Generated Skills Names
If no name is provided, Repomix auto-generates one:
bash repomix src/ --skill-generate # → repomix-reference-src repomix --remote user/repo --skill-generate # → repomix-reference-repo repomix --skill-generate CustomName # → custom-name (normalized to kebab-case)
#### Integration with Repomix Features
Skills generation respects all standard Repomix options:
bash
Example configuration:
{
"$schema": "https://repomix.com/schemas/latest/schema.json",
"input": {
"maxFileSize": 50000000
},
"output": {
"filePath": "repomix-output.xml",
"style": "xml",
"parsableStyle": false,
"compress": false,
"headerText": "Custom header information for the packed file.",
"fileSummary": true,
"directoryStructure": true,
"files": true,
"removeComments": false,
"removeEmptyLines": false,
"topFilesLength": 5,
"tokenCountTree": false, // or true, or a number like 10 for minimum token threshold
"showLineNumbers": false,
"truncateBase64": false,
"copyToClipboard": false,
"splitOutput": null, // or a number like 1000000 for ~1MB per file
"includeEmptyDirectories": false,
"git": {
"sortByChanges": true,
"sortByChangesMaxCommits": 100,
"includeDiffs": false,
"includeLogs": false,
"includeLogsCount": 50
}
},
"include": ["**/*"],
"ignore": {
"useGitignore": true,
"useDefaultPatterns": true,
// Patterns can also be specified in .repomixignore
"customPatterns": [
"additional-folder",
"**/*.log"
],
},
"security": {
"enableSecurityCheck": true
},
"tokenCount": {
"encoding": "o200k_base"
}
}
#### Basic Options - -v, --version: Show version information and exit
| Option | Description |
|---|---|
--verbose | Enable detailed debug logging (shows file processing, token counts, and configuration details) |
--quiet | Suppress all console output except errors (useful for scripting) |
--stdout | Write packed output directly to stdout instead of a file (suppresses all logging) |
--stdin | Read file paths from stdin, one per line (specified files are processed directly) |
--copy | Copy the generated output to system clipboard after processing |
--token-count-tree [threshold] | Show file tree with token counts; optional threshold to show only files with ≥N tokens (e.g., --token-count-tree 100) |
--top-files-len <number> | Number of largest files to show in summary (default: 5) |
| Option | Description |
|---|---|
-o, --output <file> | Output file path (default: repomix-output.xml, use "-" for stdout) |
--style <style> | Output format: xml, markdown, json, or plain (default: xml) |
--parsable-style | Escape special characters to ensure valid XML/Markdown (needed when output contains code that breaks formatting) |
--compress | Extract essential code structure (classes, functions, interfaces) using Tree-sitter parsing |
--output-show-line-numbers | Prefix each line with its line number in the output |
--no-file-summary | Omit the file summary section from output |
--no-directory-structure | Omit the directory tree visualization from output |
--no-files | Generate metadata only without file contents (useful for repository analysis) |
--remove-comments | Strip all code comments before packing |
--remove-empty-lines | Remove blank lines from all files |
--truncate-base64 | Truncate long base64 data strings to reduce output size |
--header-text <text> | Custom text to include at the beginning of the output |
--instruction-file-path <path> | Path to file containing custom instructions to include in output |
--split-output <size> | Split output into multiple numbered files (e.g., repomix-output.1.xml); size like 500kb, 2mb, or 1.5mb |
--include-empty-directories | Include folders with no files in directory structure |
--include-full-directory-structure | Show complete directory tree in output, including files not matched by --include patterns |
--no-git-sort-by-changes | Don't sort files by git change frequency (default: most changed files first) |
--include-diffs | Add git diff section showing working tree and staged changes |
--include-logs | Add git commit history with messages and changed files |
--include-logs-count <count> | Number of recent commits to include with --include-logs (default: 50) |
| Option | Description |
|---|---|
--include <patterns> | Include only files matching these glob patterns (comma-separated, e.g., "src/**/*.js,*.md") |
-i, --ignore <patterns> | Additional patterns to exclude (comma-separated, e.g., "*.test.js,docs/**") |
--no-gitignore | Don't use .gitignore rules for filtering files |
--no-dot-ignore | Don't use .ignore rules for filtering files |
--no-default-patterns | Don't apply built-in ignore patterns (node_modules, .git, build dirs, etc.) |
| Option | Description |
|---|---|
--remote <url> | Clone and pack a remote repository (GitHub URL or user/repo format) |
--remote-branch <name> | Specific branch, tag, or commit to use (default: repository's default branch) |
--remote-trust-config | Trust and load config files from remote repositories (disabled by default for security) |
| Option | Description |
|---|---|
-c, --config <path> | Use custom config file instead of repomix.config.json |
--init | Create a new repomix.config.json file with defaults |
--global | With --init, create config in home directory instead of current directory |
#### Security Options - --no-security-check: Skip scanning for sensitive data like API keys and passwords
#### Token Count Options - --token-count-encoding <encoding>: Tokenizer model for counting: o200k_base (GPT-4o), cl100k_base (GPT-3.5/4), etc. (default: o200k_base)
#### MCP - --mcp: Run as Model Context Protocol server for AI tool integration
| Option | Description |
|---|---|
--skill-generate [name] | Generate Claude Agent Skills format output to .claude/skills/<name>/ directory (name auto-generated if omitted) |
--skill-output <path> | Specify skill output directory path directly (skips location prompt) |
-f, --force | Skip all confirmation prompts (e.g., skill directory overwrite) |
```bash
repomix --remote https://github.com/yamadashy/repomix --remote-branch main
repomix --remote https://github.com/yamadashy/repomix --remote-branch 935b695
Repomix supports multiple configuration file formats for flexibility and ease of use.
Repomix will automatically search for configuration files in the following priority order:
repomix.config.ts, repomix.config.mts, repomix.config.cts)repomix.config.js, repomix.config.mjs, repomix.config.cjs)repomix.config.json5, repomix.config.jsonc, repomix.config.json)Create a repomix.config.json file in your project root:
repomix --init
This will create a repomix.config.json file with default settings.
TypeScript configuration files provide the best developer experience with full type checking and IDE support.
Installation:
To use TypeScript or JavaScript configuration with defineConfig, you need to install Repomix as a dev dependency:
npm install -D repomix
Example:
// repomix.config.ts
import { defineConfig } from 'repomix';
export default defineConfig({
output: {
filePath: 'output.xml',
style: 'xml',
removeComments: true,
},
ignore: {
customPatterns: ['**/node_modules/**', '**/dist/**'],
},
});
Benefits: - ✅ Full TypeScript type checking in your IDE - ✅ Excellent IDE autocomplete and IntelliSense - ✅ Use dynamic values (timestamps, environment variables, etc.)
Dynamic Values Example:
// repomix.config.ts
import { defineConfig } from 'repomix';
// Generate timestamp-based filename
const timestamp = new Date().toISOString().slice(0, 19).replace(/[:.]/g, '-');
export default defineConfig({
output: {
filePath: `output-${timestamp}.xml`,
style: 'xml',
},
});
JavaScript configuration files work the same as TypeScript, supporting defineConfig and dynamic values.
Here's an explanation of the configuration options:
| Option | Description | Default |
|---|---|---|
input.maxFileSize | Maximum file size in bytes to process. Files larger than this will be skipped | 50000000 |
output.filePath | The name of the output file | "repomix-output.xml" |
output.style | The style of the output (xml, markdown, json, plain) | "xml" |
output.parsableStyle | Whether to escape the output based on the chosen style schema. Note that this can increase token count. | false |
output.compress | Whether to perform intelligent code extraction to reduce token count | false |
output.headerText | Custom text to include in the file header | null |
output.instructionFilePath | Path to a file containing detailed custom instructions | null |
output.fileSummary | Whether to include a summary section at the beginning of the output | true |
output.directoryStructure | Whether to include the directory structure in the output | true |
output.files | Whether to include file contents in the output | true |
output.removeComments | Whether to remove comments from supported file types | false |
output.removeEmptyLines | Whether to remove empty lines from the output | false |
output.showLineNumbers | Whether to add line numbers to each line in the output | false |
output.truncateBase64 | Whether to truncate long base64 data strings (e.g., images) to reduce token count | false |
output.copyToClipboard | Whether to copy the output to system clipboard in addition to saving the file | false |
output.splitOutput | Split output into multiple numbered files by maximum size per part (e.g., 1000000 for ~1MB). Keeps each file under the limit and avoids splitting files across parts | Not set |
output.topFilesLength | Number of top files to display in the summary. If set to 0, no summary will be displayed | 5 |
output.tokenCountTree | Whether to display file tree with token count summaries. Can be boolean or number (minimum token count threshold) | false |
output.includeEmptyDirectories | Whether to include empty directories in the repository structure | false |
output.includeFullDirectoryStructure | When using include patterns, whether to display the complete directory tree (respecting ignore patterns) while still processing only the included files. Provides full repository context for AI analysis | false |
output.git.sortByChanges | Whether to sort files by git change count (files with more changes appear at the bottom) | true |
output.git.sortByChangesMaxCommits | Maximum number of commits to analyze for git changes | 100 |
output.git.includeDiffs | Whether to include git diffs in the output (includes both work tree and staged changes separately) | false |
output.git.includeLogs | Whether to include git logs in the output (includes commit history with dates, messages, and file paths) | false |
output.git.includeLogsCount | Number of git log commits to include | 50 |
include | Patterns of files to include (using [glob patterns](https://github.com/mrmlnc/fast-glob?tab=readme-ov-file#pattern-syntax)) | [] |
ignore.useGitignore | Whether to use patterns from the project's .gitignore file | true |
ignore.useDotIgnore | Whether to use patterns from the project's .ignore file | true |
ignore.useDefaultPatterns | Whether to use default ignore patterns | true |
ignore.customPatterns | Additional patterns to ignore (using [glob patterns](https://github.com/mrmlnc/fast-glob?tab=readme-ov-file#pattern-syntax)) | [] |
security.enableSecurityCheck | Whether to perform security checks on files | true |
tokenCount.encoding | Token count encoding for OpenAI-compatible tokenization (e.g., o200k_base for GPT-4o, cl100k_base for GPT-4/3.5). Powered by [gpt-tokenizer](https://github.com/nicolo-ribaudo/gpt-tokenizer). | "o200k_base" |
The configuration file supports JSON5 syntax, which allows: - Comments (both single-line and multi-line) - Trailing commas in objects and arrays - Unquoted property names - More relaxed string syntax
To create a global configuration file:
repomix --init --global
The global configuration file will be created in:
%LOCALAPPDATA%\Repomix\repomix.config.json$XDG_CONFIG_HOME/repomix/repomix.config.json or `~/.coYou can try Repomix instantly in your project directory without installation:
npx repomix@latest
Or install globally for repeated use:
```bash
Get instant access to Repomix directly from any GitHub repository! Our Chrome extension adds a convenient "Repomix" button to GitHub repository pages.

#### Install - Chrome Extension: Repomix - Chrome Web Store - Firefox Add-on: Repomix - Firefox Add-ons
#### Features - One-click access to Repomix for any GitHub repository - More exciting features coming soon!
A community-maintained VSCode extension called Repomix Runner (created by massdo) lets you run Repomix right inside your editor with just a few clicks. Run it on any folder, manage outputs seamlessly, and control everything through VSCode's intuitive interface.
Want your output as a file or just the content? Need automatic cleanup? This extension has you covered. Plus, it works smoothly with your existing repomix.config.json.
Try it now on the VSCode Marketplace! Source code is available on GitHub.
cat repomix-output.json | jq -r '.files | keys[] | select(endswith(".ts"))'
Repomix supports the Model Context Protocol (MCP), allowing AI assistants to directly interact with your codebase. When run as an MCP server, Repomix provides tools that enable AI assistants to package local or remote repositories for analysis without requiring manual file preparation.
repomix --mcp
To use Repomix as an MCP server with AI assistants like Claude, you need to configure the MCP settings:
For VS Code:
You can install the Repomix MCP server in VS Code using one of these methods:
code --add-mcp '{"name":"repomix","command":"npx","args":["-y","repomix","--mcp"]}'
For VS Code Insiders:
code-insiders --add-mcp '{"name":"repomix","command":"npx","args":["-y","repomix","--mcp"]}'
For Cline (VS Code extension):
Edit the cline_mcp_settings.json file:
{
"mcpServers": {
"repomix": {
"command": "npx",
"args": [
"-y",
"repomix",
"--mcp"
]
}
}
}
For Cursor:
In Cursor, add a new MCP server from Cursor Settings > MCP > + Add new global MCP server with a configuration similar to Cline.
For Claude Desktop:
Edit the claude_desktop_config.json file with similar configuration to Cline's config.
For Claude Code:
To configure Repomix as an MCP server in Claude Code, use the following command:
claude mcp add repomix -- npx -y repomix --mcp
Alternatively, you can use the official Repomix plugins (see Claude Code Plugins section below).
Using Docker instead of npx:
You can use Docker as an alternative to npx for running Repomix as an MCP server:
{
"mcpServers": {
"repomix-docker": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/yamadashy/repomix",
"--mcp"
]
}
}
}
Once configured, your AI assistant can directly use Repomix's capabilities to analyze codebases without manual file preparation, making code analysis workflows more efficient.
When running as an MCP server, Repomix provides the following tools:
1. pack_codebase: Package a local code directory into a consolidated XML file for AI analysis - Parameters: - directory: Absolute path to the directory to pack - compress: (Optional, default: false) Enable Tree-sitter compression to extract essential code signatures and structure while removing implementation details. Reduces token usage by ~70% while preserving semantic meaning. Generally not needed since grep_repomix_output allows incremental content retrieval. Use only when you specifically need the entire codebase content for large repositories. - includePatterns: (Optional) Specify files to include using fast-glob patterns. Multiple patterns can be comma-separated (e.g., "**/.{js,ts}", "src/,docs/"). Only matching files will be processed. - ignorePatterns: (Optional) Specify additional files to exclude using fast-glob patterns. Multiple patterns can be comma-separated (e.g., "test/*,*.spec.js", "node_modules/,dist/"). These patterns supplement .gitignore, .ignore, and built-in exclusions. - topFilesLength: (Optional, default: 10) Number of largest files by size to display in the metrics summary for codebase analysis.
2. attach_packed_output: Attach an existing Repomix packed output file for AI analysis - Parameters: - path: Path to a directory containing repomix-output.xml or direct path to a packed repository XML file - topFilesLength: (Optional, default: 10) Number of largest files by size to display in the metrics summary - Features: - Accepts either a directory containing a repomix-output.xml file or a direct path to an XML file - Registers the file with the MCP server and returns the same structure as the pack_codebase tool - Provides secure access to existing packed outputs without requiring re-processing - Useful for working with previously generated packed repositories
3. pack_remote_repository: Fetch, clone, and package a GitHub repository into a consolidated XML file for AI analysis - Parameters: - remote: GitHub repository URL or user/repo format (e.g., "yamadashy/repomix", "https://github.com/user/repo", or "https://github.com/user/repo/tree/branch") - compress: (Optional, default: false) Enable Tree-sitter compression to extract essential code signatures and structure while removing implementation details. Reduces token usage by ~70% while preserving semantic meaning. Generally not needed since grep_repomix_output allows incremental content retrieval. Use only when you specifically need the entire codebase content for large repositories. - includePatterns: (Optional) Specify files to include using fast-glob patterns. Multiple patterns can be comma-separated (e.g., "**/.{js,ts}", "src/,docs/"). Only matching files will be processed. - ignorePatterns: (Optional) Specify additional files to exclude using fast-glob patterns. Multiple patterns can be comma-separated (e.g., "test/*,*.spec.js", "node_modules/,dist/"). These patterns supplement .gitignore, .ignore, and built-in exclusions. - topFilesLength: (Optional, default: 10) Number of largest files by size to display in the metrics summary for codebase analysis.
4. read_repomix_output: Read the contents of a Repomix-generated output file. Supports partial reading with line range specification for large files. - Parameters: - outputId: ID of the Repomix output file to read - startLine: (Optional) Starting line number (1-based, inclusive). If not specified, reads from beginning. - endLine: (Optional) Ending line number (1-based, inclusive). If not specified, reads to end. - Features: - Specifically designed for web-based environments or sandboxed applications - Retrieves the content of previously generated outputs using their ID - Provides secure access to packed codebase without requiring file system access - Supports partial reading for large files
5. grep_repomix_output: Search for patterns in a Repomix output file using grep-like functionality with JavaScript RegExp syntax - Parameters: - outputId: ID of the Repomix output file to search - pattern: Search pattern (JavaScript RegExp regular expression syntax) - contextLines: (Optional, default: 0) Number of context lines to show before and after each match. Overridden by beforeLines/afterLines if specified. - beforeLines: (Optional) Number of context lines to show before each match (like grep -B). Takes precedence over contextLines. - afterLines: (Optional) Number of context lines to show after each match (like grep -A). Takes precedence over contextLines. - ignoreCase: (Optional, default: false) Perform case-insensitive matching - Features: - Uses JavaScript RegExp syntax for powerful pattern matching - Supports context lines for better understanding of matches - Allows separate control of before/after context lines - Case-sensitive and case-insensitive search options
6. file_system_read_file: Read a file from the local file system using an absolute path. Includes built-in security validation to detect and prevent access to files containing sensitive information. - Parameters: - path: Absolute path to the file to read - Security features: - Implements security validation using Secretlint - Prevents access to files containing sensitive information (API keys, passwords, secrets) - Validates absolute paths to prevent directory traversal attacks
7. file_system_read_directory: List the contents of a directory using an absolute path. Returns a formatted list showing files and subdirectories with clear indicators. - Parameters: - path: Absolute path to the directory to list - Features: - Shows files and directories with clear indicators ([FILE] or [DIR]) - Provides safe directory traversal with proper error handling - Validates paths and ensures they are absolute - Useful for exploring project structure and understanding codebase organization
Repomix provides official plugins for Claude Code that integrate seamlessly with the AI-powered development environment.
1. Add the Repomix plugin marketplace:
/plugin marketplace add yamadashy/repomix
2. Install plugins:
```text
yarn global add repomix
bun add -g repomix
brew install repomix
If you're using Python, you might want to check out Gitingest, which is better suited for Python ecosystem and data science workflows: https://github.com/cyclotruc/gitingest
Repomix 是一个用于优化代码仓库的工具,特别适合于 AI 的理解和处理。它可以格式化代码以便于 AI 处理,并提供 token 计数等功能。
Repomix 的功能包括 AI 优化、token 计数、简单易用的界面、可定制的配置和 Git 感知等。
可以使用 npm 安装 Repomix,或者使用 Docker 运行 Repomix。在 Docker 中,使用 `docker run` 命令即可启动 Repomix。还可以使用 MCP 服务器插件来安装 Repomix。
使用 Repomix 的方法包括:使用 `repomix` 命令来打包整个代码仓库,使用 `repomix path/to/directory` 命令来打包特定目录,使用 `repomix --include` 和 `repomix --ignore` 命令来指定打包和忽略的文件或目录。
Repomix 的配置包括基本选项(如版本信息和调试日志),CLI 输入/输出选项(如详细调试日志和静默模式),以及使用 `--remote-branch` 选项来指定远程分支的方法。
Repomix 可以使用 CLI 工具 `npx` 来直接在项目目录中使用,无需安装。还可以使用 Docker 来运行 Repomix。
Repomix 可以与 GitHub 的浏览器扩展和 VSCode 扩展结合使用。还可以使用 MCP 服务器插件来安装 Repomix。
高质量MCP工具,解决了AI工程中常见的项目上下文传递问题。设计简洁实用,社区活跃度高,是AI开发者的必备工具。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,Repomix仓库打包工具 是一款质量优秀的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | repomix |
| 原始描述 | 开源MCP工具:📦 Repomix is a powerful tool that packs your entire repository into a single, A。⭐24.9k · TypeScript |
| Topics | 代码仓库文件打包AI工程MCP协议上下文管理 |
| GitHub | https://github.com/yamadashy/repomix |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-05-16 · 更新时间:2026-05-19 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端