Read GitHub Docs Access GitHub repository documentation and code via the gitmcp.io MCP service. URL Conversion Convert GitHub URLs to gitmcp.io: - → - → CLI Usage The script provides CLI access to repository docs. List Available Tools Fetch Documentation Retrieves the full documentation file (README, docs, etc.): Search Documentation Semantic search within repository documentation: Search Code Search code using GitHub Search API (exact match): Fetch Referenced URL Fetch content from URLs mentioned in documentation: Direct Tool Call Call any MCP tool directly: Tool Names Tool names are dynamic…

, '', url)\n return url\n\n # Handle owner/repo format (possibly with extra path segments)\n if \"/\" in url_or_path and not url_or_path.startswith(\"http\"):\n # Extract just owner/repo, strip any extra paths\n parts = url_or_path.split('/')\n if len(parts) >= 2:\n return f\"https://gitmcp.io/{parts[0]}/{parts[1]}\"\n return f\"https://gitmcp.io/{url_or_path}\"\n\n return url_or_path\n\n\ndef get_repo_name_from_url(url: str) -> str:\n \"\"\"Extract repo name from URL and convert to underscore format for tool names.\"\"\"\n # Extract owner/repo from URL pattern like https://gitmcp.io/owner/repo\n match = re.search(r'gitmcp\\.io/([^/]+)/([^/]+)', url)\n if match:\n repo_name = match.group(2)\n # Convert dashes to underscores for tool names\n return repo_name.replace('-', '_')\n\n # Fallback: extract from owner/repo format\n match = re.search(r'^([^/]+)/([^/]+)', url)\n if match:\n repo_name = match.group(2)\n return repo_name.replace('-', '_')\n\n return \"\"\n\n\ndef send_jsonrpc(proc: subprocess.Popen, method: str, params: dict = None, msg_id: int = 1) -> dict:\n \"\"\"Send a JSON-RPC message and get response.\"\"\"\n request = {\n \"jsonrpc\": \"2.0\",\n \"id\": msg_id,\n \"method\": method,\n }\n if params:\n request[\"params\"] = params\n\n message = json.dumps(request) + \"\\n\"\n proc.stdin.write(message)\n proc.stdin.flush()\n\n # Read response\n response_line = proc.stdout.readline()\n if response_line:\n return json.loads(response_line)\n return {}\n\n\ndef list_tools(mcp_url: str) -> dict:\n \"\"\"Connect to MCP server and list available tools.\"\"\"\n proc = subprocess.Popen(\n [\"npx\", \"-y\", \"mcp-remote\", mcp_url],\n stdin=subprocess.PIPE,\n stdout=subprocess.PIPE,\n stderr=subprocess.PIPE,\n text=True,\n bufsize=1\n )\n\n try:\n # Initialize\n init_response = send_jsonrpc(proc, \"initialize\", {\n \"protocolVersion\": \"2024-11-05\",\n \"capabilities\": {},\n \"clientInfo\": {\"name\": \"gitmcp-cli\", \"version\": \"1.0.0\"}\n }, 1)\n\n # Send initialized notification\n proc.stdin.write(json.dumps({\"jsonrpc\": \"2.0\", \"method\": \"notifications/initialized\"}) + \"\\n\")\n proc.stdin.flush()\n\n # List tools\n tools_response = send_jsonrpc(proc, \"tools/list\", {}, 2)\n\n return tools_response\n finally:\n proc.terminate()\n\n\ndef call_tool(mcp_url: str, tool_name: str, arguments: dict = None) -> dict:\n \"\"\"Connect to MCP server and call a tool.\"\"\"\n proc = subprocess.Popen(\n [\"npx\", \"-y\", \"mcp-remote\", mcp_url],\n stdin=subprocess.PIPE,\n stdout=subprocess.PIPE,\n stderr=subprocess.PIPE,\n text=True,\n bufsize=1\n )\n\n try:\n # Initialize\n send_jsonrpc(proc, \"initialize\", {\n \"protocolVersion\": \"2024-11-05\",\n \"capabilities\": {},\n \"clientInfo\": {\"name\": \"gitmcp-cli\", \"version\": \"1.0.0\"}\n }, 1)\n\n # Send initialized notification\n proc.stdin.write(json.dumps({\"jsonrpc\": \"2.0\", \"method\": \"notifications/initialized\"}) + \"\\n\")\n proc.stdin.flush()\n\n # Call tool\n tool_response = send_jsonrpc(proc, \"tools/call\", {\n \"name\": tool_name,\n \"arguments\": arguments or {}\n }, 2)\n\n return tool_response\n finally:\n proc.terminate()\n\n\ndef main():\n parser = argparse.ArgumentParser(\n description=\"CLI wrapper for gitmcp.io MCP servers\",\n formatter_class=argparse.RawDescriptionHelpFormatter,\n epilog=\"\"\"\nExamples:\n # List tools for a repo\n %(prog)s list-tools karpathy/llm-council\n %(prog)s list-tools https://github.com/karpathy/llm-council\n\n # Fetch documentation\n %(prog)s fetch-docs karpathy/llm-council\n\n # Search documentation\n %(prog)s search-docs karpathy/llm-council \"how to use\"\n\n # Search code\n %(prog)s search-code karpathy/llm-council \"def main\"\n\n # Fetch a URL mentioned in docs\n %(prog)s fetch-url karpathy/llm-council \"https://example.com/doc\"\n\n # Call any tool directly\n %(prog)s call karpathy/llm-council fetch_llm_council_documentation '{}'\n\"\"\"\n )\n\n subparsers = parser.add_subparsers(dest=\"command\", help=\"Command to run\")\n\n # list-tools command\n list_parser = subparsers.add_parser(\"list-tools\", help=\"List available MCP tools for a repo\")\n list_parser.add_argument(\"repo\", help=\"GitHub repo (owner/repo or full URL)\")\n\n # fetch-docs command\n fetch_docs_parser = subparsers.add_parser(\"fetch-docs\", help=\"Fetch repository documentation\")\n fetch_docs_parser.add_argument(\"repo\", help=\"GitHub repo (owner/repo or full URL)\")\n\n # search-docs command\n search_docs_parser = subparsers.add_parser(\"search-docs\", help=\"Semantically search documentation\")\n search_docs_parser.add_argument(\"repo\", help=\"GitHub repo (owner/repo or full URL)\")\n search_docs_parser.add_argument(\"query\", help=\"Search query\")\n\n # search-code command\n search_code_parser = subparsers.add_parser(\"search-code\", help=\"Search code in the repository\")\n search_code_parser.add_argument(\"repo\", help=\"GitHub repo (owner/repo or full URL)\")\n search_code_parser.add_argument(\"query\", help=\"Search query (exact match)\")\n\n # fetch-url command\n fetch_url_parser = subparsers.add_parser(\"fetch-url\", help=\"Fetch content from a URL mentioned in docs\")\n fetch_url_parser.add_argument(\"repo\", help=\"GitHub repo (owner/repo or full URL)\")\n fetch_url_parser.add_argument(\"url\", help=\"URL to fetch\")\n\n # call command (direct tool call)\n call_parser = subparsers.add_parser(\"call\", help=\"Call an MCP tool directly\")\n call_parser.add_argument(\"repo\", help=\"GitHub repo (owner/repo or full URL)\")\n call_parser.add_argument(\"tool\", help=\"Tool name to call\")\n call_parser.add_argument(\"args\", nargs=\"?\", default=\"{}\", help=\"JSON arguments for the tool\")\n\n args = parser.parse_args()\n\n if not args.command:\n parser.print_help()\n sys.exit(1)\n\n # Convert repo to gitmcp URL\n mcp_url = convert_github_to_gitmcp(args.repo)\n repo_name = get_repo_name_from_url(mcp_url)\n\n try:\n if args.command == \"list-tools\":\n result = list_tools(mcp_url)\n if \"result\" in result and \"tools\" in result[\"result\"]:\n print(\"Available tools:\")\n for tool in result[\"result\"][\"tools\"]:\n print(f\"\\n {tool['name']}\")\n if \"description\" in tool:\n print(f\" {tool['description']}\")\n else:\n print(json.dumps(result, indent=2))\n\n elif args.command == \"fetch-docs\":\n tool_name = f\"fetch_{repo_name}_documentation\"\n result = call_tool(mcp_url, tool_name)\n if \"result\" in result:\n content = result[\"result\"]\n if isinstance(content, dict) and \"content\" in content:\n for item in content[\"content\"]:\n if item.get(\"type\") == \"text\":\n print(item.get(\"text\", \"\"))\n else:\n print(json.dumps(content, indent=2))\n else:\n print(json.dumps(result, indent=2))\n\n elif args.command == \"search-docs\":\n tool_name = f\"search_{repo_name}_documentation\"\n result = call_tool(mcp_url, tool_name, {\"query\": args.query})\n if \"result\" in result:\n content = result[\"result\"]\n if isinstance(content, dict) and \"content\" in content:\n for item in content[\"content\"]:\n if item.get(\"type\") == \"text\":\n print(item.get(\"text\", \"\"))\n else:\n print(json.dumps(content, indent=2))\n else:\n print(json.dumps(result, indent=2))\n\n elif args.command == \"search-code\":\n tool_name = f\"search_{repo_name}_code\"\n result = call_tool(mcp_url, tool_name, {\"query\": args.query})\n if \"result\" in result:\n content = result[\"result\"]\n if isinstance(content, dict) and \"content\" in content:\n for item in content[\"content\"]:\n if item.get(\"type\") == \"text\":\n print(item.get(\"text\", \"\"))\n else:\n print(json.dumps(content, indent=2))\n else:\n print(json.dumps(result, indent=2))\n\n elif args.command == \"fetch-url\":\n result = call_tool(mcp_url, \"fetch_generic_url_content\", {\"url\": args.url})\n if \"result\" in result:\n content = result[\"result\"]\n if isinstance(content, dict) and \"content\" in content:\n for item in content[\"content\"]:\n if item.get(\"type\") == \"text\":\n print(item.get(\"text\", \"\"))\n else:\n print(json.dumps(content, indent=2))\n else:\n print(json.dumps(result, indent=2))\n\n elif args.command == \"call\":\n tool_args = json.loads(args.args)\n result = call_tool(mcp_url, args.tool, tool_args)\n print(json.dumps(result, indent=2))\n\n except Exception as e:\n print(f\"Error: {e}\", file=sys.stderr)\n sys.exit(1)\n\n\nif __name__ == \"__main__\":\n main()\n","content_type":"text/x-python; charset=utf-8","language":"python","size":10139,"content_sha256":"d5561f6dc17aceb7638bf0795d3c533b225a3c660a1ae14d96fcc3e9aa653436"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Read GitHub Docs","type":"text"}]},{"type":"paragraph","content":[{"text":"Access GitHub repository documentation and code via the gitmcp.io MCP service.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"URL Conversion","type":"text"}]},{"type":"paragraph","content":[{"text":"Convert GitHub URLs to gitmcp.io:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"github.com/owner/repo","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"gitmcp.io/owner/repo","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"https://github.com/karpathy/llm-council","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"https://gitmcp.io/karpathy/llm-council","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"CLI Usage","type":"text"}]},{"type":"paragraph","content":[{"text":"The ","type":"text"},{"text":"scripts/gitmcp.py","type":"text","marks":[{"type":"code_inline"}]},{"text":" script provides CLI access to repository docs.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"List Available Tools","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python3 scripts/gitmcp.py list-tools owner/repo","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Fetch Documentation","type":"text"}]},{"type":"paragraph","content":[{"text":"Retrieves the full documentation file (README, docs, etc.):","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python3 scripts/gitmcp.py fetch-docs owner/repo","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Search Documentation","type":"text"}]},{"type":"paragraph","content":[{"text":"Semantic search within repository documentation:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python3 scripts/gitmcp.py search-docs owner/repo \"query\"","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Search Code","type":"text"}]},{"type":"paragraph","content":[{"text":"Search code using GitHub Search API (exact match):","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python3 scripts/gitmcp.py search-code owner/repo \"function_name\"","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Fetch Referenced URL","type":"text"}]},{"type":"paragraph","content":[{"text":"Fetch content from URLs mentioned in documentation:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python3 scripts/gitmcp.py fetch-url owner/repo \"https://example.com/doc\"","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Direct Tool Call","type":"text"}]},{"type":"paragraph","content":[{"text":"Call any MCP tool directly:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"python3 scripts/gitmcp.py call owner/repo tool_name '{\"arg\": \"value\"}'","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Tool Names","type":"text"}]},{"type":"paragraph","content":[{"text":"Tool names are dynamically prefixed with the repo name (underscored):","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"karpathy/llm-council","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"fetch_llm_council_documentation","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"facebook/react","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"fetch_react_documentation","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"my-org/my-repo","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"fetch_my_repo_documentation","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Available MCP Tools","type":"text"}]},{"type":"paragraph","content":[{"text":"For any repository, these tools are available:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"fetch_{repo}_documentation","type":"text","marks":[{"type":"strong"}]},{"text":" - Fetch entire documentation. Call first for general questions.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"search_{repo}_documentation","type":"text","marks":[{"type":"strong"}]},{"text":" - Semantic search within docs. Use for specific queries.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"search_{repo}_code","type":"text","marks":[{"type":"strong"}]},{"text":" - Search code via GitHub API (exact match). Returns matching files.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"fetch_generic_url_content","type":"text","marks":[{"type":"strong"}]},{"text":" - Fetch any URL referenced in docs, respecting robots.txt.","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Workflow","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"When given a GitHub repo, first fetch documentation to understand the project","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use search-docs for specific questions about usage or features","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use search-code to find implementations or specific functions","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Use fetch-url to retrieve external references mentioned in docs","type":"text"}]}]}]}]},"metadata":{"date":"2026-11-02","name":"read-github","author":"@skillopedia","source":{"stars":1041,"repo_name":"codex-skills","origin_url":"https://github.com/am-will/codex-skills/blob/HEAD/skills/read-github/SKILL.md","repo_owner":"am-will","body_sha256":"0fd103db57b1b202c17cf95186439bf5881cf33af8acf2ca0ad2825684a1277b","cluster_key":"835cefa8a960ece751caa9290107753f06f41fe6041fde0fe7210873223e2900","clean_bundle":{"format":"clean-skill-bundle-v1","source":"am-will/codex-skills/skills/read-github/SKILL.md","text_bytes":10139,"source_commit":"9f954c3b63fda0d1875252009c196bf15072c1ca","skills_sh_rank":11403,"attachment_count":1,"text_attachments":1,"attachment_storage":"skill_attachments","binary_attachments":0},"cluster_size":1,"skill_md_path":"skills/read-github/SKILL.md","import_metadata":{"date":"2026-11-02","author":"@skillopedia","version":"v1","category":"integrations-apis","category_label":"Integrations"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"integrations-apis","import_tag":"skills-sh-top20k-2026-11","description":"Read and search GitHub repository documentation via gitmcp.io MCP service.\n\n**WHEN TO USE:**\n- User provides a GitHub URL\n- User mentions a specific repo in owner/repo format\n- User asks \"what does this repo do?\", \"read the docs for X repo\", or similar\n- User wants to search code or docs within a repo\n"}},"renderedAt":1793670901447}

Read GitHub Docs Access GitHub repository documentation and code via the gitmcp.io MCP service. URL Conversion Convert GitHub URLs to gitmcp.io: - → - → CLI Usage The script provides CLI access to repository docs. List Available Tools Fetch Documentation Retrieves the full documentation file (README, docs, etc.): Search Documentation Semantic search within repository documentation: Search Code Search code using GitHub Search API (exact match): Fetch Referenced URL Fetch content from URLs mentioned in documentation: Direct Tool Call Call any MCP tool directly: Tool Names Tool names are dynamic…