Clone and explore external GitHub repositories to understand how libraries, frameworks, or dependencies work. Use when user provides a GitHub URL (github.com/owner/repo), asks "how does X library work", wants to look at source code for a dependency, asks about implementation details of an external package, or says "explore", "look at", or "check out" a repository. Automatically checks out the matching version tag when the repo is a dependency in the current project.
View on GitHubSelect agents to install to:
npx add-skill https://github.com/abatilo/vimrc/blob/main/plugins/abatilo-core/skills/repo-explore/SKILL.md -a claude-code --skill repo-exploreInstallation paths:
.claude/skills/repo-explore/# Repo Explore Skill Explore external GitHub repositories by cloning them locally and using the Explore agent for comprehensive codebase analysis. ## Cache Location ``` ~/.cache/claude/repos/<owner>/<repo>/ ``` ## Workflow ### 1. Parse Repository URL Extract owner and repo from various formats: - `https://github.com/owner/repo` - `git@github.com:owner/repo.git` - `owner/repo` (shorthand) - `github.com/owner/repo` ### 2. Check Cache ```bash ls ~/.cache/claude/repos/<owner>/<repo>/ ``` - **If exists**: Check if update needed (see `references/update-reference.md`) - **If not exists**: Proceed to clone ### 3. Clone Repository ```bash mkdir -p ~/.cache/claude/repos/<owner> git clone https://github.com/<owner>/<repo>.git ~/.cache/claude/repos/<owner>/<repo> ``` ### 4. Version Detection (CRITICAL) **Before exploring, check if this repo is a dependency in the current working directory.** Consult `references/version-detection.md` for: - Which dependency files to check - How to extract versions from each format - How to map versions to git tags If a matching version is found: ```bash cd ~/.cache/claude/repos/<owner>/<repo> git fetch --all --tags git checkout <tag> ``` Common tag formats to try: - `v1.2.3` - `1.2.3` - `release-1.2.3` - `release/1.2.3` ### 5. Explore with Explore Agent **ALWAYS use the Task tool with `subagent_type=Explore` for answering questions about the repository.** Do NOT manually browse files when the Explore agent can do it. The Explore agent is optimized for: - Finding files by patterns - Searching code for keywords - Understanding codebase architecture - Answering questions about how code works Example: ``` Task( subagent_type="Explore", prompt="""In ~/.cache/claude/repos/owner/repo/, find how authentication is implemented. Requirements for your response: - Include code snippets with file paths and line numbers - Show key type definitions and function signatures - End with a 'Key Files for Further Exploration' table with colum