agentleFS
CIrcui-tryCIrcui-try/Circuit/.agents/skills/gh-auth-check/SKILL.md

gh-auth-check

Skill5 starsChanged 6 months agoMITView on GitHub

gh 명령 직전 GitHub CLI 로그인 상태와 active account 를 확인

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

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

    line 8

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 등)를 짧게 안내한다.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.