cli-gh▌
paulrberg/agent-skills · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Expert guidance for GitHub CLI (gh) operations and workflows. Use this skill for command-line GitHub operations including pull request management, issue tracking, repository operations, workflow automation, and codespace management.
GitHub CLI (gh)
Overview
Expert guidance for GitHub CLI (gh) operations and workflows. Use this skill for command-line GitHub operations including pull request management, issue tracking, repository operations, workflow automation, and codespace management.
Key capabilities:
- Create and manage pull requests from the terminal
- Track and organize issues efficiently
- Search across all of GitHub (repos, issues, PRs)
- Manage labels and project organization
- Trigger and monitor GitHub Actions workflows
- Work with codespaces
- Automate repository operations and releases
Safety Rules
CRITICAL: This skill NEVER uses destructive gh CLI operations.
This skill focuses exclusively on safe, read-only, or reversible GitHub operations. The following commands are PROHIBITED and must NEVER be used:
Permanently destructive commands:
gh repo delete- Repository deletiongh repo archive- Repository archivalgh release delete- Release deletiongh release delete-asset- Asset deletiongh run delete- Workflow run deletiongh cache delete- Cache deletiongh secret delete- Secret deletiongh variable delete- Variable deletiongh label delete- Label deletiongh ssh-key delete- SSH key deletion (can lock out users)gh gpg-key delete- GPG key deletiongh codespace delete- Codespace deletiongh extension remove- Extension removalgh gist delete- Gist deletion- Bulk deletion operations using
xargswith any destructive commands - Shell commands:
rm -rf(except for temporary file cleanup)
Allowed operations:
- Creating resources (PRs, issues, releases, labels, repos)
- Viewing and listing (status, logs, information, searches)
- Updating and editing existing resources
- Closing PRs/issues (reversible - can be reopened)
- Canceling workflow runs (stops execution without deleting data)
- Merging pull requests (after proper review)
- Read-only git operations (
git status,git log,git diff)
Installation & Setup
# Login to GitHub
gh auth login
# Check authentication status
gh auth status
# Configure git to use gh as credential helper
gh auth setup-git
Pull Requests
Creating PRs
# Create PR interactively
gh pr create
# Create PR with title and body
gh pr create --title "Add feature" --body "Description"
# Create PR to specific branch
gh pr create --base main --head feature-branch
# Create draft PR
gh pr create --draft
# Create PR from current branch
gh pr create --fill # Uses commit messages
Viewing PRs
# List PRs
gh pr list
# List my PRs
gh pr list --author @me
# View PR details
gh pr view 123
# View PR in browser
gh pr view 123 --web
# View PR diff
gh pr diff 123
# Check PR status
gh pr status
Managing PRs
# Checkout PR locally
gh pr checkout 123
# Review PR
gh pr review 123 --approve
gh pr review 123 --comment --body "Looks good!"
gh pr review 123 --request-changes --body "Please fix X"
# Merge PR
gh pr merge 123
gh pr merge 123 --squash
gh pr merge 123 --rebase
gh pr merge 123 --merge
# Close PR
gh pr close 123
# Reopen PR
gh pr reopen 123
# Ready draft PR
gh pr ready 123
# Update PR branch with base branch
gh pr update-branch 123
PR Checks
# View PR checks
gh pr checks 123
# Watch PR checks
gh pr checks 123 --watch
Issues
Creating Issues
# Create issue interactively
gh issue create
# Create issue with title and body
gh issue create --title "Bug report" --body "Description"
# Create issue with labels
gh issue create --title "Bug" --label bug,critical
# Assign issue
gh issue create --title "Task" --assignee @me
Viewing Issues
# List issues
gh issue list
# List my issues
gh issue list --assignee @me
# List by label
gh issue list --label bug
# View issue details
gh issue view 456
# View in browser
gh issue view 456 --web
Managing Issues
# Close issue
gh issue close 456
# Reopen issue
gh issue reopen 456
# Edit issue
gh issue edit 456 --title "New title"
gh issue edit 456 --add-label bug
gh issue edit 456 --add-assignee @user
# Comment on issue
gh issue comment 456 --body "Update"
# Create branch to work on issue
gh issue develop 456 --checkout
Repository Operations
Repository Info
# View repository
gh repo view
# View in browser
gh repo view --web
# Clone repository
gh repo clone owner/repo
# Fork repository
gh repo fork owner/repo
# List repositories
gh repo list owner
Repository Management
# Create repository
gh repo create my-repo --public
gh repo create my-repo --private
# Sync fork
gh repo sync owner/repo
# Set default repository
gh repo set-default
Search
Search across all of GitHub for repositories, issues, and pull requests.
Search Repositories
# Search for repositories
gh search repos "machine learning" --language=python
# Search with filters
gh search repos --stars=">1000" --topic=kubernetes
Search Issues
# Search issues across GitHub
gh search issues "bug" --label=critical --state=open
# Exclude results (note the -- to prevent flag interpretation)
gh search issues -- "memory leak -label:wontfix"
Search Pull Requests
# Search PRs
gh search prs --author=@me --state=open
# Search with date filters
gh search prs "refactor" --created=">2024-01-01"
Labels
Manage repository labels for issue and PR organization.
List and View Labels
# List all labels in repository
gh label list
Create and Edit Labels
# Create new label
gh label create "priority: high" --color FF0000 --description "High priority items"
# Edit existing label
gh label edit "bug" --color FFAA00 --description "Something isn't working"
Clone Labels Between Repos
# Clone labels from another repository
gh label clone owner/source-repo
Codespaces
Manage GitHub Codespaces directly from the terminal.
List and Create Codespaces
# List codespaces
gh codespace list
# Create new codespace
gh codespace create --repo owner/repo
Connect to Codespaces
# SSH into codespace
gh codespace ssh
# Open in VS Code
gh codespace code
# Open in JupyterLab
gh codespace jupyter
Manage Codespace Files
# Copy files to/from codespace
gh codespace cp local-file.txt remote:~/path/
gh codespace cp remote:~/path/file.txt ./local-dir/
# View logs
gh codespace logs
Releases
Creating Releases
# Create release
gh release create v1.0.0
# Create release with notes
gh release create v1.0.0 --notes "Release notes"
# Create release with files
gh release create v1.0.0 dist/*.tar.gz
# Create draft release
gh release create v1.0.0 --draft
# Generate release notes automatically
gh release create v1.0.0 --generate-notes
Managing Releases
# List releases
gh release list
# View release
gh release view v1.0.0
# Download release assets
gh release download v1.0.0
Gists
# Create gist
gh gist create file.txt
# Create gist from stdin
echo "content" | gh gist create -
# List gists
gh gist list
# View gist
gh gist view <gist-id>
# Edit gist
How to use cli-gh on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add cli-gh
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches cli-gh from GitHub repository paulrberg/agent-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate cli-gh. Access the skill through slash commands (e.g., /cli-gh) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★31 reviews- ★★★★★Pratham Ware· Dec 8, 2024
Registry listing for cli-gh matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Ira Torres· Dec 4, 2024
cli-gh reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Diego Srinivasan· Dec 4, 2024
I recommend cli-gh for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Yash Thakker· Nov 27, 2024
cli-gh reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Lucas Okafor· Nov 23, 2024
Registry listing for cli-gh matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Camila Sharma· Nov 23, 2024
cli-gh fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Dhruvi Jain· Oct 18, 2024
I recommend cli-gh for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Lucas Park· Oct 14, 2024
cli-gh fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Layla Desai· Oct 14, 2024
Registry listing for cli-gh matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Yuki Brown· Sep 21, 2024
Keeps context tight: cli-gh is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 31