Agent skill

GitHub Auth

by RedWoodOG in RedWoodOG/Hermes-Desktop

Set up GitHub authentication for the agent using git (universally available) or the gh CLI.

MITAuto-check: warningsBackend & APIs

Install GitHub Auth

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add RedWoodOG/Hermes-Desktop --skill github-auth -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install RedWoodOG/Hermes-Desktop github-auth --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/RedWoodOG/Hermes-Desktop.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/github/github-auth .claude/skills/github-auth && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
github-auth
GitHub stars
177
Used in
3 other repos
Token cost
~1.9k tokens
SKILL.md length
554 words
Files
2 (incl. scripts)
Skills in repo
62
Repo updated
First seen
Licence
MIT

At a glance

Set up GitHub authentication for the agent using git (universally available) or the gh CLI.

  • Works in 3 steps: If gh auth status shows authenticated →… → If gh is installed but not authenticated… → If gh is not installed → use "git-only"…
  • Tasks that involve Authentication
  • SKILL.md covers Detection Flow, Method 1: Git-Only…, Method 2: gh CLI Authentication and Using the GitHub API Without gh, plus 1 more section
  • Runs Shell scripts from its folder; calls git, gh and ssh; reaches github.com and api.github.com; needs GITHUB_TOKEN and THEIR_TOKEN

What it does

GitHub Auth is an agent skill from RedWoodOG/Hermes-Desktop. Set up GitHub authentication for the agent using git (universally available) or the gh CLI. Covers HTTPS tokens, SSH keys, credential helpers, and gh auth — with a detection flow to pick the right method automatically.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/gh-env.sh`).

It sits in Backend & APIs, covering Authentication and Git workflow. It works with GitHub and Git. The licence is MIT.

When your agent uses it

  • Tasks that involve Authentication
  • Tasks that involve Git workflow

Example prompts

  • “/github-auth”

Requirements

  • A Bash shell
  • A credential in THEIR_TOKEN
  • A credential in GITHUB_TOKEN

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. If gh auth status shows authenticated → you're good, use gh for everything
  2. If gh is installed but not authenticated → use "gh auth" method below
  3. If gh is not installed → use "git-only" method below (no sudo needed)

What it can do on your machine

Read from SKILL.md and the folder at commit be46b39. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • gh
    • ssh
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com
    • api.github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GITHUB_TOKEN
    • THEIR_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

GitHub Auth loads about 1.9k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 554 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • NoteRuns commands with sudoSKILL.md:37
    talled → use "git-only" method below (no sudo needed)
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:117
    ls -la ~/.ssh/id_*.pub 2>/dev/null || echo "No SSH keys found"
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:124
    ed25519 -C "their-email@example.com" -f ~/.ssh/id_ed25519 -N ""
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:127
    cat ~/.ssh/id_ed25519.pub
  • NoteMentions a .env fileSKILL.md:222
    elif [ -f ~/.hermes/.env ] && grep -q "^GITHUB_TOKEN=" ~/.hermes/.env; then
  • NoteMentions a .env fileSKILL.md:223
    _TOKEN=$(grep "^GITHUB_TOKEN=" ~/.hermes/.env | head -1 | cut -d= -f2 | tr -d '\n\r')
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:243
    443` and `Hostname ssh.github.com` to `~/.ssh/config` |
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:245
    with different keys per host alias in `~/.ssh/config`, or per-repo credential URLs |
  • NoteRuns commands with sudoSKILL.md:246
    | `gh: command not found` + no sudo | Use git-only Method 1 above — no installation needed |

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from RedWoodOG/Hermes-Desktop at commit be46b39, republished under its MIT licence (© RedWoodOG). 554 words, ~1,911 tokens.

Download SKILL.mdSave it as .claude/skills/github-auth/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
github-auth
description
Set up GitHub authentication for the agent using git (universally available) or the gh CLI. Covers HTTPS tokens, SSH keys, credential helpers, and gh auth — with a detection flow to pick the right method automatically.
version
1.1.0
author
Hermes Agent
license
MIT

GitHub Authentication Setup

This skill sets up authentication so the agent can work with GitHub repositories, PRs, issues, and CI. It covers two paths:

  • git (always available) — uses HTTPS personal access tokens or SSH keys
  • gh CLI (if installed) — richer GitHub API access with a simpler auth flow

