name: github-cli
description: Expertise in managing GitHub repositories, PRs, and issues using the GitHub CLI (gh).
GitHub CLI Skill
This skill allows the agent to interact with GitHub repositories directly from the command line using the official GitHub CLI (gh).
Common Commands
Authentication
Check authentication status:
gh auth status
Pull Requests
List open PRs:
gh pr list
View a specific PR:
gh pr view <number-or-url>
Create a new PR:
gh pr create --title "Title" --body "Body"
Merge a PR:
gh pr merge <number-or-url> --merge
Issues
List open issues:
gh issue list
Create an issue:
gh issue create --title "Title" --body "Body"
Repository
View repository information:
gh repo view
Guidelines for Agents
- Branching Rule: ALWAYS start new feature branches from a clean and updated
mainbranch.git checkout main; git pull origin main; git checkout -b feat/your-feature-name - PR Workflow: When a PR is created, wait for the CI (GitHub Actions) to pass (Build/Test) before requesting a human review.
- Descriptive PRs: Use
--titleand--bodyflags to explain the "why" of the changes. - Authentication: Always check
gh auth statusif you suspect authentication issues. - Atomic Commits: Prefer small, focused commits over large, monolithic ones.