aemerson-commits/shareable-skills/gh-repo-recon
Claude Code and agent skill by aemerson-commits/shareable-skills
- community
Checking that the SKILL.md file is still in the repository.
Read a GitHub repository you haven't cloned — its code, its issues and PRs, or its security posture — through the `gh` API instead of cloning it. Use when evaluating a dependency or platform before adopting it, tracing how another repo implements something, auditing rulesets / branch protection / deploy keys / Dependabot alerts, or answering 'who merged what' on a repo whose files you don't need. Triggers: 'look at <owner>/<repo>', 'how does X implement Y', 'audit our repo settings', 'check branch protection', 'who merged these PRs'. NOT for the repo you already have checked out (use Grep/Read) and NOT for CI status on your own PR (use `gh pr checks`).
Install
npx vskill@latest install aemerson-commits/shareable-skills/gh-repo-reconSKILL.md
The same SKILL.md was published earlier as aemerson-commits/shareable-skills/gh-repo-recon.
gh-repo-recon
Read a repo you haven't cloned. Cloning to answer one question costs a full fetch, leaves a directory to clean up, and still can't answer the governance questions — rulesets, branch protection, deploy keys, merge attribution, and Dependabot alerts live only in the API.
Work outside-in: shape, then source, then history. Stop at the first layer that answers the question — most questions end at layer 2.
Layer 1 — Shape
Read default_branch from layer 1 instead of assuming main — a recursive tree call against the wrong branch name returns a 404 that reads like a permissions problem.
Layer 2 — Source
Download to a scratch dir, then read ranges. Progressive drilling beats fetching whole files:
Same discipline as reading an unfamiliar local module: map the API surface before deep-reading — grep -n '^export\|^function\|^async function' the downloaded file first.
Layer 3 — Cross-repo code search
Code search indexes the default branch only and lags a push by minutes to hours. A zero result is weak evidence of absence — confirm against the layer-1 tree before concluding the term isn't there.
Layer 4 — Issues and PRs
Batch by loop, not one call per turn.
Three traps that cost real time:
- `mergeable` is `null`/UNKNOWN until the host computes it in the background, and CI status
says nothing about it. Reading a PR as "green and ready" from checks alone can queue a CONFLICTING PR as ready and produce a hard merge failure. Read mergeable, and if it's null, re-request rather than assuming.
- A review verdict can be stale-by-head and read exactly like an uncleared one. A block
posted minutes after the commit that fixed it carries no marker saying so. Compare the verdict's recorded HEAD= against the PR's current head — that comparison is the read, not the verdict word.
- Deleting a branch on merge can silently close a PR stacked on top of it. If PR B's base is
PR A's branch, merging A with --delete-branch (or the UI's "delete branch" checkbox) can take B down with it — with no separate warning that a second, still-open PR was affected. Before deleting a merged branch, check whether anything else has it as a base: gh pr list --state open --base <branch-being-deleted>.
Layer 5 — Governance and security posture
The layer with no local equivalent. Loop it across repos when auditing more than one.
- A ruleset can bypass branch protection, so read both — protection alone doesn't answer "can
this actor push to main".
- A Dependabot alert list lags a landed fix. Alerts still reading open right after a patch
merges is usually the rescan lagging, not a failed fix — confirm the patched version is on the branch before treating the count as current.
- A wrong-token 200 can be a login page, not a success. When probing anything behind an auth
wall, check the response body, not just the status code.
Layer 6 — Fall back to a shallow clone
The API can't express ancestry. When the question is "is this commit on that branch" or "what would this merge do", clone blobless and answer it with git:
API-first, clone as the last resort — not the reverse.
Notes
- Every command here is a read except the
gh pr merge/gh pr closeyou might reach for
at the end of an investigation. Cross-repo writes (merge, close, comment, delete a branch) are ordinary gated actions — confirm before acting on a repo the current task didn't name.
--jqprojections keep output small; prefer them over piping whole JSON bodies into context.- Rate limit:
gh api rate_limit --jq '.resources.core'. Code search has its own, much lower
limit — don't loop it as freely as the other endpoints.
Cross-links
pre-merge-review— reviewing a diff you're about to merge, rather than reading a repo you
don't have checked out
research-gate§ Phase 0 — checking whether an open PR already covers the feature before
researching it, using the same gh pr list primitive
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/gh-repo-recon/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aemerson-commits/shareable-skills/gh-repo-recon)