Github fetch

From archibate/dotfiles-opencode · View interactive version

Github fetch is an AI agent skill from the GitHub repository archibate/dotfiles-opencode. Use this skill when studying GitHub repositories for one-off analysis, reading source code, or fetching single files from GitHub. TRIGGER when "study this repo", "install this repo", "read the README of X", "inspect source of X", "fetch file from GitHub", or any request to explore/analyze a GitHub p

How to use this skill

Skill file

GitHub Fetch

When to Use

Mode 1: Full Repo Clone

Clone to the standard temp location with shallow depth:

git clone https://github.com/{user}/{repo} --depth=1 /tmp/github/{user}/{repo}

Then work in /tmp/github/{user}/{repo} using Read, Grep, Glob tools.

If the repo is already cloned, reuse it — do not re-clone.

# Check first
ls /tmp/github/{user}/{repo} 2>/dev/null || git clone https://github.com/{user}/{repo} --depth=1 /tmp/github/{user}/{repo}

Mode 2: Single File Fetch

For reading one file without cloning the whole repo, use WebFetch with the raw URL:

https://raw.githubusercontent.com/{user}/{repo}/main/{path/to/file}

Or with curl:

curl -fsSL https://raw.githubusercontent.com/{user}/{repo}/main/{path/to/file}

Try main first; fall back to master if the file is not found.

Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.