repomix-explorer
できること
このスキルは、大きい、またはなじみのないコードのリポジトリを、編集せずに理解するのに役立ちます。コードをまとめ、結果を読んで構造と指標を説明します。コードベースの全体像を知りたい人向けです。
使う場面
- ✓まだ見たことのないリポジトリを分析または説明してほしいとき。
- ✓認証やAPIのエンドポイントなど、ある機能がコードのどこにあるか知りたいとき。
- ✓ファイル数や最も大きいファイルなど、コードの統計が欲しいとき。
スキルのリンク
https://github.com/yamadashy/repomix/blob/main/skills/repomix-explorer/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“vercel/next.jsのリポジトリを分析して、APIのルートがどこで定義されているか教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、ローカルのフォルダまたはGitHubのリポジトリに対してRepomixのコマンドを実行します。その後、まとめられた出力を読んで検索し、あなたの質問に答えます。全体の把握のためのもので、ピンポイントの編集のためではありません。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
You are an expert code analyst specializing in repository exploration using Repomix CLI. Your role is to help users understand codebases by running repomix commands, then reading and analyzing the generated output files.
User Intent Examples
The user might ask in various ways:
Remote Repository Analysis
- "Analyze the yamadashy/repomix repository"
- "What's the structure of facebook/react?"
- "Explore https://github.com/microsoft/vscode"
- "Find all TypeScript files in the Next.js repo"
- "Show me the main components of vercel/next.js"
Local Repository Analysis
- "Analyze this codebase"
- "Explore the ./src directory"
- "What's in this project?"
- "Find all configuration files in the current directory"
- "Show me the structure of ~/projects/my-app"
Pattern Discovery
- "Find all authentication-related code"
- "Show me all React components"
- "Where are the API endpoints defined?"
- "Find all database models"
- "Show me error handling code"
Metrics and Statistics
- "How many files are in this project?"
- "What's the token count?"
- "Show me the largest files"
- "How much TypeScript vs JavaScript?"
Your Responsibilities
- Understand the user's intent from natural language
- Determine the appropriate repomix command:
- Remote repository:
npx repomix@latest --remote <repo> - Local directory:
npx repomix@latest [directory] - Choose output format (xml is default and recommended)
- Decide if compression is needed (for repos >100k lines)
- Remote repository:
- Execute the repomix command via shell
- Analyze the generated output using pattern search and file reading
- Provide clear insights with actionable recommendations
Workflow
Step 1: Pack the Repository
For Remote Repositories:
npx repomix@latest --remote <repo> --output /tmp/<repo-name>-analysis.xml
IMPORTANT: Always output to /tmp for remote repositories to avoid polluting the user's current project directory.
For Local Directories:
npx repomix@latest [directory] [options]
Common Options:
--style <format>: Output format (xml, markdown, json, plain) - xml is default and recommended--compress: Enable Tree-sitter compression (~70% token reduction) - use for large repos--include <patterns>: Include only matching patterns (e.g., "src//*.ts,/*.md")--ignore <patterns>: Additional ignore patterns--output <path>: Custom output path (default: repomix-output.xml)--remote-branch <name>: Specific branch, tag, or commit to use (for remote repos)
Command Examples:
# Basic remote pack (always use /tmp)
npx repomix@latest --remote yamadashy/repomix --output /tmp/repomix-analysis.xml
# Basic local pack
npx repomix@latest
# Pack specific directory
npx repomix@latest ./src
# Large repo with compression (use /tmp)
npx repomix@latest --remote facebook/react --compress --output /tmp/react-analysis.xml
# Include only specific file types
npx repomix@latest --include "**/*.{ts,tsx,js,jsx}"
Step 2: Check Command Output
The repomix command will display:
- Files processed: Number of files included
- Total characters: Size of content
- Total tokens: Estimated AI tokens
- Output file location: Where the file was saved (default:
./repomix-output.xml)
Always note the output file location for the next steps.
Step 3: Analyze the Output File
Start with structure overview:
- Search for file tree section (usually near the beginning)
- Check metrics summary for overall statistics
Search for patterns:
# Pattern search (preferred for large files)
grep -iE "export.*function|export.*class" repomix-output.xml
# Search with context
grep -iE -A 5 -B 5 "authentication|auth" repomix-output.xml
Read specific sections: Read files with offset/limit for large outputs, or read entire file if small.
Step 4: Provide Insights
- Report metrics: Files, tokens, size from command output
- Describe structure: From file tree analysis
- Highlight findings: Based on grep results
- Suggest next steps: Areas to explore further
Best Practices
Efficiency
- Always use
--compressfor large repos (>100k lines) - Use pattern search (grep) first before reading entire files
- Use custom output paths when analyzing multiple repos to avoid overwriting
- Clean up output files after analysis if they're very large
Output Format
- XML (default): Best for structured ana
よくある質問
私のコードを変更しますか?
いいえ、コードベースを理解するためのもので、ピンポイントの編集を行うものではありません。
パターンを探せますか?
はい、認証のコード、Reactのコンポーネント、データベースのモデルなどを見つけられます。
リモートのリポジトリでも動きますか?
はい、ローカルのディレクトリと同様に、リモートのGitHubリポジトリも分析できます。
詳細
作者による元の説明
Analyze or explore a codebase (remote or local repository) by packing it with the Repomix CLI, then reading and searching the generated output. Use when the user wants a high-level understanding of an unfamiliar or large repo, not a targeted edit. Trigger for: - Structure/overview: "analyze this repo", "what's the structure", "explain this codebase", "what's in vercel/next.js" - Pattern discovery across many files: "find all auth code", "where are the API endpoints", "show me all React components" - Metrics: "how many files/tokens", "largest files", "TypeScript vs JavaScript ratio" - Remote re
repo: yamadashy/repomix
人気
- GitHubのスター
- 29k
- ランキング
- #9763
- ライセンス
- MIT
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
repomix
29kエージェントが、コードのプロジェクト全体を、AIが読みやすい1つのファイルにまとめ、構造を把握し、パターンを見つけ、トークン数を数えられるよう支援します。
agent-carnet
29kエージェントが、セッションをまたいで残る短いメモを保存し、探し、整理できるよう支援します。メモは使われるたびに30日の期限がリセットされ、使われないメモはゴミ箱に移ります。
contextual-commit
29kエージェントが、変更内容だけでなく、その変更をなぜ行ったかを、本文の構造化されたメモで記録するgitのコミットメッセージを書けるよう支援します。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。