mcp-repomix
Repomix MCPサーバーを活用し、AI分析用にコードベースを統合ファイルにパッケージ化し、内容検索やプロジェクト構造を理解するSkill。
📜 元の英語説明(参考)
Use the Repomix MCP server to package codebase into consolidated files for AI analysis, search file contents, and understand project structure; essential for comprehensive codebase analysis and context gathering.
🇯🇵 日本人クリエイター向け解説
Repomix MCPサーバーを活用し、AI分析用にコードベースを統合ファイルにパッケージ化し、内容検索やプロジェクト構造を理解するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
MCPスキル: Repomix
範囲
.vscode/mcp.jsonでrepomixとして設定されたMCPサーバーを使用して、以下を実行します。
- コードベース全体をAI分析用の統合ファイルにパッケージ化する
- パッケージ化されたリポジトリの出力を検索し、grepする
- プロジェクト構造とファイル構成を理解する
- 大規模なリファクタリングのための包括的なコンテキストを提供する
前提条件
.vscode/mcp.jsonにrepomixという名前のサーバーエントリが含まれていることを確認してください。- Repomix MCPサーバーは、コードベースのパッケージングと分析のためのツールを提供します。
操作ルール
pack_codebaseを使用して、分析用の統合されたリポジトリスナップショットを作成しますgrep_repomix_outputを使用して、パッケージ化された出力内を検索しますattach_packed_outputを使用して、既存のRepomix出力ファイルをロードします- 大規模なリファクタリングの前に、コードベース全体のコンテキスト収集にはRepomixを優先してください
- LLMの理解度を高めるために、XMLまたはMarkdownの出力スタイルを使用してください
使用するタイミング
- 大規模なアーキテクチャ変更の前: コードベース全体の完全なスナップショットを取得します
- 横断的なリファクタリング: 複数の機能/レイヤーに影響する変更
- レガシーコードの理解: モジュール構造全体を分析します
- ドキュメント生成: 包括的なドキュメントのためにすべてのファイルを抽出します
- コードレビューの準備: 変更を完全なコンテキストでパッケージ化します
- 移行計画: 移行前にすべての依存関係を理解します
- パターン分析: コードベース全体で特定のパターンを検索します
利用可能な主要ツール
- pack_codebase - ローカルディレクトリを統合ファイルにパッケージ化します
- pack_remote_repository - GitHubリポジトリをクローンしてパッケージ化します
- attach_packed_output - 分析のために既存のパッケージ化された出力をロードします
- read_repomix_output - パッケージ化された出力から特定の行を読み取ります
- grep_repomix_output - パッケージ化された出力内のパターンを検索します
- generate_skill - コードベースからClaude Agent Skillを作成します
出力形式
- XML:
<file>タグで構造化されています(正確なパースに最適) - Markdown: コードブロック付きで人間が読めます(レビューに最適)
- JSON: 機械が読めるキーと値のペア
- Plain: 区切り文字付きのシンプルなテキスト
Black-Tortoiseワークフローとの統合
- 複雑なリファクタリング計画のために
mcp-sequential-thinkingと組み合わせます - 包括的な境界分析のために
architecture:gateを実行する前に使用します - DDDレイヤーの依存関係を理解するために不可欠です
- コードベース全体で「ディープインポートなし」ルールを検証するのに役立ちます
プロンプトテンプレート
- "Pack the codebase and analyze all DDD boundary violations"
- "Use Repomix to find all usages of [pattern] across the entire repository"
- "Package src/app/capabilities and identify cross-capability dependencies"
- "Create a full codebase snapshot before starting [major refactor]"
- "Search the packed repository for all event emission points"
ベストプラクティス
- 適切にスコープを設定する: トークンを削減するために、関連するディレクトリのみをパッケージ化します
- 圧縮を使用する: 大規模なコードベースにはTree-sitter圧縮を有効にします
- grepと組み合わせる: ターゲットを絞った検索には
grep_repomix_outputを使用します - シーケンシャルワークフロー: パッケージ化 → 分析 → 計画 → 実装
- バージョン管理: パッケージ化された出力を保存して、変更前後の比較を行います
ワークフロー例
ワークフロー1: クロス機能分析
1. pack_codebase(directory: "src/app/capabilities", compress: true)
2. grep_repomix_output(pattern: "import.*from.*@app/", contextLines: 3)
3. Identify violations of "no deep imports" rule
4. Use sequential-thinking to plan refactoring
ワークフロー2: イベントフロー分析
1. pack_codebase(directory: "src/app", includePatterns: "**/*.ts")
2. grep_repomix_output(pattern: "publishEvent|EventBus", contextLines: 5)
3. Map all event producers and consumers
4. Validate append-before-publish contract
ワークフロー3: 依存関係分析
1. pack_codebase(directory: "src/app", style: "json")
2. grep_repomix_output(pattern: "from ['\"]@angular/fire", contextLines: 2)
3. Ensure all Firebase imports are in integration layer only
4. Document violations for remediation
安全性とパフォーマンス
- 大規模リポジトリ:
compress: trueを使用してトークン使用量を約70%削減します - 増分分析: 再パッケージ化する代わりに
grep_repomix_outputを使用します - ファイル制限:
includePatternsとignorePatternsを使用してパッケージングのスコープを設定します - コンテキスト管理: パッケージ化された出力を一度アタッチし、複数のクエリで再利用します
Black-Tortoiseルールへの準拠
- オッカムの剃刀: 完全なコンテキストが本当に必要な場合にのみRepomixを使用します
- 最小限の変更: リファクタリングの最小変更範囲を特定するのに役立ちます
- DDD境界: レイヤーの依存関係を検証するために不可欠です
- ドキュメント: 包括的なプロジェクト構造ドキュメントを生成できます
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
MCP Skill: Repomix
Scope
Use the MCP server configured as repomix in .vscode/mcp.json to:
- Package entire codebase into consolidated files for AI analysis
- Search and grep through packed repository outputs
- Understand project structure and file organization
- Provide comprehensive context for large-scale refactoring
Preconditions
- Ensure
.vscode/mcp.jsoncontains a server entry namedrepomix. - The Repomix MCP server provides tools for codebase packaging and analysis.
Operating Rules
- Use
pack_codebaseto create consolidated repository snapshots for analysis - Use
grep_repomix_outputto search within packed outputs - Use
attach_packed_outputto load existing Repomix output files - Prefer Repomix for full codebase context gathering before major refactors
- Use XML or Markdown output styles for better LLM comprehension
When To Use
- Before major architectural changes: Get full codebase snapshot
- Cross-cutting refactors: Changes affecting multiple capabilities/layers
- Understanding legacy code: Analyze entire module structure
- Documentation generation: Extract all files for comprehensive docs
- Code review preparation: Package changes with full context
- Migration planning: Understand all dependencies before migration
- Pattern analysis: Search for specific patterns across entire codebase
Key Tools Available
- pack_codebase - Package local directory into consolidated file
- pack_remote_repository - Clone and package GitHub repository
- attach_packed_output - Load existing packed output for analysis
- read_repomix_output - Read specific lines from packed output
- grep_repomix_output - Search patterns in packed output
- generate_skill - Create Claude Agent Skill from codebase
Output Formats
- XML: Structured with
<file>tags (best for precise parsing) - Markdown: Human-readable with code blocks (best for review)
- JSON: Machine-readable key-value pairs
- Plain: Simple text with separators
Integration with Black-Tortoise Workflow
- Combine with
mcp-sequential-thinkingfor complex refactoring plans - Use before running
architecture:gatefor comprehensive boundary analysis - Essential for understanding DDD layer dependencies
- Helps validate "no deep imports" rule across entire codebase
Prompt Templates
- "Pack the codebase and analyze all DDD boundary violations"
- "Use Repomix to find all usages of [pattern] across the entire repository"
- "Package src/app/capabilities and identify cross-capability dependencies"
- "Create a full codebase snapshot before starting [major refactor]"
- "Search the packed repository for all event emission points"
Best Practices
- Scope appropriately: Pack only relevant directories to reduce tokens
- Use compression: Enable Tree-sitter compression for large codebases
- Combine with grep: Use grep_repomix_output for targeted searches
- Sequential workflow: Pack → Analyze → Plan → Implement
- Version control: Save packed outputs for before/after comparison
Example Workflows
Workflow 1: Cross-Capability Analysis
1. pack_codebase(directory: "src/app/capabilities", compress: true)
2. grep_repomix_output(pattern: "import.*from.*@app/", contextLines: 3)
3. Identify violations of "no deep imports" rule
4. Use sequential-thinking to plan refactoring
Workflow 2: Event Flow Analysis
1. pack_codebase(directory: "src/app", includePatterns: "**/*.ts")
2. grep_repomix_output(pattern: "publishEvent|EventBus", contextLines: 5)
3. Map all event producers and consumers
4. Validate append-before-publish contract
Workflow 3: Dependency Analysis
1. pack_codebase(directory: "src/app", style: "json")
2. grep_repomix_output(pattern: "from ['\"]@angular/fire", contextLines: 2)
3. Ensure all Firebase imports are in integration layer only
4. Document violations for remediation
Safety & Performance
- Large repositories: Use
compress: trueto reduce token usage by ~70% - Incremental analysis: Use
grep_repomix_outputinstead of re-packing - File limits: Use
includePatternsandignorePatternsto scope packing - Context management: Attach packed outputs once, reuse for multiple queries
Compliance with Black-Tortoise Rules
- Occam's Razor: Use Repomix only when full context is genuinely needed
- Minimal changes: Helps identify smallest change radius for refactors
- DDD boundaries: Essential for validating layer dependencies
- Documentation: Can generate comprehensive project structure docs