jpskill.com
💬 コミュニケーション コミュニティ

ck:repomix

Repomixは、コードをAIが扱いやすい形式に変換し、LLMの学習データ作成、セキュリティ監査、ライブラリ分析などに活用できる、開発資産を有効活用するSkill。

📜 元の英語説明(参考)

Pack repositories into AI-friendly files with Repomix (XML, Markdown, plain text). Use for codebase snapshots, LLM context preparation, security audits, third-party library analysis.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Repomixは、コードをAIが扱いやすい形式に変換し、LLMの学習データ作成、セキュリティ監査、ライブラリ分析などに活用できる、開発資産を有効活用するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o ck-repomix.zip https://jpskill.com/download/23654.zip && unzip -o ck-repomix.zip && rm ck-repomix.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/23654.zip -OutFile "$d\ck-repomix.zip"; Expand-Archive "$d\ck-repomix.zip" -DestinationPath $d -Force; ri "$d\ck-repomix.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して ck-repomix.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → ck-repomix フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
9

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] ck:repomix

Repomix スキル

Repomix は、リポジトリ全体を単一の AI フレンドリーなファイルにまとめます。Claude、ChatGPT、Gemini などの LLM にコードベースを供給するのに最適です。

使用する場面

以下の状況で使用します。

  • AI 分析のためにコードベースをパッケージ化する
  • LLM のコンテキストのためにリポジトリのスナップショットを作成する
  • サードパーティライブラリを分析する
  • セキュリティ監査に備える
  • ドキュメントのコンテキストを生成する
  • 大規模なコードベースでバグを調査する
  • AI フレンドリーなコード表現を作成する

クイックスタート

インストールの確認

repomix --version

インストール

# npm
npm install -g repomix

# Homebrew (macOS/Linux)
brew install repomix

基本的な使い方

# 現在のディレクトリをパッケージ化 (repomix-output.xml を生成)
repomix

# 出力形式を指定
repomix --style markdown
repomix --style json

# リモートリポジトリをパッケージ化
npx repomix --remote owner/repo

# フィルター付きのカスタム出力
repomix --include "src/**/*.ts" --remove-comments -o output.md

コア機能

リポジトリのパッケージ化

  • 明確な区切り文字による AI 最適化されたフォーマット
  • 複数の出力形式: XML、Markdown、JSON、プレーンテキスト
  • Git 対応の処理 (.gitignore を尊重)
  • LLM コンテキスト管理のためのトークンカウント
  • 機密情報に対するセキュリティチェック

リモートリポジトリのサポート

クローンせずにリモートリポジトリを処理します。

# 短縮形
npx repomix --remote yamadashy/repomix

# 完全な URL
npx repomix --remote https://github.com/owner/repo

# 特定のコミット
npx repomix --remote https://github.com/owner/repo/commit/hash

コメントの削除

