Skip to content
Back to skills

Github Fetch

ASecurity

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 project without making it a permanent workspace.

  • 106 stars
  • 0 votes
  • 1 copy
  • 14 views
  • Added September 12, 2026
toolsbashgitapi

Works with

  • api

Security analysis

A96/100
  • mediumUses curl or wget to download content

Pro shows the line behind each finding and how to fix it

Scanned September 12, 2026

npx -y skills add archibate/dotfiles-opencode --skill github-fetch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Github Fetch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Github Fetch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/archibate-github-fetch/badge)](https://www.skillsdirectory.com/skills/archibate-github-fetch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: github-fetch
description: 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 project without making it a permanent workspace.
color: cyan
---

# GitHub Fetch

## When to Use
- Studying source code of a GitHub repo for one-off analysis
- Reading a single file or small number of files from a repo
- Exploring project structure, implementation patterns, or API design
- Not for permanent work — use a proper workspace for that

## Mode 1: Full Repo Clone

Clone to the standard temp location with shallow depth:

```bash
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.

```bash
# 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:

```bash
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
- Always use `--depth=1` — no history needed for study
- `/tmp/github/` is the standard clone location (auto-cleaned on reboot)
- Do not commit or push changes from `/tmp` clones
- Prefer Mode 2 (single file) when only one or two files are needed — faster and lighter
- Prefer Mode 1 (full clone) when exploring structure, searching across files, or reading many files

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.