GitHub Knowledge Base
Overview
Manage a local cache of GitHub repositories for rapid analysis and querying. This skill maintains a repository index at @/home/logan/Projects/skills/github-kb/CLAUDE.md with one-sentence summaries for quick reference.
Local Repository Path
Default location: /home/logan/Projects/skills/github-kb
If this directory doesn't exist, prompt the user for the correct path and update this skill accordingly.
Workflow
1. When User Mentions GitHub/Repo/Repository
- •Check if the query references a specific repository (e.g., "anthropics/claude-code", "the cli-tool repo")
- •Search the local directory at
/home/logan/Projects/skills/github-kb/for matching repositories - •Read
@/home/logan/Projects/skills/github-kb/CLAUDE.mdfor repository summaries
2. Repository Found Locally
- •Analyze the user's query against the local repository
- •Use Read/Grep/Glob tools to examine code, docs, and structure
- •Answer the user's question based on local content
3. Repository Not Found
- •Offer to clone the repository using
git clone - •Clone to
/home/logan/Projects/skills/github-kb/<repo-name>/ - •Update
@/home/logan/Projects/skills/github-kb/CLAUDE.mdwith repository summary
Using the gh Command
Leverage the GitHub CLI for remote queries:
bash
# Search repositories gh search repos <query> # View issues/PRs gh issue list --repo <owner/repo> gh pr list --repo <owner/repo> # View specific issue/PR gh issue view <number> --repo <owner/repo> gh pr view <number> --repo <owner/repo> # Search code gh search code <query> --repo <owner/repo>
CLAUDE.md Format
Maintain the repository index with this structure:
markdown
## Repository Index ### [owner/repo](https://github.com/owner/repo) One-sentence summary of the repository's purpose and key functionality.
Example Queries
- •"What does the anthropics/claude-code repo do?"
- •"Show me the issues in facebook/react"
- •"Clone the rust-lang/rust repository"
- •"How does the authentication work in the cli-tool repo?"
- •"Search GitHub for repositories about skill-based systems"