Get the FREE Ultimate OpenClaw Setup Guide →
a

Read GitHub

@am-will

npx machina-cli add skill @am-will/read-github --openclaw
Files (1)
SKILL.md
2.7 KB

Read GitHub Docs

Access GitHub repository documentation and code via the gitmcp.io MCP service.

URL Conversion

Convert GitHub URLs to gitmcp.io:

  • github.com/owner/repogitmcp.io/owner/repo
  • https://github.com/karpathy/llm-councilhttps://gitmcp.io/karpathy/llm-council

CLI Usage

The scripts/gitmcp.py script provides CLI access to repository docs.

List Available Tools

python3 scripts/gitmcp.py list-tools owner/repo

Fetch Documentation

Retrieves the full documentation file (README, docs, etc.):

python3 scripts/gitmcp.py fetch-docs owner/repo

Search Documentation

Semantic search within repository documentation:

python3 scripts/gitmcp.py search-docs owner/repo "query"

Search Code

Search code using GitHub Search API (exact match):

python3 scripts/gitmcp.py search-code owner/repo "function_name"

Fetch Referenced URL

Fetch content from URLs mentioned in documentation:

python3 scripts/gitmcp.py fetch-url owner/repo "https://example.com/doc"

Direct Tool Call

Call any MCP tool directly:

python3 scripts/gitmcp.py call owner/repo tool_name '{"arg": "value"}'

Tool Names

Tool names are dynamically prefixed with the repo name (underscored):

  • karpathy/llm-councilfetch_llm_council_documentation
  • facebook/reactfetch_react_documentation
  • my-org/my-repofetch_my_repo_documentation

Available MCP Tools

For any repository, these tools are available:

  1. fetch_{repo}_documentation - Fetch entire documentation. Call first for general questions.
  2. search_{repo}_documentation - Semantic search within docs. Use for specific queries.
  3. search_{repo}_code - Search code via GitHub API (exact match). Returns matching files.
  4. fetch_generic_url_content - Fetch any URL referenced in docs, respecting robots.txt.

Workflow

  1. When given a GitHub repo, first fetch documentation to understand the project
  2. Use search-docs for specific questions about usage or features
  3. Use search-code to find implementations or specific functions
  4. Use fetch-url to retrieve external references mentioned in docs

Source

git clone https://clawhub.ai/am-will/read-githubView on GitHub

Overview

Read GitHub repositories through the gitmcp.io MCP service to access consolidated docs and code. It delivers semantic search across README, docs, and code, accurate file structure, and LLM-friendly markdown output, while respecting robots.txt and rate limits.

How This Skill Works

Rather than scraping GitHub, this skill uses the gitmcp.io interface to fetch repository documentation and code. It converts GitHub URLs to gitmcp.io paths, exposes tools to list, fetch docs, search docs, and search code, and returns clean markdown content optimized for LLMs.

When to Use It

  • When you need a single interface for README, docs, and code
  • When you require semantic search across repository documentation
  • When you need accurate repo file structure navigation with no hallucinations
  • When you want markdown output designed for LLM ingestion
  • When you must respect rate limits and robots.txt and avoid raw URLs

Quick Start

  1. Step 1: Convert the GitHub URL to gitmcp.io format (github.com/owner/repo → gitmcp.io/owner/repo)
  2. Step 2: List tools or fetch docs with python3 scripts/gitmcp.py list-tools owner/repo or fetch-docs owner/repo
  3. Step 3: Use fetch-docs, search-docs, or search-code to gather and query repository content

Best Practices

  • Always convert GitHub URLs to gitmcp.io before querying
  • Start with fetch_{repo}_documentation to understand the project
  • Use search_{repo}_documentation for specific questions, then search_{repo}_code for implementations
  • Use fetch_generic_url_content to retrieve external references mentioned in docs
  • Respect robots.txt and rate limits in tool usage

Example Use Cases

  • Convert github.com/owner/repo to gitmcp.io/owner/repo for queries
  • Fetch full documentation with fetch_{repo}_documentation
  • Semantic search within docs using search_{repo}_documentation
  • Find code snippets with search_{repo}_code for exact matches
  • Fetch external references with fetch_generic_url_content

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers