Always use gh instead of curl, wget, or WebFetch for GitHub URLs. The gh CLI uses the user's authenticated token automatically, so it:
To read or browse files from a GitHub repo, clone it locally and use normal file tools (Read, Glob, Grep). This is much faster and more natural than fetching files one-by-one via the API.
After cloning, use the Explore agent (via the Task tool with subagenttype=Explore) to investigate the cloned repo. The Explore agent can use Read, Glob, and Grep across the clone efficiently — much better than calling them one at a time:
Leitet die Verwendung der GitHub CLI (gh) für die Interaktion mit GitHub-Repositorys, PRs, Issues und API. Verwenden Sie diese Option, wenn Sie mit GitHub-Ressourcen anstelle von WebFetch oder Curl arbeiten. Quelle: trailofbits/skills.