Repomix
v1.19.0Pack local or remote codebases into AI-friendly files that LLMs and coding agents can read or search
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
pack_codebase Pack Local Codebase
Package a local code directory into a consolidated file for AI analysis. This tool analyzes the codebase structure, extracts relevant code content, and generates a comprehensive report including metrics, file tree, and formatted code content. Supports multiple output formats: XML (structured with <file> tags), Markdown (human-readable with ## headers and code blocks), JSON (machine-readable with files as key-value pairs), and Plain text (simple format with separators). Also supports Tree-sitter compression for efficient token usage.
| Parameter | Type | Description |
|---|---|---|
directory * | string | Directory to pack (Absolute path). Any directory readable by this process can be packed. |
compress | boolean | 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 ne… |
ignorePatterns | string | 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 and… |
includePatterns | string | 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. Useful for focusing on spec… |
outputPatterns | array | Per-file inclusion levels. Patterns are evaluated in order and the first match wins; directoryStructureOnly takes precedence over compress, and a match with neither flag forces FULL content (use this… |
style | string | Output format style: xml (structured tags, default), markdown (human-readable with code blocks), json (machine-readable key-value), or plain (simple text with separators) |
topFilesLength | integer | Number of largest files by size to display in the metrics summary for codebase analysis (default: 10) |
read_repomix_output Read Repomix Output
Read the contents of a Repomix-generated output file. Supports partial reading with line range specification for large files. This tool is designed for environments where direct file system access is limited (e.g., web-based environments, sandboxed applications). For direct file system access, use standard file operations.
| Parameter | Type | Description |
|---|---|---|
outputId * | string | ID of the Repomix output file to read |
endLine | number | Ending line number (1-based, inclusive). If not specified, reads to end. |
startLine | number | Starting line number (1-based, inclusive). If not specified, reads from beginning. |
grep_repomix_output Grep Repomix Output
Search for patterns in a Repomix output file using grep-like functionality with JavaScript RegExp syntax. Returns matching lines with optional context lines around matches.
| Parameter | Type | Description |
|---|---|---|
outputId * | string | ID of the Repomix output file to search |
pattern * | string | Search pattern (JavaScript RegExp regular expression syntax) |
afterLines | number | Number of context lines to show after each match (like grep -A). Takes precedence over contextLines. |
beforeLines | number | Number of context lines to show before each match (like grep -B). Takes precedence over contextLines. |
contextLines | number | Number of context lines to show before and after each match (default: 0). Overridden by beforeLines/afterLines if specified. |
ignoreCase | boolean | Perform case-insensitive matching (default: false) |
pack_remote_repository Pack Remote Repository
Fetch, clone, and package a GitHub repository into a consolidated file for AI analysis. This tool automatically clones the remote repository, analyzes its structure, and generates a comprehensive report. Supports multiple output formats: XML (structured with <file> tags), Markdown (human-readable with ## headers and code blocks), JSON (machine-readable with files as key-value pairs), and Plain text (simple format with separators). Also supports various GitHub URL formats. Files matching known secret formats are excluded, but that scan is a heuristic, not an access boundary.
| Parameter | Type | Description |
|---|---|---|
remote * | string | 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 | boolean | 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 ne… |
ignorePatterns | string | 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 and… |
includePatterns | string | 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. Useful for focusing on spec… |
outputPatterns | array | Per-file inclusion levels. Patterns are evaluated in order and the first match wins; directoryStructureOnly takes precedence over compress, and a match with neither flag forces FULL content (use this… |
style | string | Output format style: xml (structured tags, default), markdown (human-readable with code blocks), json (machine-readable key-value), or plain (simple text with separators) |
topFilesLength | integer | Number of largest files by size to display in the metrics summary for codebase analysis (default: 10) |
generate_skill Generate Claude Agent Skill
Generate a Claude Agent Skill from a local code directory. Creates a skill package containing SKILL.md (entry point with metadata) and references/ folder with summary.md, project-structure.md, files.md, and optionally tech-stacks.md. This tool creates Project Skills in <project>/.claude/skills/<name>/, which are shared with the team via version control. Output Structure: .claude/skills/<skill-name>/ ├── SKILL.md # Entry point with usage guide └── references/ ├── summary.md # Purpose, format, and statistics ├── project-…
| Parameter | Type | Description |
|---|---|---|
directory * | string | Directory to pack (Absolute path) |
compress | boolean | Enable Tree-sitter compression to extract essential code signatures and structure while removing implementation details (default: false). |
ignorePatterns | string | Specify additional files to exclude using fast-glob patterns. Multiple patterns can be comma-separated (e.g., "test/**,*.spec.js"). |
includePatterns | string | Specify files to include using fast-glob patterns. Multiple patterns can be comma-separated (e.g., "**/*.{js,ts}", "src/**,docs/**"). |
skillName | string | Name of the skill to generate (kebab-case, max 64 chars). Will be normalized if not in kebab-case. Used for the skill directory name and SKILL.md metadata. If omitted, auto-generates as "repomix-refer… |
attach_packed_output Attach Packed Output
Attach an existing Repomix packed output file for AI analysis. This tool accepts either a directory containing a repomix output file or a direct path to a packed repository file. Supports multiple formats: XML (structured with <file> tags), Markdown (human-readable with ## headers and code blocks), JSON (machine-readable with files as key-value pairs), and Plain text (simple format with separators). Calling the tool again with the same file path will refresh the content if the file has been updated. It will return in that case a new output ID and the updated content.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to a directory containing repomix output file or direct path to a packed repository file (supports .xml, .md, .txt, .json formats) |
topFilesLength | integer | Number of largest files by size to display in the metrics summary (default: 10) |