github-authenticator
π―Skillfrom edanstarfire/claudecode_webui
Authenticates and troubleshoots GitHub CLI access by verifying credentials, refreshing tokens, and resolving permission issues.
Installation
npx skills add https://github.com/edanstarfire/claudecode_webui --skill github-authenticatorSkill Details
Verify and troubleshoot GitHub CLI authentication. Use when gh commands fail with auth errors or when setting up GitHub integration for the first time.
Overview
# GitHub Authenticator
Instructions
When to Invoke This Skill
ghcommands fail with authentication errors- User is setting up GitHub CLI for the first time
- Need to verify current authentication status
- Switching between GitHub accounts
- Troubleshooting permission issues
Standard Workflow
- Check Current Authentication Status
```bash
gh auth status
```
- Interpret Output
- Logged in: Shows username, scopes, and token status
- Not logged in: Shows "You are not logged in to any GitHub hosts"
- Token expired: Shows authentication but with errors
- Handle Authentication Issues
If not authenticated:
```bash
gh auth login
```
- Choose: GitHub.com or GitHub Enterprise
- Choose: HTTPS (recommended) or SSH
- Authenticate via: Browser (recommended) or Token
- Complete authentication flow
If token expired:
```bash
gh auth refresh
```
If wrong account:
```bash
gh auth logout
gh auth login
```
Required Scopes
Verify the token has necessary scopes:
repo- Full control of private repositoriesworkflow- Update GitHub Action workflowsadmin:org- Read organization data (if working with org repos)
Error Scenarios
"HTTP 401: Bad credentials"
- Token is invalid or expired
- Run:
gh auth refreshor re-authenticate
"HTTP 403: Resource not accessible"
- Insufficient permissions
- Check repository access
- Verify organization membership
"HTTP 404: Not Found"
- Repository doesn't exist
- User doesn't have access
- Check repository name and permissions
Configuration Check
View current configuration:
```bash
gh auth status --show-token
```
(Be careful - this displays the token)
Check which host is configured:
```bash
gh config get git_protocol
```
Set preferences:
```bash
gh config set git_protocol https
gh config set editor vim
```
Examples
Example 1: Authentication check before operations
```
Action: About to create PR
Step 1: Run gh auth status
Step 2: If authenticated, proceed with PR creation
Step 3: If not, guide user through gh auth login
```
Example 2: Authentication failure during operation
```
Error: "gh: HTTP 401: Bad credentials"
Action:
- Inform user of authentication issue
- Run gh auth status to diagnose
- Guide through gh auth refresh or gh auth login
- Retry original operation
```
Example 3: First-time setup
```
User: "Setup GitHub CLI"
Action:
- Check if gh is installed: gh --version
- Run gh auth login
- Guide through authentication flow
- Verify with gh auth status
- Test with simple command: gh repo view
```
Example 4: Switching accounts
```
User: "I need to use my work GitHub account"
Action:
- Show current account: gh auth status
- Logout: gh auth logout
- Login with work account: gh auth login
- Verify: gh auth status
```
More from this repository10
Synchronizes local main branch with remote, pulling latest changes and ensuring a clean, up-to-date base for new worktrees.
Retrieves recent issues related to login, presents most relevant issue ``` Reads and analyzes GitHub issues to provide comprehensive context and implementation details.
Manages Git branches by safely creating, switching, and cleaning up branches with intelligent handling of uncommitted changes.
Automates GitHub pull request workflows by tracking, reviewing, and managing PRs across repositories with intelligent filtering and status updates
Explores codebases systematically by identifying relevant files, tracing functionality, and understanding architectural patterns through targeted search techniques.
Generates comprehensive, step-by-step implementation plans with clear technical details, testing strategies, and risk assessment for complex software features.
process-manager skill from edanstarfire/claudecode_webui
Analyzes code changes by tracing direct and indirect dependencies, identifying potential impacts and risks before implementing modifications.
Validates git repository state by checking working directory status, branch conflicts, and repository health before critical git operations.
Generates well-structured, semantic git commit messages by guiding developers through a standardized commit message composition process.