Detection Flow

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

bash
# Check what's available
git --version
gh --version 2>/dev/null || echo "gh not installed"

# Check if already authenticated
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 → you're good, use gh for everything
  2. If gh is installed but not authenticated → use "gh auth" method below
  3. If gh is not installed → use "git-only" method below (no sudo needed)

Method 1: Git-Only Authentication (No gh, No sudo)

This works on any machine with git installed. No root access needed.

This is the most portable method — works everywhere, no SSH config needed.

Step 1: Create a personal access token

Tell the user to go to: https://github.com/settings/tokens

  • Click "Generate new token (classic)"
  • Give it a name like "hermes-agent"
  • Select scopes:
    • repo (full repository access — read, write, push, PRs)
    • workflow (trigger and manage GitHub Actions)
    • read:org (if working with organization repos)
  • Set expiration (90 days is a good default)
  • Copy the token — it won't be shown again

Step 2: Configure git to store the token

bash
# Set up the credential helper to cache credentials
# "store" saves to ~/.git-credentials in plaintext (simple, persistent)
git config --global credential.helper store

# Now do a test operation that triggers auth — git will prompt for credentials
# Username: <their-github-username>
# Password: <paste the personal access token, NOT their GitHub password>
git ls-remote https://github.com/<their-username>/<any-repo>.git

After entering credentials once, they're saved and reused for all future operations.

Alternative: cache helper (credentials expire from memory)

bash
# Cache in memory for 8 hours (28800 seconds) instead of saving to disk
git config --global credential.helper 'cache --timeout=28800'

Alternative: set the token directly in the remote URL (per-repo)

bash
# Embed token in the remote URL (avoids credential prompts entirely)
git remote set-url origin https://<username>:<token>@github.com/<owner>/<repo>.git

Step 3: Configure git identity

bash
# Required for commits — set name and email
git config --global user.name "Their Name"
git config --global user.email "their-email@example.com"

Step 4: Verify

bash
# Test push access (this should work without any prompts now)
git ls-remote https://github.com/<their-username>/<any-repo>.git

# Verify identity
git config --global user.name
git config --global user.email
Option B: SSH Key Authentication

Good for users who prefer SSH or already have keys set up.

Step 1: Check for existing SSH keys

bash
ls -la ~/.ssh/id_*.pub 2>/dev/null || echo "No SSH keys found"

Step 2: Generate a key if needed

bash
# Generate an ed25519 key (modern, secure, fast)
ssh-keygen -t ed25519 -C "their-email@example.com" -f ~/.ssh/id_ed25519 -N ""

# Display the public key for them to add to GitHub
cat ~/.ssh/id_ed25519.pub

Tell the user to add the public key at: https://github.com/settings/keys

  • Click "New SSH key"
  • Paste the public key content
  • Give it a title like "hermes-agent-<machine-name>"

Step 3: Test the connection

bash
ssh -T git@github.com
# Expected: "Hi <username>! You've successfully authenticated..."

Step 4: Configure git to use SSH for GitHub

bash
# Rewrite HTTPS GitHub URLs to SSH automatically
git config --global url."git@github.com:".insteadOf "https://github.com/"

Step 5: Configure git identity

bash
git config --global user.name "Their Name"
git config --global user.email "their-email@example.com"

Show full SKILL.md (227 more words)Show less

Method 2: gh CLI Authentication

If gh is installed, it handles both API access and git credentials in one step.

Interactive Browser Login (Desktop)
bash
gh auth login
# Select: GitHub.com
# Select: HTTPS
# Authenticate via browser
Token-Based Login (Headless / SSH Servers)
bash
echo "<THEIR_TOKEN>" | gh auth login --with-token

# Set up git credentials through gh
gh auth setup-git
Verify
bash
gh auth status

Using the GitHub API Without gh

When gh is not available, you can still access the full GitHub API using curl with a personal access token. This is how the other GitHub skills implement their fallbacks.

Setting the Token for API Calls
bash
# Option 1: Export as env var (preferred — keeps it out of commands)
export GITHUB_TOKEN="<token>"

# Then use in curl calls:
curl -s -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/user
Extracting the Token from Git Credentials

If git credentials are already configured (via credential.helper store), the token can be extracted:

