checkout-credential-review

checkout-credential-review is a skill for Claude Code, Codex from github/gh-aw. It costs 49 tokens per session (974 once invoked), scanned A, original, MIT.

A review guide for code that runs Git or GitHub commands on checked-out repositories inside automated workflows. It focuses on whether credentials are available only where needed and whether checkout options are appropriate.

In plain words
What is it for?
Use it when reviewing or writing repository checkout and workflow code in gh-aw. It checks token handling, shallow or sparse checkouts, and contexts that must remain free of Git credentials.
Why use it?
It helps prevent remote operations from failing because credentials were not passed on, and reduces the risk of credentials remaining in the checked-out files.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/github/gh-aw/checkout-credential-review
Any agent
npx skills add github/gh-aw --skill checkout-credential-review
Clone the repo
git clone --depth 1 https://github.com/github/gh-aw

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for checkout-credential-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/github/gh-aw/checkout-credential-review.svg)](https://agentmods.dev/skills/github/gh-aw/checkout-credential-review)
Your own site
<a href="https://agentmods.dev/skills/github/gh-aw/checkout-credential-review"><img src="https://agentmods.dev/badge/skills/github/gh-aw/checkout-credential-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 974 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00049 $0.00974
Opus 5 $0.00024 $0.00487
Sonnet 5 $0.00010 $0.00195
Haiku 4.5 $0.00005 $0.00097

Measured 4d ago against content hash 7f6ff5da1d86, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

checkout-credential-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/checkout-credential-review/SKILL.md · 37 lines

How it starts

The opening of the file, as written. The whole thing — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Checkout Credential Review

Use this skill when reviewing or writing code in pkg/workflow/, actions/setup/js/, or compiled .lock.yml workflows that runs git, gh, or any other remote-touching operation against a repository checkout.

Background

Each entry in a workflow's checkout: block may declare its own credentials (github-token:, github-app:), and the compiler wires those into the corresponding actions/checkout step (pkg/workflow/checkout_step_generator.go). Generated checkouts always set persist-credentials: false, so the on-disk repo retains no credentials after the step finishes — only actions/checkout's own internal token is used during the clone, and it is scrubbed in its post-step.

A separate step that wants to authenticate later must either (a) re-inject a token at command level (e.g. git -c http.extraheader=...) or (b) be passed the per-checkout token via env. The compiler does not automatically thread per-checkout github-tokens into downstream steps.

Two important contexts deliberately run with no git credentials:

  • The safe-outputs MCP server and its handlers (generate_git_bundle.cjs, generate_git_patch.cjs, create_pull_request.cjs). Errors in these paths explicitly say "the safe-outputs MCP server has no credentials for private repositories" — fetch/push will fail for private repos.
  • The agent runtime after actions/checkout. The agent prompt in actions/setup/md/safe_outputs_push_to_pr_branch.md explicitly tells the model not to attempt git fetch, git pull, git push, or any other authenticated git operation, and to report unavailable branches rather than try to fetch them.

Review checklist

When you see a new git, gh, execFileSync('git'…), or compiled run: block:

  1. Does it touch a remote? Local-only commands (symbolic-ref, rev-parse, log, show, merge-base, diff, status) need no credentials. Anything in fetch | pull | push | clone | ls-remote | remote (set-url|add|update) does, plus on-demand blob fetches in partial clones.
  2. Which checkout is it operating on? If it's a cross-repo entry from checkout:, the relevant credential is that entry's github-token, not the workflow's default GITHUB_TOKEN. Confirm the per-entry token is actually threaded into the step's env (or refuse to do remote operations and degrade gracefully).
  3. Which job/context emits it? Agent job and safe-outputs MCP server both run without git credentials by design. Any remote git operation there must be wrapped in try/catch, fail soft, and surface a clear "no credentials" error rather than a raw git stderr.
  4. Sparse / shallow / monorepo concerns. Avoid emitting steps that deepen (git fetch --unshallow, --deepen=N) or widen (git fetch origin '+refs/heads/*') a sparse or shallow checkout of a large monorepo — these need credentials and can pull hundreds of MB. Prefer expanding fetch: / fetch-depth: / sparse-checkout: at compile time so it happens during actions/checkout with its internal token, never later.
  5. gh is REST, not git. gh api … uses whatever GH_TOKEN is in the step's env — it does not automatically inherit per-checkout PATs. For cross-org private repos, either thread the right token in or accept the call will 404 and handle it.

Read the full file on GitHub · 37 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 37 lines · 49 tokens per session scan A 7f6ff5da1d86

Subscribe to this mod's changes

checkout-credential-review is a skill published in the GitHub repository github/gh-aw (5,091 stars, last pushed today), licensed MIT. It adds 49 tokens to every session and 974 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

c-github

Interact with GitHub using the gh CLI and jq. Manage PRs, issues, repositories, and Actions workflows. Make raw API calls with gh api for anything not covered by built-in commands.

daxaur/openpaw · 48 tokens

watch-pr

Watch a GitHub pull request for CI status, reviews, comments, merge conflicts, and terminal states using the gh-watch extension. Use when the user wants to monitor a PR, wait for CI, or track PR progress.

justincampbell/gh-watch · 48 tokens

watch-tag

Watch a GitHub repository for new tags using the gh-watch extension. Use when the user wants to be notified when a tag is created, when a release is cut, or when a tag that includes a specific commit appears (e.g. "tell me when my merge ships in a release").

justincampbell/gh-watch · 62 tokens

watch-branch

Watch a GitHub branch for new commits using the gh-watch extension. Use when the user wants to be notified when new commits are pushed to a branch, monitor main for merges, or track branch activity.

justincampbell/gh-watch · 45 tokens

watch-commit

Watch a GitHub commit for CI status changes using the gh-watch extension. Use when the user wants to monitor a commit's CI checks, wait for a build to finish, or track CI progress on a specific SHA.

justincampbell/gh-watch · 48 tokens

gh-stack

Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack. Use for stack creation, viewing, edits, push, submit, sync, rebase, merge, or checkout; when asked to split or isolate work for review; whenever a user mentions a stack, branch layers, dependent PRs, or gh stack; or when a stack is…

github/gh-stack · 80 tokens