| name | github-kb |
| description | GitHub Knowledge Base - Unified tool for managing local repos, discovering trending projects, and tracking tech hot topics.
Use when: (1) searching local GitHub repos, (2) updating repo index, (3) discovering new repos via social media (Xiaohongshu, Twitter/X) and web search, (4) researching topics on Xiaohongshu, (5) fetching Twitter/X post content.
Triggers: "github-kb", "search repos", "discover repos", "xiaohongshu", "rednote", "twitter", "X post", "tweet"
|
GitHub Knowledge Base
Unified skill for local repo management + social media hot topic tracking.
Configuration
KB_PATH: Default ~/github. Customize in project CLAUDE.md:
KB_PATH: /your/path
Commands
/github-kb search <keyword>
Search local knowledge base.
- Read
KB_PATH/CLAUDE.md index
- Match keyword against names, descriptions, tags
- Display matches with paths
- Offer to explore repo details
/github-kb update
Sync index with filesystem.
- Scan KB_PATH for
.git directories
- Extract: name, README first line, tech stack tags
- Diff against existing CLAUDE.md
- Show changes, ask confirmation, write update
Index format (keep under 100 lines):
# GitHub Knowledge Base
| Name | Description | Path | Tags |
|------|-------------|------|------|
| repo | One-line desc | ./repo | tag1, tag2 |
/github-kb discover <topic>
Find trending repos from multiple sources.
-
Gather (parallel):
-
Extract GitHub URLs from results
-
Enrich via gh repo view owner/repo --json name,description,stargazerCount
-
Present candidates with source attribution
-
Clone user-selected repos: gh repo clone owner/repo
-
Update index automatically
/github-kb xiaohongshu <keyword>
Direct Xiaohongshu search. See references/xiaohongshu.md.
/github-kb twitter <url>
Fetch Twitter/X content. See references/twitter.md.
Tools Reference
| Source | Tool/Method |
|---|
| Local repos | gh CLI, filesystem |
| Xiaohongshu | mcp__rednote__* tools |
| Twitter/X | Jina API via scripts/fetch_tweet.py |
| Web search | mcp__tavily__tavily-search |
AI-Driven Query (DeepWiki Mode)
When solving problems, proactively search the knowledge base:
- Auto-detect relevance: If user asks about a technology/tool, check KB first
- Query before web search: Prefer local repos over external docs
- Deep dive: Read repo's README, docs/, examples/ for answers
Trigger phrases (AI should recognize):
- "How does X work?"
- "Show me an example of X"
- "What's the best practice for X?"
Workflow:
User asks question โ Check KB index โ Found relevant repo?
โ Yes: Read repo docs, provide answer with citation
โ No: Use discover to find repos, or fall back to web search
Example:
User: How do I use MCP tools in Claude?
AI: [Checks KB, finds mcp-servers repo]
Let me check your local knowledge base...
Found: mcp-servers in ~/github/mcp-servers
[Reads README.md and examples/]
Based on your local repo, here's how to use MCP tools...
Example Flows
Discover new tool:
/github-kb discover Claude MCP
โ [Searches Xiaohongshu, Tavily]
โ Found 3 repos, select to clone
โ Index updated
Research on Xiaohongshu:
/github-kb xiaohongshu Pythonๆฐๆฎๅๆ
โ [Returns top notes with summaries]
Fetch tweet:
/github-kb twitter https://x.com/user/status/123
โ [Returns full tweet content]