Agent Skills by ALSEL
汎用ソフトウェア開発⭐ リポ 62品質スコア 87/100

repo-explorer

Claude Code CLI(`claude -p`)を使用して、ローカルパスまたはリモートのGitHub/GitLab URLのいずれかのリポジトリを探索・分析できます。読み取り専用アクセスで非対話型モードで実行します。ユーザーがリポジトリやコードベースの探索、分析、調査、研究をリクエストする際に使用してください。「リポジトリを探索」「リポジトリを分析」「リポジトリを調査」「コードベースを研究」「このリポジトリは何をするのか」「このコードベースはどのように動作するのか」「リポジトリについて質問」「コードベースの質問」「リポジトリを探索」「このプロジェクトのAPIは何か」「このGitHubリポジトリを分析」「https://github.com/...を探索」など、またはリポジトリの構造、API、アーキテクチャ、実装詳細を理解するリクエストに反応します。ローカルパスとリモートURL(GitHub、GitLab、Bitbucket)の両方に対応しています。

description の原文を見る

Explore and analyze any repository (local path or remote GitHub/GitLab URL) by delegating to Claude Code CLI (`claude -p`) in non-interactive mode with read-only access. Use when the user asks to explore, analyze, investigate, or research a repository or codebase. Triggers on "explore repo", "analyze repo", "investigate repo", "research codebase", "what does this repo do", "how does this codebase work", "ask about repo", "codebase question", "explore repository", "what API does this project have", "analyze this GitHub repo", "explore https://github.com/...", or any request to understand a repository's structure, API, architecture, or implementation details. Works with both local paths and remote URLs (GitHub, GitLab, Bitbucket).

SKILL.md 本文

Repo Explorer

読み取り専用ツールを備えたClaude Code CLIプロセス(claude -p --model haiku)を別途起動して、リポジトリを探索し、そのリポジトリに関する質問に答えます。ローカルリポジトリとリモートURLの両方に対応しています。

ワークフロー

1. リポジトリソースと質問を特定する

ユーザーのメッセージから以下を抽出します:

  • source: 以下のいずれか:
    • ローカルパス (~/projects/foo/opt/services/bar.または省略 = 現在のディレクトリ)
    • リモートURL (https://github.com/owner/repogit@github.com:owner/repo.git)
    • 短縮形 (owner/repohttps://github.com/owner/repoとして扱う)
  • question: リポジトリについて何を知りたいのか。

2. リモートリポジトリの場合 — テンポラリディレクトリにクローン

ソースがリモートURLまたは短縮形の場合、まずクローンします:

REPO_DIR=$(mktemp -d) && git clone --depth 1 <url> "$REPO_DIR" && echo "$REPO_DIR"
  • 速度向上のため--depth 1を使用(シャロークローン、最新コミットのみ)
  • ユーザーが特定のブランチ/タグについて問い合わせている場合: git clone --depth 1 --branch <ref> <url> "$REPO_DIR"
  • 後でクリーンアップするため$REPO_DIRを保存します

3. CLIコマンドを実行

timeout: 600000(10分)を指定してBashツールを使用します。大規模なリポジトリの探索には数分かかる場合があります。

cd <repo_path> && CLAUDECODE= claude -p "<question>" \
  --model haiku \
  --output-format text \
  --max-turns 15 \
  --allowedTools "Read" "Grep" "Glob" "Bash(find *)" "Bash(ls *)" "Bash(wc *)" "Bash(git log *)" "Bash(git show *)" "Bash(git diff *)" "Bash(git branch *)" "Bash(head *)" "Bash(tail *)" \
  --append-system-prompt "You are a code exploration expert. Thoroughly explore the repository to answer the user's question. Strategy: 1) Glob to discover project structure. 2) Grep to find patterns, definitions, routes, classes. 3) Read to examine key files. Always cite file paths and line numbers. Give a structured answer based on code facts."

重要: CLAUDECODE=プレフィックス(環境変数を空に設定)は、Claude Codeをサブプロセスとして起動するために必須です。これがないと、ネストされたセッションがブロックされます。

ルール:

  • 常にclaude -pの直前にCLAUDECODE=を含める(&&はなし、インライン環境変数オーバーライド)
  • 質問内のダブルクォートを\"でエスケープ
  • スペースを含むリポジトリパスはクォートで囲む
  • 非常に大規模なリポジトリの場合、--max-turnsを25に増やす
  • ユーザーが明示的にsonetまたはopusをリクエストしている場合、--model haikuに置き換える

4. クリーンアップ(リモートリポジトリのみ)

結果をユーザーに表示した後、テンポラリディレクトリを削除します:

rm -rf "$REPO_DIR"

5. 結果を表示

CLIの出力をユーザーに表示します。出力が空またはエラーの場合は、問題を報告し、より具体的な質問で再試行することを提案します。

ローカルリポジトリ:

cd ~/projects/my-api && CLAUDECODE= claude -p "What REST endpoints are defined? List each with HTTP method, path, and handler." --model haiku --output-format text --max-turns 15 --allowedTools "Read" "Grep" "Glob" "Bash(find *)" "Bash(ls *)" "Bash(wc *)" "Bash(git log *)" "Bash(git show *)" "Bash(git diff *)" "Bash(git branch *)" "Bash(head *)" "Bash(tail *)" --append-system-prompt "You are a code exploration expert. Thoroughly explore the repository to answer the user's question. Strategy: 1) Glob to discover project structure. 2) Grep to find patterns, definitions, routes, classes. 3) Read to examine key files. Always cite file paths and line numbers. Give a structured answer based on code facts."

リモートリポジトリ(GitHub URL):

REPO_DIR=$(mktemp -d) && git clone --depth 1 https://github.com/expressjs/express "$REPO_DIR"

その後:

cd "$REPO_DIR" && CLAUDECODE= claude -p "How is routing implemented? Describe the Router class and middleware chain." --model haiku --output-format text --max-turns 15 --allowedTools "Read" "Grep" "Glob" "Bash(find *)" "Bash(ls *)" "Bash(wc *)" "Bash(git log *)" "Bash(git show *)" "Bash(git diff *)" "Bash(git branch *)" "Bash(head *)" "Bash(tail *)" --append-system-prompt "You are a code exploration expert. Thoroughly explore the repository to answer the user's question. Strategy: 1) Glob to discover project structure. 2) Grep to find patterns, definitions, routes, classes. 3) Read to examine key files. Always cite file paths and line numbers. Give a structured answer based on code facts."

その後: rm -rf "$REPO_DIR"

短縮形(owner/repo): vercel/next.jshttps://github.com/vercel/next.jsとして扱います。

現在のディレクトリ(パスなし): cdなしでclaude -pを実行します。

ライセンス: MIT(寛容ライセンスのため全文を引用しています) · 原本リポジトリ

詳細情報

作者
CodeAlive-AI
リポジトリ
CodeAlive-AI/ai-driven-development
ライセンス
MIT
最終更新
2026/5/11

Source: https://github.com/CodeAlive-AI/ai-driven-development / ライセンス: MIT

本サイトは GitHub 上で公開されているオープンソースの SKILL.md ファイルをクロール・インデックス化したものです。 各スキルの著作権は原作者に帰属します。掲載に問題がある場合は info@alsel.co.jp または /takedown フォームよりご連絡ください。
原作者: CodeAlive-AI · CodeAlive-AI/ai-driven-development · ライセンス: MIT