plugins/scm-utils/skills/auth-user/SKILL.md
Identify the authenticated user for GitHub CLI (gh) and Git
npx skillsauth add nsheaps/ai-mktpl auth-userInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill helps identify which user account is authenticated for GitHub CLI (gh) and Git operations. Use this to troubleshoot authentication issues, verify the correct account is in use, or understand how credentials are configured.
| Method | Command | Shows |
| ------------------ | ----------------------------- | ---------------------------------- |
| GitHub CLI | gh auth status | Active gh account, auth method |
| HTTPS credentials | git credential fill | Stored username/password for HTTPS |
| SSH connection | ssh -T [email protected] | SSH key owner |
| Token verification | GH_TOKEN=... gh auth status | Token owner |
gh)gh auth status
Example output:
github.com
✓ Logged in to github.com account octocat (/home/user/.config/gh/hosts.yml)
- Active account: true
- Git operations protocol: https
- Token: ghp_************************************
- Token scopes: 'gist', 'read:org', 'repo', 'workflow'
gh auth status --hostname github.example.com
gh config list
Shows settings like git_protocol, editor, and prompt.
To see who a specific token belongs to:
GH_TOKEN="your_token_here" gh auth status
This is useful when you have a token (e.g., from environment variables or CI) and need to verify which account it authenticates as.
gh auth token
Returns the raw token for the current account.
echo "protocol=https
host=github.com" | git credential fill
Example output:
protocol=https
host=github.com
username=octocat
password=ghp_xxxxxxxxxxxxxxxxxxxx
echo "protocol=https
host=gitlab.com" | git credential fill
echo "url=https://github.com" | git credential fill
Credentials may be stored in different locations depending on the credential helper:
| Helper | Storage Location |
| -------------- | -------------------------------- |
| store | ~/.git-credentials (plaintext) |
| cache | In-memory (temporary) |
| osxkeychain | macOS Keychain |
| manager | Windows Credential Manager |
| manager-core | Git Credential Manager |
Check configured helper:
git config --get credential.helper
ssh -T [email protected]
Successful output:
Hi octocat! You've successfully authenticated, but GitHub does not provide shell access.
The username shown is the GitHub account associated with your SSH key.
ssh -vT [email protected]
Shows which key file is being used for authentication.
# GitLab
ssh -T [email protected]
# Output: Welcome to GitLab, @username!
# Bitbucket
ssh -T [email protected]
# Output: authenticated via ssh key.
echo "protocol=ssh
host=github.com" | git credential fill
Note: SSH typically uses key-based auth, so this may not return credentials.
If you have multiple GitHub accounts:
# List all authenticated accounts
gh auth status
# Switch between accounts
gh auth switch
When HTTPS and SSH credentials point to different accounts:
Check which protocol Git is using:
git config --get remote.origin.url
URLs starting with https:// use HTTPS credentials
URLs starting with git@ use SSH keys
To see what permissions a token has:
gh auth status
Look for "Token scopes" in the output.
Based on the argument ($ARGUMENTS), check the relevant authentication method:
gh or no argument: Run gh auth status and gh config listgit or https: Run the git credential fill command for HTTPSssh: Run ssh -T [email protected]all: Run all checks and summarize which accounts are configuredAfter running commands, summarize:
tools
Manually reproduce what the github-app plugin's SessionStart hook does to make a GitHub App installation token usable in the current session — materialize the PEM, generate the token, isolate GH_CONFIG_DIR, write the runtime env file, and wire CLAUDE_ENV_FILE so every Bash call sees GH_TOKEN/GITHUB_TOKEN. Use when the hook did not run, the token is missing from the environment, or a shell/teammate needs the token wired up by hand. <example>GH_TOKEN isn't set even though github-app is configured</example> <example>the github-app SessionStart hook didn't run, set up the token manually</example> <example>wire the github app token into CLAUDE_ENV_FILE</example> <example>gh keeps falling back to the wrong account, isolate GH_CONFIG_DIR</example>
tools
Manually configure the GitHub App bot git identity the way the github-app plugin's SessionStart hook does — resolve the app slug and bot user ID, build the <slug>[bot] name and noreply email, set GIT_AUTHOR_*/GIT_COMMITTER_* env vars, and write an isolated GIT_CONFIG_GLOBAL with the gh auth git-credential helper. Use when commits are attributed to the wrong account, "Author identity unknown" appears, or git identity must be set up by hand. <example>my commits are showing up as the handler, not the bot</example> <example>git says Author identity unknown after the github-app hook ran</example> <example>configure the github app bot git identity manually</example> <example>set up the gh credential helper for git push</example>
tools
Manages spec files for requirements capture and validation
tools
# Bash Chaining Alternatives This skill teaches you how to work around the bash command chaining restriction enforced by this plugin. ## Why Chaining is Blocked The `bash-command-rejection` plugin blocks these operators: | Operator | Name | Why Blocked | | -------- | ---------- | ----------------------------------------------------------------------------------- | | `&&` | AND chain | Runs cmd2 only if cmd1 su