Skip to content
Agentmart
Submit a tool

switch-github-creds

A skill to switch GitHub credentials for the agent.

Skill by BrianV1981

IndexedMIT★ 13
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/brianv1981-switch-github-creds

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

A skill to switch GitHub credentials for the agent.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/switch-github-creds

What's inside

Skill name
switch-github-creds
Description
A skill to switch GitHub credentials for the agent.
License
MIT
Instructions
28 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

<activated_skill>
<instructions>
# 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:
   ```bash
   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.
</instructions>
</activated_skill>

From BrianV1981/aim, MIT.

Signals

Stars
13
Forks
1
Open issues
50
Last commit (this folder)
Jun 3, 2026 (4 months ago)
Last release
Mar 26, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from BrianV1981

Cite this page

switch-github-creds skill. Agent Mart. https://agentmart.dev/skills/brianv1981-switch-github-creds (last updated 2026-10-24)