github-auth

github-auth is a skill for Claude Code, Codex from HezaoHezao/poirot. It costs 17 tokens per session (1,056 once invoked), scanned E, original, MIT.

A guide for setting up GitHub authentication, which proves to Git and GitHub that the agent is allowed to access repositories and related services.

In plain words
What is it for?
Use it to authenticate before cloning, pushing, or working with GitHub repositories, pull requests, issues, and continuous-integration workflows.
Why use it?
It helps avoid failed repository operations caused by missing credentials, while choosing between HTTPS tokens, SSH keys, and the GitHub command-line tool.

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/hezaohezao/poirot/github-auth
Any agent
npx skills add HezaoHezao/poirot --skill github-auth
Clone the repo
git clone --depth 1 https://github.com/HezaoHezao/poirot

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 github-auth

README.md
[![agentmods](https://agentmods.dev/badge/skills/hezaohezao/poirot/github-auth.svg)](https://agentmods.dev/skills/hezaohezao/poirot/github-auth)
Your own site
<a href="https://agentmods.dev/skills/hezaohezao/poirot/github-auth"><img src="https://agentmods.dev/badge/skills/hezaohezao/poirot/github-auth.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,056 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 3 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.00017 $0.01056
Opus 5 $0.00009 $0.00528
Sonnet 5 $0.00003 $0.00211
Haiku 4.5 $0.00002 $0.00106

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

Security

Grade E, and why

github-auth scanned grade E with 3 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.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

ssh-keygen -t ed25519 -C "[email protected]" -f ~/.ssh/id_ed25519_github

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user | python3 -c "import sys,json; print(json.load(sys.stdin)['login'])"

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user | python3 -c "import sys,json; print(json.load(sys.stdin)['login'])"
poirot/backend/agents/skill/builtin_skills/software-development/github-auth/SKILL.md · 150 lines

How it starts

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

GitHub Authentication Setup

Sets up authentication so the agent can work with GitHub repositories, PRs, issues, and CI.

Detection Flow

When a user asks to work with GitHub, run this check first:

git --version
gh --version 2>/dev/null || echo "gh not installed"
gh auth status 2>/dev/null || echo "gh not authenticated"
git config --global credential.helper 2>/dev/null || echo "no git credential helper"

Decision tree:

  1. If gh auth status shows authenticated → use gh for everything
  2. If gh installed but not authenticated → use "gh auth" method
  3. If gh not installed → use "git-only" method

Method 1: Git-Only (No gh)

HTTPS with Personal Access Token (Recommended)

Step 1: Create a token at https://github.com/settings/tokens (classic) or https://github.com/settings/personal-access-tokens (fine-grained). Scope: repo, workflow, read:org.

Step 2: Configure git credential helper:

# Store credentials (plaintext, dev machine only)
git config --global credential.helper store

# Or use a credential cache (timed, more secure)
git config --global credential.helper 'cache --timeout=3600'

Step 3: First push triggers prompt:

# Username: your GitHub username
# Password: paste your token (not your GitHub password)
git push origin main

Step 4 (optional): Set token as env var for API calls:

export GITHUB_TOKEN="ghp_xxxxxxxxxxxx"
# Add to .env for persistence

SSH Keys

# Generate key (if no existing key)
ssh-keygen -t ed25519 -C "[email protected]" -f ~/.ssh/id_ed25519_github

# Start ssh-agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519_github

# Copy public key
cat ~/.ssh/id_ed25519_github.pub
# Paste at https://github.com/settings/keys

# Test
ssh -T [email protected]

# Set remote to SSH
git remote set-url origin [email protected]:owner/repo.git

Method 2: gh CLI

# Install gh (if not present)
# macOS: brew install gh
# Linux: see https://github.com/cli/cli#installation
# Windows: winget install GitHub.cli

# Authenticate
gh auth login
# Follow prompts: choose HTTPS or SSH, authenticate via browser or token

# Verify
gh auth status

# Use gh for everything
gh repo clone owner/repo
gh pr create
gh issue list

Read the full file on GitHub · 150 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 · 150 lines · 17 tokens per session scan E 834a0a867e0c

Subscribe to this mod's changes

github-auth is a skill published in the GitHub repository HezaoHezao/poirot (213 stars, last pushed 1mo ago), licensed MIT. It adds 17 tokens to every session and 1,056 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it E with 3 findings (reaches for credential files, downloads and executes remote code, makes network calls). 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

commit

Atomic git commit with conventional message. Use when the user says "commit", "save my changes", "commit this", or wants to create a git commit. Stages specific files, writes a conventional commit message with body explaining non-obvious decisions. Never uses git add -A.

congchuanling-dot/Cohort · 59 tokens

python-run

Run and debug Python scripts in the project. Use when the user says "run python", "execute this script", "debug this py file", or wants to run/modify a .py file. Handles dependency checks, linting, execution, and error analysis.

congchuanling-dot/Cohort · 56 tokens

growmos

Use the repository's living knowledge graph (growmos, in .growmos/) as shared memory. Trigger when the user asks about how parts of the codebase relate, why a decision was made, who owns what, what depends on what; when you finish a meaningful piece of development and should record it; when growmos next reports…

codician-team/growmos · 97 tokens

StructuredMemoryManager

【每次新对话开始时必须首先调用】预加载用户偏好、习惯、历史决策等高优记忆,确保回复符合用户要求。也用于记录新偏好/习惯、保存任务总结、存储项目决策。.

wpc0323/StructuredMemoryManager · 60 tokens

growmos

Use the repository's living knowledge graph (growmos, in .growmos/) as shared memory. Trigger when the user asks about how parts of the codebase relate, why a decision was made, who owns what, what depends on what; when you finish a meaningful piece of development and should record it; when growmos next reports…

codician-team/growmos · 97 tokens

data_analysis

基于已确认数据执行可审计的数学计算和描述统计。.

bojieli/ai-agent-book · 19 tokens