Claude-skill-registry exploring-codebases
Semantic search for codebases. Locates matches with ripgrep and expands them into full AST nodes (functions/classes) using tree-sitter. Returns complete, syntactically valid code blocks rather than fragmented lines. Use when looking for specific implementations, examples, or references where full context is needed.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/exploring-codebases" ~/.claude/skills/majiayu000-claude-skill-registry-exploring-codebases && rm -rf "$T"
manifest:
skills/data/exploring-codebases/SKILL.mdsource content
Exploring Codebases
Hybrid search tool that combines the speed of
ripgrep with the structural awareness of tree-sitter. It finds matches and returns the entire function or class containing the match, de-duplicating results semantically.
Progressive Disclosure
By default, returns signatures only (docstrings + declarations without function bodies), reducing token usage by 10-20×. Use
--expand-full to get complete implementations when needed.
Installation
uv venv /home/claude/.venv uv pip install tree-sitter-language-pack --python /home/claude/.venv/bin/python
Usage
# Default: signatures only (efficient) /home/claude/.venv/bin/python /mnt/skills/user/exploring-codebases/scripts/search.py "query" /path/to/repo # Full implementations /home/claude/.venv/bin/python /mnt/skills/user/exploring-codebases/scripts/search.py "query" /path/to/repo --expand-full
Options
: Filter files (e.g.,--glob pattern
,*.py
)*.ts
: Return full implementations instead of signatures--expand-full
: Output JSON for machine processing (default is Markdown)--json
Examples
Find class signatures:
/home/claude/.venv/bin/python /mnt/skills/user/exploring-codebases/scripts/search.py "class User" /path/to/repo
Output:
class User: """User account model.""" ...
Find full method implementation:
/home/claude/.venv/bin/python /mnt/skills/user/exploring-codebases/scripts/search.py "def validate" /path/to/repo --expand-full
Find usage of
in Python files:process_data
/home/claude/.venv/bin/python /mnt/skills/user/exploring-codebases/scripts/search.py "process_data" /path/to/repo --glob "*.py"