Repo explore

From abatilo/vimrc · View interactive version

Repo explore is an AI agent skill from the GitHub repository abatilo/vimrc. 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 p

How to use this skill

Skill file

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:

2. Check Cache

ls ~/.cache/claude/repos/<owner>/<repo>/

3. Clone Repository

mkdir -p ~/.cache/claude/repos/<owner>
git clone https://github.com/<owner>/<repo>.git ~/.cache/claude/repos/<owner>/<repo>

4. Version Detection

Before exploring, check if this repo is a dependency in the current working directory.

Consult references/version-detection.md for:

If a matching version is found:

cd ~/.cache/claude/repos/<owner>/<repo>
git fetch --all --tags
git checkout <tag>

Common tag formats to try:

5. Explore with Explore Agent

Use the Agent tool with subagent_type=Explore to answer questions about the repository, rather than browsing files yourself. The Explore agent is optimized for:

Example:

Agent(
  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 columns: File, Purpose, Start Here If...
"""
)

6. Response Format Requirements

When answering questions about the repository, include:

Code Snippets

```go

// File: pkg/controller/foo.go:42-58

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {

// ... relevant code

}

```

File Recommendations for Further Reading

At the end of every response, include a "Key Files for Further Exploration" section:

## Key Files for Further Exploration

| File | Purpose | Start Here If... |
|------|---------|------------------|
| `pkg/apis/v1/types.go` | Core type definitions | You want to understand the data model |
| `pkg/controller/main_controller.go` | Main reconciliation logic | You want to understand the control flow |
| `docs/design.md` | Architecture decisions | You want high-level understanding |

Guidelines for file recommendations:

Response Structure Template
1. Brief answer summary
2. Detailed explanation with inline code snippets
3. Architecture/flow diagrams if helpful (ASCII or description)
4. Key Files for Further Exploration table
5. Optional: Related topics the user might want to explore next

7. Updates

For refreshing the repository or switching versions, consult references/update-reference.md.

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.