一键导入
github-explorer
General-purpose GitHub exploration and analysis tool for searching issues, creating PRs, analyzing git history, and reviewing PR comments
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
General-purpose GitHub exploration and analysis tool for searching issues, creating PRs, analyzing git history, and reviewing PR comments
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Data-first visualization design combining Tufte principles with Jobs/Ive simplicity for React + Nivo dashboards.
Automated agent workflow for reviewing and updating project agent context files when code changes are made.
Create a custom Dagster Component with demo mode support, realistic asset structure, and optional custom scaffolder using the dg CLI. Use this skill if there is no Component included in an existing integration or if Dagster does not have the integration.
Expert guidance for Dagster data orchestration including assets, resources, schedules, sensors, partitions, testing, and ETL patterns. Use when building or extending Dagster projects, writing assets, configuring automation, or integrating with dbt/dlt/Sling.
Expert guidance for working with Dagster and the dg CLI. ALWAYS use before doing any task that requires knowledge specific to Dagster, or that references assets, materialization, components, data tools or data pipelines. Common tasks may include creating a new project, adding new definitions, understanding the current project structure, answering general questions about the codebase (finding asset, schedule, sensor, component or job definitions), debugging issues, or providing deep information about a specific Dagster concept.
Initialize a dagster project using the create-dagster cli. Create a dagster project, uv virtual environment, and everything needed for a user to run dg dev or dg check defs successfully. (project)
| name | github-explorer |
| description | General-purpose GitHub exploration and analysis tool for searching issues, creating PRs, analyzing git history, and reviewing PR comments |
| license | MIT |
This skill provides interactive GitHub exploration and analysis capabilities using the GitHub CLI (gh) and git commands. It enables searching and filtering issues, creating pull requests with custom templates, analyzing file history with git blame, and reviewing PR comments and feedback. Use this skill when you need flexible, exploratory interactions with GitHub repositories.
Invoke this skill when you need to:
This skill requires the following tools to be installed and configured:
GitHub CLI (gh): Version 2.0 or higher
gh --versionGit: Any recent version
git --versionjq: JSON processor for parsing API responses
jq --versionGitHub Authentication: Must be logged in to gh CLI
gh auth statusgh auth loginUse this feature to find and explore GitHub issues across repositories.
# List all open issues in current repository
gh issue list --state open
# List all issues (open and closed)
gh issue list --state all
# Limit results
gh issue list --state open --limit 20
# List issues with a specific label
gh issue list --label "bug" --state open
# List issues with multiple labels (AND logic)
gh issue list --label "bug,high-priority" --state open
# Combine label filters with limits
gh issue list --label "enhancement" --state open --limit 10
# List issues assigned to you
gh issue list --assignee @me --state open
# List issues assigned to a specific user
gh issue list --assignee username --state open
# Combine assignee and label filters
gh issue list --assignee @me --label "bug,high-priority" --state open
# Search issues in current repository
gh search issues "authentication error"
# Search issues in a specific repository
gh search issues "docker configuration" --repo owner/repo
# Search across an organization
gh search issues "api timeout" --owner orgname
# Combine search with filters
gh search issues "memory leak" --state open --label "bug" --limit 10
# View a specific issue
gh issue view 123
# View issue with comments
gh issue view 123 --comments
# Get issue JSON for parsing
gh issue view 123 --json title,body,state,labels,assignees,createdAt
# Get issues as JSON and parse with jq
gh issue list --json number,title,state,labels,assignees,createdAt --limit 10 | \
jq -r '.[] | "\(.number): \(.title) [\(.state)]"'
# Create a table of issues
gh issue list --json number,title,assignees --limit 20 | \
jq -r '.[] | "\(.number)\t\(.title)\t\(.assignees[0].login // "unassigned")"'
# Count issues by label
gh issue list --state all --json labels --jq '[.[].labels[].name] | group_by(.) | map({label: .[0], count: length}) | sort_by(.count) | reverse'
Use this feature to create pull requests with custom content and templates.
Before creating a PR, review what changes will be included:
# Show files changed compared to main
git diff main...HEAD --stat
# Show detailed diff
git diff main...HEAD
# Show commit messages that will be in the PR
git log main...HEAD --oneline
# Show all commits with details
git log main...HEAD --pretty=fuller
# Create PR with auto-filled title and body from commits
gh pr create --fill
# Create PR with custom title and body
gh pr create --title "Fix authentication bug" --body "This PR fixes the token validation issue"
# Create PR targeting a specific base branch
gh pr create --base develop --head feature-branch
# Create PR with formatted body using heredoc
gh pr create --title "Add user profile feature" --body "$(cat <<'EOF'
## Summary
- Implemented user profile page
- Added avatar upload functionality
- Created profile editing form
## Changes Made
- New UserProfile component
- Profile API endpoints
- Avatar storage in GCS
## Related Issues
Fixes #42
Relates to #38
## Testing
- [ ] Manual testing completed
- [ ] Unit tests added
- [ ] Integration tests passing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
# Create draft PR (not ready for review)
gh pr create --draft --title "WIP: Refactor authentication"
# Create normal PR that can be reviewed immediately
gh pr create --title "Fix login bug" --body "Ready for review"
# Link PR to issue with "Fixes" keyword
gh pr create --title "Fix memory leak" --body "Fixes #123"
# Link to multiple issues
gh pr create --title "Bug fixes" --body "$(cat <<'EOF'
## Summary
Multiple bug fixes
## Issues
Fixes #123
Fixes #124
Relates to #125
EOF
)"
# Get repository info for PR context
REPO_URL=$(gh repo view --json url --jq .url)
CURRENT_BRANCH=$(git branch --show-current)
# Auto-generate PR body from commits
COMMITS=$(git log main...HEAD --pretty=format:"- %s")
gh pr create --title "Feature: $(git log -1 --pretty=%s)" --body "$(cat <<EOF
## Changes in this PR
$COMMITS
## Branch
\`$CURRENT_BRANCH\`
## Repository
$REPO_URL
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
Use this feature to analyze file history and identify code authors.
# Blame entire file
git blame path/to/file.py
# Blame specific line range
git blame -L 50,100 path/to/file.py
# Blame with date information
git blame -L 50,100 path/to/file.py --date=short
# Show email addresses instead of names
git blame --show-email path/to/file.py
# Show full commit hash
git blame -L 10,20 path/to/file.py --abbrev=40
# Ignore whitespace changes
git blame -w path/to/file.py
# Follow file renames
git blame --follow path/to/file.py
# Show detailed history of specific line range
git log -L 50,100:path/to/file.py --pretty=fuller --patch
# Find when a function was added or modified
git log -S "function_name" --source --all --pretty=fuller path/to/file.py
# Show commits that modified a file
git log --follow --oneline path/to/file.py
# Show who contributed most to a file
git blame path/to/file.py | awk '{print $2}' | sort | uniq -c | sort -nr
# Get commit hash from specific line
COMMIT_HASH=$(git blame -L 50,50 path/to/file.py | awk '{print $1}')
# Get repository URL
REPO_URL=$(gh repo view --json url --jq .url)
# Create GitHub commit URL
echo "$REPO_URL/commit/$COMMIT_HASH"
# Open commit in browser (if on macOS/Linux with `open` or `xdg-open`)
# open "$REPO_URL/commit/$COMMIT_HASH"
# Clean blame output with just author and line
git blame -L 10,20 path/to/file.py | \
awk '{printf "Line %s: %s %s %s\n", substr($0, index($0, ")") + 1, 4), $2, $3, $4}'
# Create CSV of blame data
echo "Line,Author,Date,Commit" > blame_output.csv
git blame -L 1,100 path/to/file.py --date=short | \
awk '{print NR "," $2 "," $3 "," $1}' >> blame_output.csv
# Find when specific text was added
git log -S "critical_function" --source --all -p path/to/file.py
# Show file changes over time
git log --stat path/to/file.py
# Show who last modified each line (concise format)
git blame path/to/file.py | awk '{print $2, $3}' | sort | uniq -c | sort -nr
# Compare current version with specific commit
COMMIT=$(git blame -L 50,50 path/to/file.py | awk '{print $1}')
git diff $COMMIT path/to/file.py
Use this feature to analyze pull request review comments and feedback.
# View PR details with all comments
gh pr view 123 --comments
# View specific PR sections
gh pr view 123 --json title,body,state,comments
# View PR checks (CI/CD status)
gh pr checks 123
# View PR reviews
gh pr reviews 123
# Get review decision
gh pr view 123 --json reviewDecision
# Get all review comments as JSON
gh api repos/:owner/:repo/pulls/123/comments | jq '.'
# Parse comments with jq
gh api repos/:owner/:repo/pulls/123/comments --jq '.[] | {
author: .user.login,
body: .body,
path: .path,
line: .line,
created: .created_at
}'
# Filter comments by file
gh api repos/:owner/:repo/pulls/123/comments --jq '.[] | select(.path == "src/main.py") | {author: .user.login, line: .line, body: .body}'
# Get all review threads
gh api repos/:owner/:repo/pulls/123/reviews --jq '.[] | {
author: .user.login,
state: .state,
body: .body,
submitted: .submitted_at
}'
# Find unresolved conversations
gh pr view 123 --json reviews --jq '.reviews[] | select(.state == "CHANGES_REQUESTED")'
# Count reviews by state
gh pr view 123 --json reviews --jq '.reviews | group_by(.state) | map({state: .[0].state, count: length})'
# Count comments by author
gh api repos/:owner/:repo/pulls/123/comments --jq 'group_by(.user.login) | map({author: .[0].user.login, count: length})'
# List unique commenters
gh api repos/:owner/:repo/pulls/123/comments --jq '[.[].user.login] | unique'
# Find most active reviewer
gh api repos/:owner/:repo/pulls/123/comments --jq 'group_by(.user.login) | map({author: .[0].user.login, count: length}) | sort_by(.count) | reverse | .[0]'
# Find all "CHANGES_REQUESTED" reviews
gh pr reviews 123 --json author,state,body | \
jq '.[] | select(.state == "CHANGES_REQUESTED")'
# Get list of files with comments
gh api repos/:owner/:repo/pulls/123/comments --jq '[.[].path] | unique'
# Create summary of comments by file
gh api repos/:owner/:repo/pulls/123/comments --jq 'group_by(.path) | map({file: .[0].path, comment_count: length})'
# View PR diff for context
gh pr diff 123
# View PR diff for specific file
gh pr diff 123 -- path/to/file.py
If you encounter authentication issues:
# Check authentication status
gh auth status
# Re-authenticate if needed
gh auth login
# Test API access
gh api user
# Verify you have access to the repository
gh repo view
GitHub API has rate limits. If you encounter rate limit errors:
# Check current rate limit status
gh api rate_limit
# View rate limit details
gh api rate_limit --jq '.resources.core | {
limit: .limit,
remaining: .remaining,
reset: .reset,
reset_time: (.reset | strftime("%Y-%m-%d %H:%M:%S"))
}'
# Wait if rate limit is reached (reset time shown in output above)
Rate limits:
If commands fail because you're not in a git repository:
# Check if in a git repository
if ! git rev-parse --is-inside-work-tree 2>/dev/null; then
echo "Error: Not in a git repository"
echo "Navigate to a git repository or initialize one with: git init"
exit 1
fi
# Get repository information
gh repo view --json nameWithOwner,url
# Clone repository if needed
gh repo clone owner/repo
If an issue or PR doesn't exist:
# Check if issue exists before viewing
if gh issue view 123 2>/dev/null; then
gh issue view 123
else
echo "Issue #123 not found"
echo "Available issues:"
gh issue list --limit 10
fi
# List available PRs
gh pr list --state all --limit 20
If you lack permissions for certain operations:
# Check repository permissions
gh api repos/:owner/:repo | jq '.permissions'
# Re-authenticate with additional scopes if needed
gh auth refresh -s repo,read:org
This skill succeeds when:
gh auth status shows active login)jq produces readable, formatted outputgh auth login and gh auth status before using this skill--json flags to gh commands when you need structured datajq for filtering and formatting JSON API responsesgh repo viewgh api rate_limit if you're making many requestsBe mindful of GitHub's API rate limits:
gh api rate_limit to check current usagegh CLI automatically handles authenticationThis skill complements the existing git-pr-workflow skill:
Example combined workflow:
github-explorer to find bugs: gh issue list --label "bug"git-pr-workflow to automatically create a PR, monitor CI, and mergeTo work across different repositories:
# Specify repository explicitly
gh issue list --repo owner/repo
gh pr list --repo owner/other-repo
# Clone and switch to different repo
gh repo clone owner/repo
cd repo
# Search across organization
gh search issues "bug" --owner orgname
For better readability:
--json with jq for structured datagrep for text filteringcolumn -t for table formatting