| name | github-read |
| description | Read-only Git and GitHub CLI operations for repository inspection |
GitHub Read Operations
Read-only operations for inspecting repository state, issues, PRs, and projects.
First: Load Configuration
Before running commands, read .opencode/github.json for repository context:
cat .opencode/github.json
Key values you'll need:
repository.full_name - For --repo flags (e.g., "owner/repo")
project.number - For project queries
project.owner - Usually "@me" for user projects
Important: Flag Syntax
Use = syntax for flags with values to ensure permission patterns match correctly:
gh issue list --repo=owner/repo --state=closed --limit=5
gh issue list --repo owner/repo --state closed --limit 5
This applies to all gh commands with flag arguments.
Git Operations
Working Tree State
git status
git status -s
git diff
git diff --staged
History & Inspection
git log --oneline -20
git log origin/main..HEAD --oneline
git show <commit>
git blame <file>
Branch Information
git branch
git branch -a
git branch -r
git branch --show-current
Remote State
git fetch origin
git remote -v
git remote show origin
Comparisons
git diff main..feature-branch
git log main..feature-branch --oneline
git diff main..feature-branch --name-only
GitHub CLI Operations
Issues
gh issue view <number> --repo=<full_name>
gh issue list --repo=<full_name>
gh issue list --repo=<full_name> --assignee=@me
gh issue list --repo=<full_name> --label=bug
gh issue list --repo=<full_name> --state=closed
Pull Requests
gh pr view <number> --repo=<full_name>
gh pr diff <number> --repo=<full_name>
gh pr checks <number> --repo=<full_name>
gh pr list --repo=<full_name>
gh pr list --repo=<full_name> --author=@me
gh pr list --repo=<full_name> --state=merged
Projects
gh project item-list <project_number> --owner=<project_owner> --format=json
gh project item-list <project_number> --owner=<project_owner> --format=json | \
jq '[.items[] | select(.status.name == "In Progress")]'
gh project item-list <project_number> --owner=<project_owner> --format=json | \
jq '.items[] | select(.content.number == 42)'
Releases & Runs
gh release list --repo=<full_name>
gh release view <tag> --repo=<full_name>
gh run list --repo=<full_name>
gh run view <run_id> --repo=<full_name>
Common Patterns
Pre-PR Review Check
git fetch origin
git status
git log origin/main..HEAD --oneline
git diff origin/main..HEAD --stat
Check What's Being Worked On
gh project item-list <number> --owner=@me --format=json | \
jq '[.items[] | select(.status.name == "In Progress") | {title: .title, number: .content.number}]'
Inspect a PR for Review
gh pr view <number> --repo=<full_name>
gh pr diff <number> --repo=<full_name>
gh pr checks <number> --repo=<full_name>
Write Operations
This skill covers READ-ONLY operations.
For git mutations (commits, pushes, merges), the main agent or commands handle those directly.
For project management writes (issues, PRs, board updates), delegate to the product-manager agent.