LaunchKit · 2026
Back to Skills

gh-extract

Extract content from a GitHub url.

0
608 downloads
by @guoqiao

Setup & Installation

openclaw skills install @guoqiao/gh-extract

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install gh-extract

Version History

v0.0.2Feb 13, 2026 - Version note by skill developer:

- Renamed main script from `gh-extract.py` to `gh_extract.py`. - Now prints file content to stdout by default; use `--save` to save the file to a temp path. - Added requirement for `wget` alongside `uv`. - Improved handling for repo/tree URLs: automatically extracts `README.md`, `SKILL.md`, or `README.txt` if present. - Clarified usage and updated documentation to match new script behavior.

What This Skill Does

Extracts file content from GitHub URLs, including repos, trees, and blobs. Converts GitHub URLs to raw URLs and prints content to stdout or saves to a temp file. Only works with public repositories.

Avoids cloning an entire repo just to read one file from it.

When to use it

  • Quickly read a file from a GitHub repo without cloning
  • Download a specific blob file to inspect locally
  • Pull a README from a public repo for summarization
  • Grab a script from GitHub to run or review
  • Extract a config file from an open-source project

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: /gh-extract https://github.com/user/repo/blob/main/script.py

AGENT
  1. 1Receives the GitHub blob URL
  2. 2Converts it to the equivalent raw.githubusercontent.com URL
  3. 3Fetches the file content from the raw URL
  4. 4Prints the file content to stdout
OUTPUT

Full text content of script.py printed to the terminal

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

uv installed on the systemwget installed on the system