bash
# Read from git credential store
grep "github.com" ~/.git-credentials 2>/dev/null | head -1 | sed 's|https://[^:]*:\([^@]*\)@.*|\1|'
Helper: Detect Auth Method

Use this pattern at the start of any GitHub workflow:

bash
# Try gh first, fall back to git + curl
if command -v gh &>/dev/null && gh auth status &>/dev/null; then
  echo "AUTH_METHOD=gh"
elif [ -n "$GITHUB_TOKEN" ]; then
  echo "AUTH_METHOD=curl"
elif [ -f ~/.hermes/.env ] && grep -q "^GITHUB_TOKEN=" ~/.hermes/.env; then
  export GITHUB_TOKEN=$(grep "^GITHUB_TOKEN=" ~/.hermes/.env | head -1 | cut -d= -f2 | tr -d '\n\r')
  echo "AUTH_METHOD=curl"
elif grep -q "github.com" ~/.git-credentials 2>/dev/null; then
  export GITHUB_TOKEN=$(grep "github.com" ~/.git-credentials | head -1 | sed 's|https://[^:]*:\([^@]*\)@.*|\1|')
  echo "AUTH_METHOD=curl"
else
  echo "AUTH_METHOD=none"
  echo "Need to set up authentication first"
fi

Troubleshooting

ProblemSolution
git push asks for passwordGitHub disabled password auth. Use a personal access token as the password, or switch to SSH
remote: Permission to X deniedToken may lack repo scope — regenerate with correct scopes
fatal: Authentication failedCached credentials may be stale — run git credential reject then re-authenticate
ssh: connect to host github.com port 22: Connection refusedTry SSH over HTTPS port: add Host github.com with Port 443 and Hostname ssh.github.com to ~/.ssh/config
Credentials not persistingCheck git config --global credential.helper — must be store or cache
Multiple GitHub accountsUse SSH with different keys per host alias in ~/.ssh/config, or per-repo credential URLs
gh: command not found + no sudoUse git-only Method 1 above — no installation needed

© RedWoodOG, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in skills/github/github-auth of RedWoodOG/Hermes-Desktop.

  • SKILL.md
  • scripts/gh-env.sh

Open the folder on GitHubat commit be46b39

Used in 3 other repositories

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 3 other GitHub owners. This page covers the copy in RedWoodOG/Hermes-Desktop, which our catalogue first saw on October 7, 2026.

Compare with similar skills

GitHub Auth next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

GitHub Auth compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
GitHub Auth this skillRedWoodOG/Hermes-Desktop1773 repos~1.9kAutomated safety check: WarnMIT
Authmicrosoft/apm4k—~756Automated safety check: PassMIT
Project Session ManagementMicrock/ordinary-claude-skills401—~1.9kAutomated safety check: PassCustom licence
Accessing GitHub Reposoaustegard/claude-skills150—~2.2kAutomated safety check: NotesMIT
Hunk Release Workflowmodem-dev/hunk9.5k—~3.8kAutomated safety check: PassMIT
Ansible Backport Creatoransible/ansible71k—~1.2kAutomated safety check: PassGPL-3.0

Similar skills

  • Auth

    microsoft/apm

    Official

    Activate when code touches token management, credential resolution, git auth flows, GITHUBAPMPAT, ADOAPMPAT, AuthResolver, HostInfo, AuthContext, or any remote host authentication -- even if 'auth'…

    4k GitHub stars~756 tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Project Session Management

    Microck/ordinary-claude-skills

    Track progress across work sessions using SESSION.md with git checkpoints and concrete next actions.

    401 GitHub stars~1.9k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Accessing GitHub Repos

    oaustegard/claude-skills

    GitHub repository access in containerized environments using REST API and credential detection.

    150 GitHub stars~2.2k tokensUpdated 5 days ago
    Backend & APIsAuto-check: notes
  • Hunk Release Workflow

    modem-dev/hunk

    Maintainer workflow for preparing, publishing, verifying and curating Hunk releases, with confirmation gates before tags, publishes and public edits.

    9.5k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Creates backports of a merged Ansible devel pull request onto the right stable branches by cherry-picking its merge commit onto new backport branches.

    71k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Worktrunk Release Workflow

    max-sixty/worktrunk

    Walks a maintainer through cutting a Worktrunk release: sync the release branch, pass two test gates, review the changes, then publish.

    8.9k GitHub stars~6.9k tokensUpdated today
    DevelopmentAuto-check passed

