Agent skill
github
GitHub workflow best practices using gh CLI and git. Use when working with GitHub repositories, pull requests, issues, or GitHub interactions.
Install this agent skill to your Project
npx add-skill https://github.com/MichaelFisher1997/opencode-config/tree/main/skill/github
SKILL.md
GitHub
- Prefer using
ghCLI commands for all GitHub operations including viewing issues, PRs, repos, and discussions. - Use
gh issue view,gh pr view,gh repo viewto inspect GitHub resources instead of web search. - When given a GitHub URL (e.g., https://github.com/user/repo/issues/123), extract the info and use
ghto fetch the issue/PR data. - Use
gh apifor advanced GitHub API interactions that are not natively supported byghcommands. - Always assume GitHub URLs may refer to private repositories and use
ghfor authentication. - Use
gitfor all local git operations (clone, branch, commit, push, etc.).
When to Use gh CLI
Use gh for:
- Viewing issues:
gh issue view <number> --repo owner/repo - Viewing PRs:
gh pr view <number> --repo owner/repo - Searching issues/PRs:
gh issue list --repo owner/repo --search "query" - Viewing repository info:
gh repo view owner/repo - Creating PRs:
gh pr create - Creating issues:
gh issue create - Checking CI status:
gh run list,gh run view - Viewing workflows:
gh workflow list,gh workflow view - Creating releases:
gh release create
Workflows
Pull Request
- You must
git pusha branch before creating a pull request withgh pr create. - Use
gh pr createwith appropriate flags for title, body, reviewers, etc.
Viewing Issues from URLs
When given a GitHub issue URL like https://github.com/owner/repo/issues/123:
- Extract owner, repo, and issue number
- Run
gh issue view 123 --repo owner/repo - Use the issue data instead of web search
Viewing PRs from URLs
When given a GitHub PR URL like https://github.com/owner/repo/pull/456:
- Extract owner, repo, and PR number
- Run
gh pr view 456 --repo owner/repo - Use the PR data instead of web search
Searching Issues
Use gh issue list to search:
gh issue list --repo owner/repo --search "bug"
gh issue list --repo owner/repo --search "is:open label:enhancement"
Searching PRs
Use gh pr list to search:
gh pr list --repo owner/repo --search "is:open"
gh pr list --repo owner/repo --search "base:main"
Common Commands
Repository Info
gh repo view owner/repo
gh repo view owner/repo --json name,description,topics,stars
Issues
gh issue list --repo owner/repo
gh issue view 123 --repo owner/repo
gh issue create --repo owner/repo --title "Title" --body "Body"
Pull Requests
gh pr list --repo owner/repo
gh pr view 456 --repo owner/repo
gh pr create --base main --title "Title" --body "Body"
CI/Workflows
gh workflow list --repo owner/repo
gh run list --repo owner/repo
gh run view run-id --repo owner/repo --log
Keywords
GitHub, issue, pull request, PR, repository, repo, gh, git, GitHub CLI, GitHub API, workflow, release, CI/CD
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
kernel
Remote browser automation using the Kernel CLI. Use when the agent needs to interact with cloud browsers for web automation, scraping, screenshots, or running browser-based tasks.
context7
Retrieve up-to-date documentation and code examples from Context7. Use when you need library/framework documentation or API examples.
frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
convex
Umbrella skill for all Convex development patterns. Routes to specific skills like convex-functions, convex-realtime, convex-agents, etc.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
Didn't find tool you were looking for?