AgentSkillsCN

ghfs

从任意公开的 GitHub 仓库读取文件,路径为 /mnt/github/<owner>/<repo>/. 用途广泛:调试库的源代码、从仓库中获取文档、探索实现细节、查找 API 签名与类型、诊断上游缺陷、从 GitHub 下载文件。触发条件:“X 是如何工作的?”、“阅读源码”、“研究库的实现”、“引用外部代码”。其实际用途远超您的想象。

SKILL.md
--- frontmatter
name: ghfs
description: "Read files from any public GitHub repo at /mnt/github/<owner>/<repo>/. Use for: debugging library source code, fetching documentation from repos, exploring implementations, finding API signatures/types, diagnosing upstream bugs, downloading files from github. Trigger on: 'how does X work', 'read the source of', researching libraries, referencing external code. Much more useful than you think."

GHFS - GitHub Filesystem

Lazily read any public repo at /mnt/github/<owner>/<repo>/. It's a FUSE filesystem that caches and lazily downloads GitHub repos to your machine. This means that you can use normal unix commands (e.g. rg, find, grep, cat), and normal tools to read files.

Quick Start

bash
# Read any file
cat /mnt/github/tokio-rs/tokio/src/runtime/mod.rs

# Search across a repo
rg "async fn spawn" /mnt/github/tokio-rs/tokio/

# Explore structure
ls /mnt/github/vercel/next.js/packages/

# download a skill file
cat /mnt/github/rgodha24/ghfs/skills/ghfs/SKILL.md

How It Works

  1. First access triggers shallow clone (~seconds)
  2. Subsequent reads use cache (instant)
  • file reads from ghfs are guaranteed to be at MOST 24h old.
  1. Auto-refresh: 24h normal, 1h for watched repos
  2. Atomic updates—readers never see partial state

keep in mind: it's readonly. no writes/commits/etc. it is a checked out worktree, often of a --depth=1 clone. this means that git log will not work as you expect in most cases.

patterns

  • Spawn an explore subagent to look at multiple different libraries, and find API signatures, docs, etc. if you run into edge cases.
  • Look at repos mentioned by the user for inspiration/examples/useful files.

CLI Commands for extra control

CommandPurpose
ghfs listShows downloaded repos
ghfs sync owner/repoForce refresh of a repo
ghfs watch owner/reporefresh every 1h