repo-explorerlisted
Install: claude install-skill CodeAlive-AI/ai-driven-development
# Repo Explorer
Launch a separate Claude Code CLI process (`claude -p --model haiku`) with read-only
tools to explore a repository and answer questions about it. Supports both local
repositories and remote URLs.
## Workflow
### 1. Determine repo source and question
From the user's message extract:
- **source**: one of:
- **local path** (`~/projects/foo`, `/opt/services/bar`, `.` or omitted = cwd)
- **remote URL** (`https://github.com/owner/repo`, `git@github.com:owner/repo.git`)
- **shorthand** (`owner/repo` — treat as `https://github.com/owner/repo`)
- **question**: what to find out about the repository.
### 2. For remote repos — clone to temp directory
If the source is a remote URL or shorthand, clone it first:
```bash
REPO_DIR=$(mktemp -d) && git clone --depth 1 <url> "$REPO_DIR" && echo "$REPO_DIR"
```
- Use `--depth 1` for speed (shallow clone, only latest commit)
- If the user asks about a specific branch/tag: `git clone --depth 1 --branch <ref> <url> "$REPO_DIR"`
- Store `$REPO_DIR` to clean up later
### 3. Run the CLI command
Use the Bash tool with **timeout: 600000** (10 min) since exploration of large repos
can take several minutes.
```
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-s