home / skills / petekp / claude-code-setup / deepwiki

deepwiki skill

/skills/deepwiki

This skill helps you fetch and summarize Open Source repository docs with DeepWiki, revealing structure, APIs, and explanations.

npx playbooks add skill petekp/claude-code-setup --skill deepwiki

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.0 KB
---
name: deepwiki
description: Query DeepWiki for repository documentation and structure. Use to understand open source projects, find API docs, and explore codebases.
---

# DeepWiki - Repository Documentation

Query DeepWiki for AI-generated documentation about any public GitHub repository.

## Overview

DeepWiki (deepwiki.com) provides AI-generated documentation for GitHub repositories, including:
- Repository structure and architecture
- API documentation
- Code explanations
- Interactive diagrams

## Quick Start

**URL Pattern**: Replace `github.com` with `deepwiki.com` in any repo URL:
- `github.com/vercel/next.js` → `deepwiki.com/vercel/next.js`

## MCP Server Setup

DeepWiki provides a free MCP server with no authentication required for public repos.

### Add to Claude Code (one-time setup)

```bash
claude mcp add -s user -t http deepwiki https://mcp.deepwiki.com/mcp
```

### For Cursor/Windsurf

Add to your MCP config:
```json
{
  "mcpServers": {
    "deepwiki": {
      "serverUrl": "https://mcp.deepwiki.com/sse"
    }
  }
}
```

## Available MCP Tools

Once configured, these tools become available:

| Tool | Purpose |
|------|---------|
| `read_wiki_structure` | Get documentation topics/structure for a repo |
| `read_wiki_contents` | Retrieve actual documentation content |
| `ask_question` | Ask AI-powered questions about the repo |

## Usage Examples

### Via WebFetch (works immediately)

```bash
# Fetch documentation overview
WebFetch https://deepwiki.com/owner/repo "Summarize the architecture"

# Example
WebFetch https://deepwiki.com/vercel/next.js "How does routing work?"
```

### Via MCP (after setup)

Use the MCP tools directly:
- `mcp__deepwiki__read_wiki_structure` - Get repo structure
- `mcp__deepwiki__read_wiki_contents` - Get documentation
- `mcp__deepwiki__ask_question` - Ask questions

## Fallback: GitHub + AI

If DeepWiki lacks coverage for a repo, use GitHub API:

### Get Repository Overview

```bash
gh api repos/owner/repo | jq '{description, language, topics, stars: .stargazers_count}'
```

### Get README

```bash
gh api repos/owner/repo/readme --jq '.content' | base64 -d
```

### Get File Structure

```bash
gh api repos/owner/repo/git/trees/main?recursive=1 | \
  jq -r '.tree[] | select(.type == "blob") | .path' | head -50
```

## Wire Protocols

Two protocols are supported:
- **SSE** at `https://mcp.deepwiki.com/sse` - Official MCP spec
- **HTTP** at `https://mcp.deepwiki.com/mcp` - Cloudflare/OpenAI compatible

## Best Practices

1. **Use WebFetch first** - Works without MCP setup
2. **Check if repo is indexed** - Popular repos have better coverage
3. **Ask specific questions** - DeepWiki excels at targeted queries
4. **Fall back to GitHub** - For unindexed or private repos

## Limitations

- **Public repos only** - Private repos require Devin account
- **Coverage varies** - 50,000+ popular repos indexed
- **No authentication** - Can't access private documentation

## Resources

- Website: https://deepwiki.com
- Docs: https://docs.devin.ai/work-with-devin/deepwiki
- GitHub: https://github.com/CognitionAI/deepwiki

Overview

This skill lets you query DeepWiki to retrieve AI-generated documentation and structural overviews for public GitHub repositories. It helps you inspect repository architecture, API docs, and code explanations quickly. Use it to explore codebases without manual browsing or heavy setup.

How this skill works

The skill maps a GitHub repository URL to DeepWiki by replacing the domain (github.com → deepwiki.com) or by calling DeepWiki MCP endpoints. It exposes tools to read documentation structure, fetch documentation contents, and ask targeted AI questions about the repo. If DeepWiki has no coverage, the skill falls back to GitHub API queries to extract README and file trees.

When to use it

  • You need a quick, readable architecture or API summary of an open-source repo.
  • You want human-friendly explanations of code files, modules, or functions.
  • You need to locate documentation topics or interactive diagrams for a project.
  • You prefer asking targeted questions like "How does routing work?" rather than scanning source code.
  • You want to integrate DeepWiki via MCP in an agent environment for repeated queries.

Best practices

  • Try a direct WebFetch to deepwiki.com first — it works without MCP setup.
  • Verify the repo is publicly indexed; popular repositories have richer coverage.
  • Ask narrow, specific questions to get precise answers (e.g., "Where is the CLI implemented?").
  • If DeepWiki lacks content, fall back to GitHub API calls for README and file-tree extraction.
  • Configure the DeepWiki MCP server once for seamless tool availability in agent platforms.

Example use cases

  • Summarize a repository’s architecture and main modules for onboarding a new contributor.
  • Fetch API documentation and usage examples for a library before integration.
  • Ask where a particular feature is implemented and get file-level pointers.
  • Generate a list of documentation topics and drill into specific sections with follow-up questions.
  • Automate repository discovery in an agent workflow using the MCP tools for repeated analysis.

FAQ

Does this work for private repositories?

No. DeepWiki coverage is for public repositories only; private repos require explicit access not supported by the public DeepWiki endpoints.

Do I need to configure anything to use DeepWiki?

No for simple lookups — use WebFetch to deepwiki.com URLs. For integrated agent usage, add the DeepWiki MCP server to your MCP config once to enable dedicated tools.