lecion/github-kb
Overview
This skill helps you explore, research, and learn from GitHub open source projects by cloning repos, analyzing source code, and maintaining a local indexed knowledge base. It streamlines repository lookups, targeted code inspection, and documentation of findings in a central CLAUDE.md index. Use it to understand implementation details, track technical decisions, and keep a searchable archive of explored projects.
How this skill works
First it checks a local knowledge base index (CLAUDE.md) to see if a repository has already been cloned and summarized. If the project exists, it inspects the local copy with targeted tools (read, glob, grep) and an Explore agent to extract architecture and implementation details. If the repo is new, it clones into a configurable root directory, performs automated or guided analysis, and updates the CLAUDE.md index with a categorized entry and brief description.
When to use it
- You want a quick project-level overview or implementation walkthrough for a GitHub repo.
- You need to trace where a feature or bug is implemented across source files.
- You want to build or maintain a local indexed archive of explored open-source projects.
- You need to compare architectural decisions across similar projects.
- You want to prepare documentation or technical notes after a repo review.
Best practices
- Set GITHUB_KB_ROOT to a predictable directory so all clones and the index stay organized.
- Always check CLAUDE.md first to avoid duplicate clones and to leverage existing summaries.
- When cloning, use HTTPS or SSH according to repo access and update the index immediately after exploration.
- Use targeted searches (glob/grep) for specific implementation questions before doing full analysis to save time.
- Categorize new entries clearly and write a concise one-line description to make future lookups faster.
Example use cases
- Investigate how an open-source web framework implements routing and middleware across modules.
- Clone a promising ML library and extract key model classes, configuration patterns, and training loops for comparison.
- Track trending repos in a domain by cloning and summarizing them into CLAUDE.md for team knowledge sharing.
- Answer developer questions about where a function is defined and how data flows across the codebase.
- Create a curated local catalog of useful CLI tools and utilities with short descriptions and category tags.
FAQ
The index lives at GITHUB_KB_ROOT/CLAUDE.md (default ~/github-kb/). Change the GITHUB_KB_ROOT environment variable to relocate it.
How do I add a newly analyzed repo to the index?
After cloning and exploring, edit CLAUDE.md: add the project under the appropriate category, include a linked directory name, a brief description, and update the total project count in the header.