github-fetch

Clones GitHub repositories or fetches single files via raw URLs.

6|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/archibate/archibate-skills --skill github-fetch-archibate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-fetch
Source: https://github.com/archibate/archibate-skills/tree/main/old-skills/marginal-skills/github-fetch
Command: npx skills add https://github.com/archibate/archibate-skills --skill github-fetch-archibate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a fast, low-friction way to read or analyze code and documentation from GitHub repositories without creating a permanent workspace, avoiding large clones and unnecessary history.

Core Features & Use Cases

  • Shallow full-repo clone to a standardized temporary path for exploring project structure or running repository-wide searches.
  • Single-file retrieval using raw.githubusercontent URLs for fast access to individual files like READMEs, configuration, or source snippets.
  • Practical rules and fallbacks: prefer --depth=1, reuse existing /tmp clones, try main then master branches, and avoid committing from temporary clones.
  • Use Case: Inspect a project's API design by shallow-cloning the repo to /tmp for a quick grep across source files, or fetch a single README or LICENSE file directly.

Quick Start

Use github-fetch to read the README or fetch a single file from https://raw.githubusercontent.com/USER/REPO/main/path/to/file.

Frequently Asked Questions about github-fetch

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

FAQPage Schema
How do I fetch a single file from a GitHub repository without downloading the full repo?

To fetch single files from a GitHub repository, use raw.githubusercontent URLs to retrieve individual files like READMEs or configuration snippets directly, avoiding a full clone and unnecessary download history.

What is the best way to quickly inspect a GitHub repository structure for code analysis?

The best way to inspect a GitHub repository structure is using a shallow clone with --depth=1, which downloads the project to a temporary path quickly for repository-wide searches and code analysis without permanent workspace setup.

Does shallow cloning a GitHub repo to a temporary directory work for reading source code?

Shallow cloning a GitHub repo to a temporary directory works for reading source code by fetching only the latest commit, allowing you to explore project structure and grep across files with minimal download time.

Why does fetching a GitHub file fail when using the main branch URL?

Fetching a GitHub file fails when using the main branch URL if the repository uses the master branch instead; the tool handles this by falling back from main to master to retrieve the requested file successfully.

Can I commit changes from a temporary shallow clone of a GitHub repository?

You should not commit changes from a temporary shallow clone, as these clones are designed for one-off analysis and reading of source code in a temporary /tmp directory rather than serving as a permanent development workspace.

How do I read a GitHub README directly without cloning the entire repository?

You can read a GitHub README directly by fetching it via raw.githubusercontent URLs, enabling fast, low-friction access to documentation and source snippets without downloading the entire repository history.