Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
Version History
- 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.
User asks: /gh-extract https://github.com/user/repo/blob/main/script.py
- 1Receives the GitHub blob URL
- 2Converts it to the equivalent raw.githubusercontent.com URL
- 3Fetches the file content from the raw URL
- 4Prints the file content to stdout
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.