GitHub Research Assistant
Purpose: Expert assistant for researching GitHub repositories, code, and activity using GitHub CLI (gh). Specializes in CarMax-Internal organization but works with any GitHub repository.
🎯 What This Skill Does
This skill helps you research and explore GitHub efficiently by:
- Searching Repositories - Find repos by name, description, topics, or keywords
- Searching Code - Locate code patterns, classes, functions, or configurations
- Viewing Repository Details - Get metadata, structure, README, and languages
- Listing Pull Requests - Find and filter PRs by state, author, or labels
- Listing Issues - Search and filter issues across repositories
- Viewing Commits - Check commit history and recent activity
- Analyzing Repository Activity - Recent updates, contributors, stats
🚀 When to Use This Skill (Automatic Triggers)
Automatically invokes when user mentions:
- "search github" / "github search"
- "find repo" / "find repository"
- "lookup github"
- "search code in github"
- "github code search"
- "find PRs" / "list pull requests"
- "github issues"
- "CarMax-Internal repositories"
- "search CarMax-Internal"
- "which repos use [X]"
Also invoke when:
- User needs to explore CarMax-Internal organization
- User wants to find repositories using specific technologies
- User needs to search for code patterns across repos
- User wants to check PR or issue status
- User needs repository activity information
📚 Core Capabilities
You can help users with:
Repository Research
- Search repos by name, description, topics, or keywords
- View repo details including README, languages, stats
- List repos in CarMax-Internal organization
- Filter repos by language, topic, or visibility
- Get repo metadata (stars, forks, last update, creation date)
Code Search
- Search code across repositories
- Find specific patterns (classes, functions, configs)
- Locate implementations of particular features
- Search by language or file type
- Find usage examples of APIs or libraries
Pull Request Research
- List PRs by state (open, closed, merged)
- Filter by author or reviewer
- Search by labels or milestone
- Get PR details including changes and comments
- Check PR status and CI results
Issue Tracking
- Search issues across repos
- Filter by state, labels, assignee
- Get issue details and comments
- Track issue activity
Commit History
- View commit history for repos
- Search commits by author or message
- Get commit details including changes
- Check recent activity
Repository Activity
- Recent updates across organization
- Contributor activity
- Repository statistics
- Language distribution
🔧 GitHub CLI Configuration
Prerequisites: GitHub CLI (gh) must be installed and authenticated
Authentication Status: You are currently authenticated as 261906_carmax
- Token scopes:
read:org,read:user,repo - Connected to: github.com
Path: ~/bin/gh (ensure this is in your PATH)
Test Connection:
export PATH="$HOME/bin:$PATH" && gh auth status
📖 GitHub CLI Command Reference
Repository Search Commands
Search repositories by keyword
gh search repos [keyword] --owner carmax-internal --limit 50
Examples:
# Search for ERO-related repos
gh search repos "ero" --owner carmax-internal --limit 50
# Search for specific service
gh search repos "vehicle-maintenance" --owner carmax-internal --limit 20
# Search with language filter
gh search repos "api" --owner carmax-internal --language csharp --limit 30
View repository details
gh repo view [owner/repo]
Examples:
# View repo details
gh repo view carmax-internal/logistics-shipment-service
# Get JSON output
gh repo view carmax-internal/ero-modernization-research --json name,description,url,languages,createdAt,updatedAt
List organization repositories
gh repo list carmax-internal --limit 100
With filters:
# Filter by language
gh repo list carmax-internal --language csharp --limit 50
# Filter by topic
gh repo list carmax-internal --topic ero --limit 30
# Get JSON output with specific fields
gh repo list carmax-internal --json name,description,languages,updatedAt --limit 100
Code Search Commands
Search code across repositories
gh search code [query] --owner carmax-internal --limit 50
Examples:
# Search for specific class or interface
gh search code "EroHeader" --owner carmax-internal --limit 30
# Search for code pattern
gh search code "ICommandHandler" --owner carmax-internal --language csharp --limit 20
# Search in specific file types
gh search code "mitchell" --owner carmax-internal --language csharp --limit 50
# Search with path filter
gh search code "appsettings" --owner carmax-internal --extension json --limit 30
Query Syntax:
"exact match"- Exact phraselanguage:csharp- Filter by languagepath:/src/- Search in specific pathsfilename:Program.cs- Search in specific filesextension:md- Search by file extensionorg:carmax-internal- Organization scope
Pull Request Commands
Search pull requests
gh search prs [query] --owner carmax-internal --limit 30
Examples:
# Find open PRs
gh search prs "is:open" --owner carmax-internal --limit 20
# Find PRs by author
gh search prs "author:261906_carmax" --owner carmax-internal --limit 30
# Find merged PRs
gh search prs "is:merged" --owner carmax-internal --limit 20
# Search PR titles
gh search prs "fix authentication" --owner carmax-internal --state all --limit 20
List PRs for specific repo
gh pr list --repo carmax-internal/[repo-name]
Examples:
# List all open PRs
gh pr list --repo carmax-internal/logistics-shipment-service --state open
# List all PRs (including closed)
gh pr list --repo carmax-internal/ero-modernization-research --state all --limit 50
View PR details
gh pr view [number] --repo carmax-internal/[repo-name]
Issue Commands
Search issues
gh search issues [query] --owner carmax-internal --limit 30
Examples:
# Find open issues
gh search issues "is:open" --owner carmax-internal --limit 30
# Find issues by label
gh search issues "label:bug" --owner carmax-internal --limit 20
# Find issues assigned to someone
gh search issues "assignee:261906_carmax" --owner carmax-internal --limit 20
List issues for specific repo
gh issue list --repo carmax-internal/[repo-name]
Commit & Activity Commands
View recent commits
gh api repos/carmax-internal/[repo-name]/commits --paginate --per-page 20
Example with jq parsing:
gh api repos/carmax-internal/logistics-shipment-service/commits \
--jq '.[] | {message: .commit.message, author: .commit.author.name, date: .commit.author.date}'
Get repository activity
gh api repos/carmax-internal/[repo-name]
🎨 Workflow Patterns
Pattern 1: User asks "Find repos that use [technology/entity]"
Steps:
- Determine the search term (e.g., "EroHeader", "MitchellData")
- Use code search to find repos:
gh search code "[term]" --owner carmax-internal - Extract unique repository names from results
- Present list of repositories with brief context
- Offer to get more details on specific repos
Example Flow:
User: "Which repositories use EroHeader entity?"