switch-github-creds

switch-github-creds is a skill for Claude Code, Codex from BrianV1981/aim. It costs 17 tokens per session (333 once invoked), scanned A, original, MIT.

A procedure for changing which logged-in GitHub account the command-line tool uses. GitHub is a code-hosting service, and the command-line tool can have several accounts configured.

In plain words
What is it for?
Use it to check the active account, select another logged-in account, and retry Git or GitHub operations with the correct permissions.
Why use it?
It helps resolve permission errors when the currently selected account cannot access a repository or perform an operation.

Skill for Claude CodeCodex

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

Good fit Use it to check the active account, select another logged-in account, and retry Git or GitHub operations with the correct permissions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/brianv1981/aim/switch-github-creds
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 BrianV1981/aim --skill switch-github-creds
Clone the repo
git clone --depth 1 https://github.com/BrianV1981/aim

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 switch-github-creds

README.md
[![agentmods](https://agentmods.dev/badge/skills/brianv1981/aim/switch-github-creds/github.svg)](https://agentmods.dev/skills/brianv1981/aim/switch-github-creds)
Your own site
<a href="https://agentmods.dev/skills/brianv1981/aim/switch-github-creds"><img src="https://agentmods.dev/badge/skills/brianv1981/aim/switch-github-creds/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for switch-github-creds

Your own site · 80×15
<a href="https://agentmods.dev/skills/brianv1981/aim/switch-github-creds"><img src="https://agentmods.dev/badge/skills/brianv1981/aim/switch-github-creds.svg" alt="Reviewed on agentmods" width="80" 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 333 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.00017 $0.00333
Opus 5.5 $0.00007 $0.00133
Sonnet 5.5 $0.00003 $0.00067
Haiku 4.5 $0.00002 $0.00033

Measured 1mo ago against content hash 31dc8b8653d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

switch-github-creds 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 1mo 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/switch-github-creds/SKILL.md · 32 lines

What it actually says

<activated_skill>

Skill: switch-github-creds

This skill explains how to switch the active GitHub credentials used by the gh CLI tool when you encounter 403 Forbidden errors or permission issues during git push or other GitHub API operations.

Context

When multiple GitHub accounts are logged in via the GitHub CLI, git commands (if configured to use the gh credential helper) and gh API commands will default to the active account. If you attempt to push to a repository that your active account does not have write access to, you will receive a 403 Forbidden error.

Workflow

  1. Check Current Status: Run gh auth status to see all logged-in accounts and identify which one is currently active.

  2. Identify the Correct Account: Determine the username of the account that has permissions to the target repository (e.g., BrianV1981).

  3. Switch the Active Account: Execute the following command to switch the active context to the correct user:

    gh auth switch -u <USERNAME>
    

    Example: gh auth switch -u BrianV1981

  4. Verify and Execute: After switching, you will see a success message (✓ Switched active account for github.com to <USERNAME>). You can now safely execute your git push origin main or other GitHub operations.

</activated_skill>

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. 1mo ago First seen · 32 lines · 17 tokens per session scan A 31dc8b8653d3

Subscribe to this mod's changes

switch-github-creds is a skill published in the GitHub repository BrianV1981/aim (13 stars, last pushed 2mo ago), licensed MIT. It adds 17 tokens to every session and 333 once invoked, about $0.0001 per session on Opus 5.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-30.

Related

Other skills, from other repositories

implement

Full implementation mode - end-to-end feature implementation with phased execution, parallel work streams, verification gates, and atomic commits per phase.

thoreinstein/beads-workflow · 27 tokens

commit

Analyze unstaged and staged changes, suggest atomic commit groups with conventional commit messages. NEVER pushes to remote.

thoreinstein/beads-workflow · 23 tokens

release

Author release notes, changelog, and signed release tag.

thoreinstein/beads-workflow · 13 tokens

spec-kitty-git-workflow

Understand how Spec Kitty manages git: what git operations Python handles automatically, what agents must do manually, worktree lifecycle, auto-commit behavior, merge execution, and the safe-commit pattern. Triggers: "how does spec-kitty use git", "worktree management", "auto-commit", "who commits what", "git…

Priivacy-ai/spec-kitty · 125 tokens

release-and-publish

Ship a release end-to-end across every registry the project targets (npm, MCP Registry, GitHub Releases for .mcpb bundles, GHCR). Runs the final verification gate, fast-forwards main when the release rode a release PR, creates the annotated tag on the commit main now points at, pushes commits and tags, then publishes…

cyanheads/obsidian-mcp-server · 155 tokens

release-pr-review

Review pass on an open release PR (release/ → main) — the step between git-wrapup and release-and-publish when a project releases in gated release PR mode. Reads the PR's commit range through the code-simplifier lens plus a correctness review, verifies whatever an automated reviewer left on the PR, lands fixes as…

cyanheads/obsidian-mcp-server · 136 tokens