exploring-repos
Explore GitHub Repositories with DeepWiki
DeepWiki provides AI-generated wiki documentation for 30,000+ popular public GitHub repositories — architecture overviews, design patterns, component relationships, and semantic Q&A powered by Cognition's Devin.
When to Use DeepWiki vs Context7
| Need | Tool | Why |
|---|---|---|
| Repo architecture, design patterns, how components connect | DeepWiki | AI-generated wiki from full codebase analysis |
| API references, code examples, version-specific docs | Context7 | Sourced from official library documentation |
| "How does this repo work?" | DeepWiki | Codebase-level understanding |
| "How do I use this library?" | Context7 | Usage-level documentation |
| Cross-repo comparison | DeepWiki (ask_question with multiple repos) |
Accepts up to 10 repos |
Workflow
Step 1 — Understand the repository structure
Call mcp__deepwiki__read_wiki_structure with repoName in owner/repo format to get the topic list:
mcp__deepwiki__read_wiki_structure({ "repoName": "langchain-ai/langchain" })
Step 2 — Read relevant topics
Call mcp__deepwiki__read_wiki_contents for detailed documentation on the repo:
mcp__deepwiki__read_wiki_contents({ "repoName": "langchain-ai/langchain" })
Step 3 — Ask targeted questions
Call mcp__deepwiki__ask_question for semantic Q&A about specific aspects:
mcp__deepwiki__ask_question({
"repoName": "langchain-ai/langchain",
"question": "How does the retrieval chain pipeline work?"
})
For cross-repo questions, pass an array (max 10):
mcp__deepwiki__ask_question({
"repoName": ["langchain-ai/langchain", "run-llama/llama_index"],
"question": "How do these frameworks handle document chunking differently?"
})
Query Strategies
Start broad, then narrow:
read_wiki_structure— scan available topicsread_wiki_contents— read the full wiki for an overviewask_question— drill into specifics
For architecture understanding:
- "What is the high-level architecture?"
- "How do the core modules interact?"
- "What design patterns are used?"
- "How is error handling structured?"
For implementation reference:
- "How does X feature handle Y edge case?"
- "What is the authentication/authorization flow?"
- "How are database migrations managed?"
- "What testing patterns are used?"
For cross-repo comparison:
- Pass multiple repos to
ask_question - Ask about specific architectural differences
- Compare approaches to the same problem
Examples
# Understand a framework's architecture
read_wiki_structure: "vercel/next.js"
ask_question: "vercel/next.js" — "How does the app router handle server components?"
# Compare two similar projects
ask_question: ["expressjs/express", "fastify/fastify"] — "How do these handle middleware differently?"
# Explore a tool's internals
read_wiki_structure: "hashicorp/terraform"
ask_question: "hashicorp/terraform" — "How does the provider plugin system work?"
# Understand patterns in a Go project
ask_question: "kubernetes/kubernetes" — "How is the controller pattern implemented?"
Fallback: Repository Not Indexed
DeepWiki indexes 30,000+ popular public repos. If a repo is not indexed:
DeepWiki returns empty or error?
├── Check repo name format (must be "owner/repo")
├── Try the canonical repo name (not a fork)
├── Still not indexed?
│ ├── Any public repo → gh CLI (works for all GitHub repos)
│ ├── Popular library → Try Context7 for docs instead
│ ├── Open-source repo → Clone + local exploration
│ └── Niche/private → Perplexity for general info
Fallback Strategies
-
GitHub CLI — works for any public repo, no indexing needed:
# Quick overview: description, stars, language, topics gh repo view owner/repo # Full file tree (find key directories, config files) gh api repos/owner/repo/git/trees/main?recursive=1 --jq '.tree[].path' # Read specific files (README, go.mod, package.json, Makefile) gh api repos/owner/repo/contents/README.md --jq '.content' | base64 -d # Search for patterns across the repo gh search code "func main" --repo owner/repo --limit 20 # Search for repos by topic, language, or description gh search repos "kubernetes operator" --language go --sort stars # Recent activity: issues, PRs, releases gh release list --repo owner/repo --limit 5 gh issue list --repo owner/repo --state open --sort comments --limit 10Best for: file tree exploration, finding entry points, reading key files, searching code patterns, checking recent activity. Combine multiple
ghcalls to build a mental model when DeepWiki is unavailable. -
Context7 — for library API documentation:
mcp__context7__resolve-library-id({ "libraryName": "fastify" }) mcp__context7__query-docs({ "context7CompatibleLibraryID": "/fastify/fastify", "topic": "middleware" }) -
Perplexity — for repos not in DeepWiki or Context7:
mcp__perplexity-ask__perplexity_ask({ "messages": [{ "role": "user", "content": "Explain the architecture of <owner/repo>" }] }) -
Direct exploration — clone and read:
git clone --depth=1 <repo-url> # Use smart-explore skill for token-efficient AST navigation
Combining with Context7
DeepWiki and Context7 are complementary. A typical research flow:
- DeepWiki — understand the architecture and design decisions
- Context7 — get specific API references and code examples
- DeepWiki ask_question — clarify how specific APIs fit into the larger design
Do not use DeepWiki when:
- You need version-specific API syntax → use Context7
- You need official getting-started guides → use Context7
- The repo is private or very new (<1 month) → use Perplexity or local exploration
More from alexei-led/cc-thingz
improving-tests
Improve test design and coverage, including TDD/red-green-refactor guidance. Use when user says "improve tests", "refactor tests", "test coverage", "combine tests", "table-driven", "parametrize", "test.each", "test-first", "TDD", "red-green-refactor", or wants to remove test waste.
4debating-ideas
Dialectic thinking — spawn thesis and antithesis agents to stress-test ideas, then synthesize and verify against code. Use when user says "debate", "argue both sides", "devil's advocate", "stress test this idea", "pros and cons of approach", or wants rigorous evaluation of a design decision.
3linting-instructions
Lint plugin agent/skill prompts against rules derived from Anthropic model cards (Opus 4.6, Sonnet 4.6). Use when authoring or reviewing skills and agents — "lint instructions", "audit prompts", "model card rules".
3learning-patterns
Extract learnings and generate project-specific customizations (CLAUDE.md, commands, skills, hooks). Use when user says "learn", "extract learnings", "what did we learn", "save learnings", "adapt config", or wants to improve Claude Code based on conversation patterns.
3documenting-code
Update project documentation based on recent changes. Use when user says "update docs", "document", "add documentation", "update readme", "write docs", or wants to improve documentation.
3analyzing-usage
>-
3