サポートされている言語 (HTML、CSS、JavaScript、TypeScript、Vue、Svelte、Python、PHP、Ruby、C、C#、Java、Go、Rust、Swift、Kotlin、Dart、Shell、YAML) からコメントを削除します。

repomix --remove-comments

一般的な使用例

コードレビューの準備

# AI レビューのためにフィーチャーブランチをパッケージ化
repomix --include "src/**/*.ts" --remove-comments -o review.md --style markdown

セキュリティ監査

# サードパーティライブラリをパッケージ化
npx repomix --remote vendor/library --style xml -o audit.xml

ドキュメントの生成

# ドキュメントとコードをパッケージ化
repomix --include "src/**,docs/**,*.md" --style markdown -o context.md

バグ調査

# 特定のモジュールをパッケージ化
repomix --include "src/auth/**,src/api/**" -o debug-context.xml

実装計画

# コードベース全体のコンテキスト
repomix --remove-comments --copy

コマンドラインリファレンス

ファイル選択

# 特定のパターンを含める
repomix --include "src/**/*.ts,*.md"

# 追加のパターンを無視する
repomix -i "tests/**,*.test.js"

# .gitignore ルールを無効にする
repomix --no-gitignore

出力オプション

# 出力形式
repomix --style markdown  # または xml, json, plain

# 出力ファイルパス
repomix -o output.md

# コメントを削除する
repomix --remove-comments

# クリップボードにコピーする
repomix --copy

設定

# カスタム設定ファイルを使用する
repomix -c custom-config.json

# 新しい設定を初期化する
repomix --init  # repomix.config.json を作成します

トークン管理

Repomix は、個々のファイル、リポジトリ全体、および形式ごとの出力について、トークンを自動的にカウントします。

一般的な LLM のコンテキスト制限:

  • Claude Sonnet 4.5: 約 200K トークン
  • GPT-4: 約 128K トークン
  • GPT-3.5: 約 16K トークン

トークンカウントの最適化

コードベースのトークン分布を理解することは、AI との対話を最適化するために不可欠です。--token-count-tree オプションを使用して、プロジェクト全体のトークン使用量を視覚化します。

repomix --token-count-tree

これは、トークンカウントを含むコードベースの階層ビューを表示します。

🔢 Token Count Tree:
────────────────────
└── src/ (70,925 tokens)
    ├── cli/ (12,714 tokens)
    │   ├── actions/ (7,546 tokens)
    │   └── reporters/ (990 tokens)
    └── core/ (41,600 tokens)
        ├── file/ (10,098 tokens)
        └── output/ (5,808 tokens)

最小トークンしきい値を設定して、より大きなファイルに焦点を当てることもできます。

repomix --token-count-tree 1000  # 1000 トークン以上のファイル/ディレクトリのみを表示

これは、以下のことに役立ちます。

  • AI コンテキスト制限を超える可能性のあるトークン量の多いファイルを特定する
  • --include および --ignore パターンを使用してファイル選択を最適化する
  • 最大の貢献者をターゲットにして圧縮戦略を計画する
  • AI 分析のためにコードを準備する際に、コンテンツとコンテキストのバランスを取る

セキュリティに関する考慮事項

Repomix は Secretlint を使用して、機密データ (API キー、パスワード、認証情報、秘密鍵、AWS シークレット) を検出します。

ベストプラクティス:

  1. 共有する前に必ず出力を確認する
  2. 機密ファイルには .repomixignore を使用する
  3. 未知のコードベースに対してセキュリティチェックを有効にする
  4. .env ファイルのパッケージ化を避ける
  5. ハードコードされた認証情報を確認する

必要に応じてセキュリティチェックを無効にします。

repomix --no-security-check

実装ワークフロー

ユーザーがリポジトリのパッケージ化を要求した場合:

  1. 要件の評価

    • ターゲットリポジトリ (ローカル/リモート) を特定する
    • 必要な出力形式を決定する
    • 機密データに関する懸念を確認する
  2. フィルターの設定

    • 関連ファイルに含めるパターンを設定する
    • 不要なファイルに無視するパターンを追加する
    • コメント削除を有効/無効にする
  3. パッケージ化の実行

    • 適切なオプションで repomix を実行する
    • トークンカウントを監視する
    • セキュリティチェックを確認する
  4. 出力の検証

    • 生成されたファイルを確認する
    • 機密データがないことを確認する
    • ターゲット LLM のトークン制限を確認する
  5. コンテキストの提供

    • パッケージ化されたファイルをユーザーに提供する
    • トークンカウントの概要を含める
    • 警告や問題があればメモする

参考ドキュメント

詳細については、以下を参照してください。

  • Configuration Reference - 設定ファイル、インクルード/エクスクルードパターン、出力形式、高度なオプション
  • Usage Patterns - AI 分析ワークフロー、セキュリティ監査の準備、ドキュメント生成、ライブラリ評価

その他のリソース

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Repomix Skill

Repomix packs entire repositories into single, AI-friendly files. Perfect for feeding codebases to LLMs like Claude, ChatGPT, and Gemini.

When to Use

Use when:

  • Packaging codebases for AI analysis
  • Creating repository snapshots for LLM context
  • Analyzing third-party libraries
  • Preparing for security audits
  • Generating documentation context
  • Investigating bugs across large codebases
  • Creating AI-friendly code representations

Quick Start

Check Installation

repomix --version

Install

# npm
npm install -g repomix

# Homebrew (macOS/Linux)
brew install repomix

Basic Usage

# Package current directory (generates repomix-output.xml)
repomix

# Specify output format
repomix --style markdown
repomix --style json

# Package remote repository
npx repomix --remote owner/repo

# Custom output with filters
repomix --include "src/**/*.ts" --remove-comments -o output.md

Core Capabilities

Repository Packaging

  • 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

Remote Repository Support

Process remote repositories without cloning:

# Shorthand
npx repomix --remote yamadashy/repomix

# Full URL
npx repomix --remote https://github.com/owner/repo

# Specific commit
npx repomix --remote https://github.com/owner/repo/commit/hash

Comment Removal

Strip comments from supported languages (HTML, CSS, JavaScript, TypeScript, Vue, Svelte, Python, PHP, Ruby, C, C#, Java, Go, Rust, Swift, Kotlin, Dart, Shell, YAML):

repomix --remove-comments

Common Use Cases

Code Review Preparation

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

Security Audit

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

Documentation Generation

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

Bug Investigation

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

Implementation Planning

# Full codebase context
repomix --remove-comments --copy

Command Line Reference

File Selection

# Include specific patterns
repomix --include "src/**/*.ts,*.md"

# Ignore additional patterns
repomix -i "tests/**,*.test.js"

# Disable .gitignore rules
repomix --no-gitignore

Output Options

# Output format
repomix --style markdown  # or xml, json, plain

# Output file path
repomix -o output.md

# Remove comments
repomix --remove-comments

# Copy to clipboard
repomix --copy

Configuration

# Use custom config file
repomix -c custom-config.json

# Initialize new config
repomix --init  # creates repomix.config.json

Token Management

Repomix automatically counts tokens for individual files, total repository, and per-format output.

Typical LLM context limits:

  • Claude Sonnet 4.5: ~200K tokens
  • GPT-4: ~128K tokens
  • GPT-3.5: ~16K tokens

Token Count Optimization

Understanding your codebase's token distribution is crucial for optimizing AI interactions. Use the --token-count-tree option to visualize token usage across your project:

repomix --token-count-tree

This displays a hierarchical view of your codebase with token counts:

🔢 Token Count Tree:
────────────────────
└── src/ (70,925 tokens)
    ├── cli/ (12,714 tokens)
    │   ├── actions/ (7,546 tokens)
    │   └── reporters/ (990 tokens)
    └── core/ (41,600 tokens)
        ├── file/ (10,098 tokens)
        └── output/ (5,808 tokens)

You can also set a minimum token threshold to focus on larger files:

repomix --token-count-tree 1000  # Only show files/directories with 1000+ tokens

This helps you:

  • Identify token-heavy files that might exceed AI context limits
  • Optimize file selection using --include and --ignore patterns
  • Plan compression strategies by targeting the largest contributors
  • Balance content vs. context when preparing code for AI analysis

Security Considerations

Repomix uses Secretlint to detect sensitive data (API keys, passwords, credentials, private keys, AWS secrets).

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

Disable security checks if needed:

repomix --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
  2. Configure Filters

    • Set include patterns for relevant files
    • Add ignore patterns for unnecessary files
    • Enable/disable comment removal
  3. Execute Packaging

    • Run repomix with appropriate options
    • Monitor token counts
    • Verify security checks
  4. Validate Output

    • Review generated file
    • Confirm no sensitive data
    • Check token limits for target LLM
  5. Deliver Context

    • Provide packaged file to user
    • Include token count summary
    • Note any warnings or issues

Reference Documentation

For detailed information, see:

  • Configuration Reference - Config files, include/exclude patterns, output formats, advanced options
  • Usage Patterns - AI analysis workflows, security audit preparation, documentation generation, library evaluation

Additional Resources

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。