# Github Research

> Search and analyze GitHub repositories, code, pull requests, issues, and commits using GitHub CLI. AUTOMATICALLY INVOKE when user mentions 'search github', 'find repo', 'github search', 'lookup github', 'search code in github', or asks about CarMax-Internal repositories.

- Skill: `ranjanpoudel1234/github-research` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ranjanpoudel1234/github-research`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ranjanpoudel1234/github-research/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Research & Search
- License: MIT
- Author: ranjanpoudel1234 (https://skillmd.com/u/ranjanpoudel1234)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/ranjanpoudel1234/github-research

---


# 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:

1. **Searching Repositories** - Find repos by name, description, topics, or keywords
2. **Searching Code** - Locate code patterns, classes, functions, or configurations
3. **Viewing Repository Details** - Get metadata, structure, README, and languages
4. **Listing Pull Requests** - Find and filter PRs by state, author, or labels
5. **Listing Issues** - Search and filter issues across repositories
6. **Viewing Commits** - Check commit history and recent activity
7. **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**:
```bash
export PATH="$HOME/bin:$PATH" && gh auth status
```

---

## 📖 GitHub CLI Command Reference

### Repository Search Commands

#### Search repositories by keyword
```bash
gh search repos [keyword] --owner carmax-internal --limit 50
```

**Examples**:
```bash
# 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
```bash
gh repo view [owner/repo]
```

**Examples**:
```bash
# 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
```bash
gh repo list carmax-internal --limit 100
```

**With filters**:
```bash
# 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
```bash
gh search code [query] --owner carmax-internal --limit 50
```

**Examples**:
```bash
# 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 phrase
- `language:csharp` - Filter by language
- `path:/src/` - Search in specific paths
- `filename:Program.cs` - Search in specific files
- `extension:md` - Search by file extension
- `org:carmax-internal` - Organization scope

---

### Pull Request Commands

#### Search pull requests
```bash
gh search prs [query] --owner carmax-internal --limit 30
```

**Examples**:
```bash
# 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
```bash
gh pr list --repo carmax-internal/[repo-name]
```

**Examples**:
```bash
# 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
```bash
gh pr view [number] --repo carmax-internal/[repo-name]
```

---

### Issue Commands

#### Search issues
```bash
gh search issues [query] --owner carmax-internal --limit 30
```

**Examples**:
```bash
# 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
```bash
gh issue list --repo carmax-internal/[repo-name]
```

---

### Commit & Activity Commands

#### View recent commits
```bash
gh api repos/carmax-internal/[repo-name]/commits --paginate --per-page 20
```

**Example with jq parsing**:
```bash
gh api repos/carmax-internal/logistics-shipment-service/commits \
  --jq '.[] | {message: .commit.message, author: .commit.author.name, date: .commit.author.date}'
```

#### Get repository activity
```bash
gh api repos/carmax-internal/[repo-name]
```

---

## 🎨 Workflow Patterns

### Pattern 1: User asks "Find repos that use [technology/entity]"

**Steps**:
1. Determine the search term (e.g., "EroHeader", "MitchellData")
2. Use code search to find repos: `gh search code "[term]" --owner carmax-internal`
3. Extract unique repository names from results
4. Present list of repositories with brief context
5. Offer to get more details on specific repos

**Example Flow**:
```
User: "Which repositories use EroHeader entity?"