More from RedWoodOG/Hermes-Desktop

All 62 skills in this repo
  • Obliteratus

    RedWoodOG/Hermes-Desktop

    Remove refusal behaviors from open-weight LLMs using OBLITERATUS — mechanistic interpretability techniques (diff-in-means, SVD, whitened SVD, LEACE, SAE decomposition, etc.) to excise guardrails…

    177 GitHub starsUsed in 6 repos~3.8k tokens
    Auto-check passed
  • Excalidraw

    RedWoodOG/Hermes-Desktop

    Create hand-drawn style diagrams using Excalidraw JSON format.

    177 GitHub starsUsed in 5 repos~1.8k tokens
    Auto-check passed
  • Ascii Video

    RedWoodOG/Hermes-Desktop

    Production pipeline for ASCII art video — any format. An agent skill from RedWoodOG/Hermes-Desktop.

    177 GitHub starsUsed in 2 repos~3.2k tokens
    Auto-check passed
  • Systematic Debugging

    RedWoodOG/Hermes-Desktop

    A skill your agent uses when encountering any bug, test failure, or unexpected behavior.

    177 GitHub starsUsed in 6 repos~2.6k tokens
    Auto-check passed
  • Test Driven Development

    RedWoodOG/Hermes-Desktop

    A skill your agent uses when implementing any feature or bugfix, before writing implementation code.

    177 GitHub starsUsed in 6 repos~2.4k tokens
    Auto-check passed
  • Claude Code

    RedWoodOG/Hermes-Desktop

    Delegate coding tasks to Claude Code (Anthropic's CLI agent).

    177 GitHub starsUsed in 4 repos~784 tokens
    Auto-check passed

Works with

Questions about GitHub Auth

What does GitHub Auth do?

Set up GitHub authentication for the agent using git (universally available) or the gh CLI. GitHub Auth is an agent skill from RedWoodOG/Hermes-Desktop. Set up GitHub authentication for the agent using git (universally available) or the gh CLI.

When should I use GitHub Auth?

GitHub Auth fits situations like: tasks that involve Authentication; tasks that involve Git workflow.

How do I install GitHub Auth in Claude Code?

Run `npx skills add RedWoodOG/Hermes-Desktop --skill github-auth -a claude-code`. Or copy the skill folder (skills/github/github-auth in RedWoodOG/Hermes-Desktop) into .claude/skills/github-auth in your project. Claude Code loads it when a task matches its description.

How do I install GitHub Auth in Codex?

Run `npx skills add RedWoodOG/Hermes-Desktop --skill github-auth -a codex`. Or copy the skill folder (skills/github/github-auth in RedWoodOG/Hermes-Desktop) into .agents/skills/github-auth in your project. Codex loads it when a task matches its description.

Can I use GitHub Auth in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add RedWoodOG/Hermes-Desktop --skill github-auth -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/github-auth, .gemini/skills/github-auth, .github/skills/github-auth and .opencode/skills/github-auth in your project.

What does GitHub Auth need to run?

Going by SKILL.md and its folder, GitHub Auth needs a shell for the scripts in its folder, the command-line tools its instructions call (git, gh, ssh and curl) and credentials named GITHUB_TOKEN and THEIR_TOKEN. Our summary lists: A Bash shell; A credential in THEIR_TOKEN; A credential in GITHUB_TOKEN.

Does GitHub Auth access the network?

SKILL.md names 2 domains. In commands or code: github.com and api.github.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is GitHub Auth safe to install?

Our automated static check of SKILL.md flagged 5 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does GitHub Auth use?

GitHub Auth is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does GitHub Auth use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to GitHub Auth?

Skills that share tags, products or a category with GitHub Auth: Auth (microsoft/apm, 4k stars), Project Session Management (Microck/ordinary-claude-skills, 401 stars), Accessing GitHub Repos (oaustegard/claude-skills, 150 stars) and Hunk Release Workflow (modem-dev/hunk, 9.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains GitHub Auth?

RedWoodOG (a GitHub user) maintains it in RedWoodOG/Hermes-Desktop, which has 177 GitHub stars. The repository holds 62 skills in this directory. The repository was last updated on May 30, 2026.

Source: RedWoodOG/Hermes-Desktop on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.