using-github
Use when working with GitHub repositories, pull requests, issues, releases, or other GitHub operations via the gh CLI
When & Why to Use This Skill
This Claude skill integrates the official GitHub CLI (gh) to streamline repository management and development workflows. It enables the agent to perform complex GitHub operations such as managing pull requests, tracking issues, and handling releases directly through the command line. By automating these tasks, it enhances developer productivity, ensures consistent workflow execution, and reduces the need for manual context switching between the terminal and web interface.
Use Cases
- Automated Pull Request Lifecycle: Creating, drafting, and merging pull requests with detailed descriptions and appropriate labels based on code changes.
- Efficient Issue Management: Searching for existing bugs, creating new feature requests, and updating issue statuses or comments during the development process.
- Repository Administration: Initializing new repositories, managing forks, and configuring repository settings or secrets via the gh CLI.
- Release and Tagging Automation: Streamlining the software delivery process by creating git tags and drafting comprehensive release notes for new versions.
- CI/CD Workflow Monitoring: Checking the status of GitHub Actions runs and viewing logs to debug deployment or build failures.
| name | using-github |
|---|---|
| description | Use when working with GitHub repositories, pull requests, issues, releases, or other GitHub operations via the gh CLI |
Using GitHub CLI
Use the gh CLI tool via the Bash tool for all GitHub operations.
Authentication & Account Issues
IMPORTANT: If you encounter "repository not found" or authentication errors:
Check authentication status:
gh auth statusIf multiple accounts are configured, try switching accounts:
gh auth switchIf not authenticated, prompt user to run:
gh auth login
Commands & Usage
See @common-commands.md for detailed command reference, examples, and common operations.
Best Practices
- Use
ghcommands instead of git+web workflows when possible - Always check
gh <command> --helpfor options - Use
--jsonflag for machine-readable output when parsing - Use heredoc for multiline bodies (PR descriptions, issue bodies)