$npx -y skills add mjunaidca/mjs-agent-skills --skill researching-with-deepwikiResearch GitHub, GitLab, and Bitbucket repositories using DeepWiki MCP server. Use when exploring unfamiliar codebases, understanding project architecture, or asking questions about how a specific open-source project works. Provides AI-powered repo analysis and RAG-based Q&A abou
| 1 | # Researching with DeepWiki |
| 2 | |
| 3 | Research and understand codebases using the DeepWiki MCP server. |
| 4 | |
| 5 | ## MCP Server Setup |
| 6 | |
| 7 | Add to your Claude Code settings: |
| 8 | |
| 9 | ```bash |
| 10 | claude mcp add -s user -t http deepwiki https://mcp.deepwiki.com/mcp |
| 11 | ``` |
| 12 | |
| 13 | Or add to `settings.json`: |
| 14 | |
| 15 | ```json |
| 16 | { |
| 17 | "mcpServers": { |
| 18 | "deepwiki": { |
| 19 | "type": "http", |
| 20 | "url": "https://mcp.deepwiki.com/mcp" |
| 21 | } |
| 22 | } |
| 23 | } |
| 24 | ``` |
| 25 | |
| 26 | ### Private Repositories |
| 27 | |
| 28 | For private repos, use the Devin.ai endpoint with authentication: |
| 29 | |
| 30 | ```json |
| 31 | { |
| 32 | "mcpServers": { |
| 33 | "deepwiki": { |
| 34 | "type": "http", |
| 35 | "url": "https://mcp.devin.ai/deepwiki/mcp", |
| 36 | "headers": { |
| 37 | "Authorization": "Bearer YOUR_DEVIN_API_KEY" |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | } |
| 42 | ``` |
| 43 | |
| 44 | --- |
| 45 | |
| 46 | ## When to Use DeepWiki |
| 47 | |
| 48 | | Scenario | Use DeepWiki? | |
| 49 | |----------|---------------| |
| 50 | | Exploring unfamiliar open-source codebase | Yes | |
| 51 | | Understanding project architecture | Yes | |
| 52 | | Finding how a feature is implemented | Yes | |
| 53 | | Generating documentation for a repo | Yes | |
| 54 | | Working with your own local code | No - use Glob/Grep | |
| 55 | | Quick file lookups in known structure | No - use Read tool | |
| 56 | |
| 57 | --- |
| 58 | |
| 59 | ## Core Capabilities |
| 60 | |
| 61 | ### 1. Repository Analysis |
| 62 | |
| 63 | Ask DeepWiki to analyze any public repository: |
| 64 | |
| 65 | ``` |
| 66 | "Analyze the architecture of github.com/vercel/next.js" |
| 67 | "How is the routing system implemented in github.com/remix-run/react-router?" |
| 68 | "What design patterns are used in github.com/anthropics/anthropic-sdk-python?" |
| 69 | ``` |
| 70 | |
| 71 | ### 2. Code Structure Understanding |
| 72 | |
| 73 | Get insights into project organization: |
| 74 | |
| 75 | ``` |
| 76 | "Explain the directory structure of github.com/langchain-ai/langchain" |
| 77 | "What are the main modules in github.com/fastapi/fastapi?" |
| 78 | "How are tests organized in github.com/pytest-dev/pytest?" |
| 79 | ``` |
| 80 | |
| 81 | ### 3. Feature Investigation |
| 82 | |
| 83 | Understand how specific features work: |
| 84 | |
| 85 | ``` |
| 86 | "How does streaming work in github.com/openai/openai-python?" |
| 87 | "Where is authentication handled in github.com/better-auth/better-auth?" |
| 88 | "How are middleware implemented in github.com/honojs/hono?" |
| 89 | ``` |
| 90 | |
| 91 | ### 4. Architecture Visualization |
| 92 | |
| 93 | DeepWiki can generate Mermaid diagrams: |
| 94 | |
| 95 | ``` |
| 96 | "Generate an architecture diagram for github.com/prisma/prisma" |
| 97 | "Show the data flow in github.com/trpc/trpc" |
| 98 | ``` |
| 99 | |
| 100 | --- |
| 101 | |
| 102 | ## Best Practices |
| 103 | |
| 104 | ### 1. Be Specific with Questions |
| 105 | |
| 106 | ``` |
| 107 | # Good - specific question |
| 108 | "How does the caching system work in github.com/vercel/swr?" |
| 109 | |
| 110 | # Less effective - too broad |
| 111 | "Tell me about github.com/vercel/swr" |
| 112 | ``` |
| 113 | |
| 114 | ### 2. Reference Specific Paths |
| 115 | |
| 116 | ``` |
| 117 | # Good - targeted investigation |
| 118 | "Explain the src/core directory in github.com/pmndrs/zustand" |
| 119 | |
| 120 | # Also good - feature-focused |
| 121 | "How is the middleware pattern implemented in github.com/pmndrs/zustand?" |
| 122 | ``` |
| 123 | |
| 124 | ### 3. Compare Implementations |
| 125 | |
| 126 | ``` |
| 127 | "Compare how github.com/tanstack/query and github.com/vercel/swr handle cache invalidation" |
| 128 | ``` |
| 129 | |
| 130 | ### 4. Learn from Popular Projects |
| 131 | |
| 132 | ``` |
| 133 | "What patterns from github.com/shadcn-ui/ui should I follow for my component library?" |
| 134 | ``` |
| 135 | |
| 136 | --- |
| 137 | |
| 138 | ## Common Use Cases |
| 139 | |
| 140 | ### Learning a New Framework |
| 141 | |
| 142 | ``` |
| 143 | 1. "Explain the core concepts of github.com/honojs/hono" |
| 144 | 2. "How do I add middleware in github.com/honojs/hono?" |
| 145 | 3. "Show example route handlers from github.com/honojs/hono" |
| 146 | ``` |
| 147 | |
| 148 | ### Debugging Integration Issues |
| 149 | |
| 150 | ``` |
| 151 | 1. "How does github.com/drizzle-team/drizzle-orm handle connection pooling?" |
| 152 | 2. "What error types are thrown by github.com/drizzle-team/drizzle-orm?" |
| 153 | ``` |
| 154 | |
| 155 | ### Preparing for Contributions |
| 156 | |
| 157 | ``` |
| 158 | 1. "What's the contribution workflow for github.com/anthropics/claude-code?" |
| 159 | 2. "How are issues labeled in github.com/anthropics/claude-code?" |
| 160 | 3. "What testing patterns are used in github.com/anthropics/claude-code?" |
| 161 | ``` |
| 162 | |
| 163 | --- |
| 164 | |
| 165 | ## Supported Platforms |
| 166 | |
| 167 | | Platform | URL Format | |
| 168 | |----------|------------| |
| 169 | | GitHub | `github.com/owner/repo` | |
| 170 | | GitLab | `gitlab.com/owner/repo` | |
| 171 | | Bitbucket | `bitbucket.org/owner/repo` | |
| 172 | |
| 173 | --- |
| 174 | |
| 175 | ## Limitations |
| 176 | |
| 177 | - **Rate limits**: Public endpoint has usage limits |
| 178 | - **Private repos**: Requires Devin.ai API key |
| 179 | - **Large repos**: May take time to analyze |
| 180 | - **Real-time changes**: Cached analysis may not reflect latest commits |
| 181 | |
| 182 | --- |
| 183 | |
| 184 | ## Verification |
| 185 | |
| 186 | Run: `python3 scripts/verify.py` |
| 187 | |
| 188 | Expected: `✓ DeepWiki MCP server configured` |
| 189 | |
| 190 | ## If Verification Fails |
| 191 | |
| 192 | 1. Check: MCP server is configured in settings |
| 193 | 2. Test: Try a simple query like "analyze github.com/anthropics/anthropic-sdk-python" |
| 194 | 3. **Stop and report** if still failing |
| 195 | |
| 196 | ## References |
| 197 | |
| 198 | - [DeepWiki](https://deepwiki.com) - Main service |
| 199 | - [MCP endpoint](https://mcp.deepwiki.com/mcp) - Public MCP server |