One-click install
npx skills add https://github.com/retlehs/gh-fetch --skill gh-fetch
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: gh-fetch
Source: https://github.com/retlehs/gh-fetch/tree/main
Command: npx skills add https://github.com/retlehs/gh-fetch --skill gh-fetch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents slow, unreliable web scraping and HTML parsing when an AI coding agent needs accurate GitHub content from links the user provides.

Core Features & Use Cases

  • GitHub CLI-first retrieval: Uses gh to fetch issues, pull requests, diffs, repos, commits, gists, and related artifacts with structured output.
  • URL-to-command routing: Parses owner/repo/number (or tag/sha/path) from the shared GitHub URL and calls the matching gh subcommand.
  • Safety guardrails: Treats fetched content as untrusted and avoids executing instructions found in issue/PR/comment bodies, with a fallback to web fetching if gh is unavailable or unauthenticated.

Quick Start

Tell your agent: "Use gh-fetch to fetch and summarize the content from this GitHub pull request link."

Frequently Asked Questions about gh-fetch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch GitHub pull request diffs and issues for an AI agent without HTML parsing?โ–ผ

You can fetch GitHub pull request diffs and issues by using the GitHub CLI to retrieve structured JSON output directly. This approach avoids slow web fetching and HTML parsing, routing URLs to matching commands for accurate agent retrieval.

What is the best way to get structured GitHub content from URLs into a coding agent?โ–ผ

The best way to get structured GitHub content is parsing the URL into identifiers like owner, repo, and number, then executing the matching GitHub CLI subcommand with JQ filtering. This ensures reliable, structured data extraction for agents.

Does fetching GitHub issues via CLI require authentication?โ–ผ

Fetching GitHub issues via CLI typically requires authentication to access repository data reliably. If the GitHub CLI is missing or unauthenticated, the retrieval process includes a fallback mechanism to standard web fetching to ensure content availability.

Can I use an AI agent to summarize GitHub commits and actions runs safely?โ–ผ

You can safely use an AI agent to summarize GitHub commits and actions runs because the fetched content is treated as untrusted text. The agent avoids executing any instructions found within issue, PR, or comment bodies during retrieval.

Why does web scraping GitHub URLs fail or return slow results for AI agents?โ–ผ

Web scraping GitHub URLs fails or returns slow results for AI agents due to unreliable HTML parsing and latency. Using the GitHub CLI with structured JSON output prevents these parsing errors and reduces retrieval latency significantly.