Dev read gh public repo

From Takazudo/claude-resources · View interactive version

Dev read gh public repo is an AI agent skill from the GitHub repository Takazudo/claude-resources. Read a PUBLIC GitHub repo that the web environment's GitHub MCP reports as not configured for the session. Use on 'Access denied: repository ... is not configured' for a public repo.

How to use this skill

Skill file

Read a public GitHub repo that's out of MCP scope

The problem

In the Claude Code web/remote environment, the GitHub MCP tools (mcp__github__*)

are locked to an allow-list of repos chosen when the session was created. Reading any

other repo — even a public one — fails like this:

Access denied: repository "owner/name" is not configured for this session.
Allowed repositories: <only-the-scoped-ones>

The fix — try in this order

1. Add the repo to session scope (primary path)

Call the platform's add_repo tool (mcp__Claude_Code_Remote__add_repo in this

container) with the owner/repo — this is the supported way to widen scope

mid-session (see CODE0, "Repo scope": "For

cross-repo work, add the target repo via the platform's add_repo"). On success it

returns a clone command; run it, then call register_repo_root so the harness picks

up the new repo. After that, the normal mcp__github__* tools / Read / Grep work

against it like any in-scope repo — full read access (issues, PRs, file contents),

not just a one-off file dump.

If add_repo is unavailable in this session, or the call is denied

(authorization/policy error, GitHub App not installed for the repo), fall through

to step 2.

2. Codeload tarball fetch (fallback)

Fetch a tarball over plain HTTPS instead of using git — the same bootstrap

pattern dev-setup-webenv uses to pull claude-resources into a web session:

cd /tmp && curl -fsSL "https://github.com/<owner>/<repo>/archive/refs/heads/<branch>.tar.gz" -o repo.tar.gz \
  && mkdir -p <repo> && tar -xzf repo.tar.gz -C <repo> --strip-components=1
# now Read / Grep files under /tmp/<repo>

Try the actual default branch first (commonly main, then master if that 404s).

3. Plain `git clone` — verify before relying on it

cd /tmp && git clone --depth 1 https://github.com/<owner>/<repo>.git

Whether this works depends on how this session's git proxy is scoped, and that has

been observed to vary: some container configurations reject git clone/`git

ls-remote` of an out-of-scope repo with a 403 (the assumption documented in

dev-setup-webenv), while a plain git clone of a public, out-of-scope repo has

also been observed to succeed outright in-container. Don't assume either outcome —

check first with git ls-remote --exit-code https://github.com/<owner>/<repo> HEAD

(expect a commit hash, not an error) before depending on it. Steps 1–2 above don't

depend on this uncertain behavior, so prefer them.

Gotchas

git clone git@github.com:owner/repo.git dies with ssh: not found. Always use

the https://github.com/... URL (or the codeload tarball URL).

the environment's outbound network policy allows github.com /

codeload.github.com.

user's project) so the checkout stays ephemeral and never gets committed by

accident.

fetch full history if you actually need it.

Limits — don't misapply

grants no write access and is not a substitute for proper repo scope.

scope via add_repo (or real auth) — a plain HTTPS clone/tarball fetch will 404

or prompt for credentials and fail.

checkout instead — don't reach for this.

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.