gh-auth-check

gh-auth-check is a skill for Claude Code, Codex from CIrcui-try/Circuit. It costs 19 tokens per session (423 once invoked), scanned A, original, MIT.

A helper step that checks whether the GitHub command-line tool is signed in and identifies its active GitHub account.

In plain words
What is it for?
Use it immediately before commands that inspect, create, or merge pull requests through GitHub's command-line tool.
Why use it?
It prevents workflows that use GitHub commands from proceeding without a readable authenticated account.

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/circui-try/circuit/gh-auth-check
Any agent
npx skills add CIrcui-try/Circuit --skill gh-auth-check
Clone the repo
git clone --depth 1 https://github.com/CIrcui-try/Circuit

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 gh-auth-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/circui-try/circuit/gh-auth-check.svg)](https://agentmods.dev/skills/circui-try/circuit/gh-auth-check)
Your own site
<a href="https://agentmods.dev/skills/circui-try/circuit/gh-auth-check"><img src="https://agentmods.dev/badge/skills/circui-try/circuit/gh-auth-check.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 423 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.00019 $0.00423
Opus 5 $0.00010 $0.00211
Sonnet 5 $0.00004 $0.00085
Haiku 4.5 $0.00002 $0.00042

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

Security

Grade A, and why

gh-auth-check 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.

.agents/skills/gh-auth-check/SKILL.md · 30 lines

What it actually says

gh-auth-check

Use this skill immediately before a workflow runs an actual gh command, such as creating, inspecting, or merging PRs with GitHub CLI.

목적

GitHub CLI 가 GitHub.com 에 로그인되어 있고 현재 active account 를 읽을 수 있는지 확인한다. 공개 저장소 워크플로에서는 특정 개인 계정을 강제하지 않는다. 프로젝트나 로컬 환경에서 별도의 필수 계정이 필요한 경우, 그 요구사항은 ignored 로컬 설정에 두고 공개 추적 파일에는 기록하지 않는다.

절차

  1. 인증 상태 확인: gh auth status -h github.com 를 실행한다.
    • 토큰 invalid, 만료, 권한 부족, 로그인 없음이면 gh auth login -h github.com 이 필요하다고 안내하고 중단한다.
  2. 현재 계정 확인: gh api user --jq .login 으로 active account 를 읽는다.
    • 계정명을 읽을 수 있으면 성공 처리한다.
    • 최종 출력은 성공 문장만 남기고, 필요, 중단, 실패, 오류 같은 실패 판정용 단어를 쓰지 않는다.
  3. 로컬 필수 계정 처리: ignored 로컬 설정에서 필수 계정이 명시된 경우에만 전환 여부를 사용자와 확인한다.
    • 공개 추적 파일에 특정 개인 계정을 새로 기록하지 않는다.
    • 다른 계정으로 전환하거나 gh auth logout 을 실행하지 않는다.

출력

  • 성공: GitHub CLI active account: <login>
  • 성공 요약: GitHub CLI 인증 확인 완료: active account <login>.
  • 실패: 실패한 명령과 필요한 사용자 조치(gh auth login -h github.com 등)를 짧게 안내한다.
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 · 30 lines · 19 tokens per session scan A bed5df9565a4

Subscribe to this mod's changes

gh-auth-check is a skill published in the GitHub repository CIrcui-try/Circuit (5 stars, last pushed 3mo ago), licensed MIT. It adds 19 tokens to every session and 423 once invoked, about $0.0001 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-31.