exploring-codebaseslisted
Install: claude install-skill oaustegard/claude-skills
# Exploring Codebases
Exploratory code analysis for unfamiliar repositories. Orchestrates
tree-sitting (structural) and featuring (semantic) over a local copy.
## Workflow
Five numbered steps, in order. Do not skip step 0.
### 0. Setup (once per session)
```bash
uv venv /home/claude/.venv 2>/dev/null
uv pip install tree-sitter-language-pack --python /home/claude/.venv/bin/python
export PYTHON=/home/claude/.venv/bin/python
export TREESIT=/mnt/skills/user/tree-sitting/scripts/treesit.py
export GATHER=/mnt/skills/user/featuring/scripts/gather.py
```
If step 2's `--stats` later reports `Scanned 0 files ... Errors: 1`, the
language pack isn't loaded — come back here and install. Treesit fails
silently on missing deps; it does not raise a useful error.
### 1. Get the repo (tarball, not per-file)
```bash
OWNER=...
REPO=...
REF=main # branch name, tag, or SHA. For a PR: pull/N/head
curl -sL -H "Authorization: Bearer $GH_TOKEN" \
"https://api.github.com/repos/$OWNER/$REPO/tarball/$REF" -o /tmp/$REPO.tar.gz
mkdir -p /tmp/$REPO && tar -xzf /tmp/$REPO.tar.gz -C /tmp/$REPO --strip-components=1
ls /tmp/$REPO | head # sanity check — did extraction land?
```
One HTTP call gets the whole repo. Do NOT curl README, cat files, or
fetch via `contents/PATH` first — they're in the tarball. The
Authorization header is only needed for private repos; public repos
work without it.
**Ref selection matters.** If exploring a feature branch, PR, or tag,
set `REF` accor