github-auth-recovery

github-auth-recovery is a skill for Claude Code, Codex from davidtoby/agent-skills. It costs 90 tokens per session (780 once invoked), scanned A, original, MIT.

A troubleshooting guide for recovering GitHub access when Git or the GitHub command-line tool cannot authenticate.

In plain words
What is it for?
Use it to inspect remotes and branches, test GitHub authentication, switch to working SSH access, and safely prepare a push.
Why use it?
It helps identify whether the problem is with the repository remote, HTTPS credentials, the command-line login, or SSH, so failed operations are not retried blindly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect remotes and branches, test GitHub authentication, switch to working SSH access, and safely prepare a push.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/davidtoby/agent-skills/github-auth-recovery
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.

Any agent
npx skills add davidtoby/agent-skills --skill github-auth-recovery
Clone the repo
git clone --depth 1 https://github.com/davidtoby/agent-skills

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-recovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/davidtoby/agent-skills/github-auth-recovery.svg)](https://agentmods.dev/skills/davidtoby/agent-skills/github-auth-recovery)
Your own site
<a href="https://agentmods.dev/skills/davidtoby/agent-skills/github-auth-recovery"><img src="https://agentmods.dev/badge/skills/davidtoby/agent-skills/github-auth-recovery.svg" alt="Measured on agentmods" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 780 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00090 $0.00780
Opus 5 $0.00045 $0.00390
Sonnet 5 $0.00018 $0.00156
Haiku 4.5 $0.00009 $0.00078

Measured 3d ago against content hash 78d6f12b87ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

github-auth-recovery 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 3d 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.

skills/.archive/umbrella-curation-2026-04-29/user-imports/github-auth-recovery/SKILL.md · 129 lines

How it starts

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

GitHub Auth Recovery

Diagnose GitHub auth failures before retrying commands blindly.

Quick start

  1. Inspect the remote URL and current branch.
  2. Check whether gh is authenticated.
  3. Test whether GitHub SSH already works.
  4. If SSH works, prefer SSH over broken HTTPS credential flows.
  5. Fetch/rebase before pushing if the remote branch may have advanced.
  6. Verify the remote commit after push.

Core workflow

1. Inspect the repo state

Run:

git remote -v
git branch --show-current
git status --short

Identify whether origin is using HTTPS or SSH.

2. Check gh separately from git

Run:

gh auth status

Important: gh being unauthenticated does not imply GitHub SSH is unavailable.

3. Check HTTPS failure mode

If the remote is HTTPS and push/pull fails, capture the actual error first.

Typical signal:

  • fatal: could not read Username for 'https://github.com': Device not configured

This usually means the current HTTPS credential path is unusable in the current environment.

4. Test SSH before doing anything more complex

Run:

ssh -T [email protected]

If you get a success message like:

  • Hi <user>! You've successfully authenticated...

then prefer SSH git operations instead of continuing to fight HTTPS.

5. Switch strategy, not just credentials

If SSH works:

  • use SSH for git push
  • you may keep origin unchanged and push directly to an SSH URL, or update the remote if appropriate

Example direct push:

git push [email protected]:owner/repo.git HEAD:main

6. Re-sync with remote before push

Do this when someone else—or another process—may have updated the remote branch while you were debugging auth.

git fetch origin main
git rebase origin/main

Do not assume auth was the only problem. A stale local base can make the next push fail even after auth is fixed.

7. Verify the outcome

After push:

  • inspect local HEAD
  • confirm the remote commit SHA or latest commit message

Read the full file on GitHub · 129 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 129 lines · 90 tokens per session scan A 78d6f12b87ab

Subscribe to this mod's changes

github-auth-recovery is a skill published in the GitHub repository davidtoby/agent-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 90 tokens to every session and 780 once invoked, about $0.0005 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-09-03.

Related

Other skills, from other repositories

stale-patch-reconciliation

Use when a patch/diff must be compared with, repaired against, or refreshed for a moving checkout — "is this patch still needed", "does upstream already contain it", "what changed since it was written", "reconcile X.diff with HEAD", or "make apply-patches pass again".

AtlasOmnia/hermes-custom-pack · 26 tokens

conventional-commits

Format commit messages using the Conventional Commits specification. Use when creating commits, writing commit messages, or when the user mentions commits, git commits, or commit messages. Ensures commits follow the standard format for automated tooling, changelog generation, and semantic versioning.

danstrem2/clawdbot-skill-master-pack · 59 tokens

app-store-changelog

Create user-facing App Store release notes by collecting and summarizing all user-impacting changes since the last git tag (or a specified ref). Use when asked to generate a comprehensive release changelog, App Store "What's New" text, or release notes based on git history or tags.

danstrem2/clawdbot-skill-master-pack · 62 tokens

codex-review

Professional code review with auto CHANGELOG generation, integrated with Codex AI.

danstrem2/clawdbot-skill-master-pack · 18 tokens

commit

Skill "commit" from clacky-ai/openclacky, covering smart commit skill, critical requirement: single-line commits only, core philosophy, usage and process steps.

clacky-ai/openclacky · 0 tokens

devops-pipeline

Configure pre-commit hooks and lean GitHub Actions for shift-left quality assurance. Use when adding or auditing CI/CD to maximize local test coverage and minimize CI cost. Skip for Terraform/K8s, deployment pipelines, or non-GitHub CI providers.

luongnv89/skills · 56 tokens