github-research

Explore and analyze GitHub repositories related to a research topic. Reads deep-research output, discovers repos from multiple sources, deeply analyzes code, and produces integration blueprints.

By lingzhi227 · 1,566 installs

npx skills add lingzhi227/agent-research-skills --skill github-research

Source repository · Upstream listing

GitHub Research Skill Trigger Activate this skill when the user wants to: "Find repos for [topic]", "GitHub research on [topic]" "Analyze open source code for [topic]" "Find implementations of [paper/technique]" "Which repos implement [algorithm]?" Uses /github research <deep research output dir slash command Overview This skill systematically discovers, evaluates, and deeply analyzes GitHub repositories related to a research topic. It reads deep research output (paper database, phase reports, code references) and produces an actionable integration blueprint for reusing open source code. Installation : ~/.claude/skills/github research/ — scripts, references, and this skill definition. Output : ./github research output/{slug}/ relative to the current working directory. Input : A deep research output directory (containing paper db.jsonl , phase reports, code repos.md , etc.) 6 Phase Pipeline Output Directory Structure Scripts Reference All scripts are Python 3, stdlib only, located in ~/.claude/skills/github research/scripts/ . Script Purpose Key Flags extract research refs.py Parse deep research output for GitHub URLs, paper refs, keywords research dir , output search github.py Search GitHub repos via gh api query , language , min stars , sort , max results , topic , output search github code.py Search GitHub code for implementations query , language , filename , max results , output search paperswithcode.py Search Papers With Code for paper→repo mappings paper title , arxiv id , query , output repo db.py JSONL repo database management subcommands: merge , filter , score , search , tag , stats , export , rank repo metadata.py Fetch detailed metadata via gh api repos , input , output , delay clone repo.py Shallow clone repos for analysis repo , output dir , depth , branch analyze repo structure.py Map file tree, key files, LOC stats repo dir , output extract dependencies.py Extract and parse dependency files repo dir , output find implementations.py Search cloned repo for specific code patterns repo dir , patterns , output repo readme fetch.py Fetch README without cloning repos , input , output , max chars compare repos.py Generate comparison matrix across repos input , output compile github report.py Assemble final report from all phases topic dir Phase 1: Intake Goal : Extract all relevant references, URLs, and keywords from the deep research output. Steps 1. Create output directory structure : 2. Extract references from deep research output : 3. Review extracted refs : Read the generated JSONL. Note: GitHub URLs found directly in reports Paper titles and arxiv IDs (for Papers With Code lookup) Research keywords and themes (for GitHub search queries) 4. Write intake summary : Create phase1 intake/intake summary.md with: Number of direct GitHub URLs found Number of papers with potential code links Key research themes extracted Planned search queries for Phase 2 Checkpoint extracted refs.jsonl exists with entries intake summary.md written Search strategy documented Phase 2: Discovery Goal : Cast a wide net to find 50 200 candidate repos from multiple sources. Steps 1. Search by direct URLs : Any GitHub URLs from Phase 1 → fetch metadata: 2. Search Papers With Code : For each paper with an arxiv ID: 3. Search GitHub by keywords (3 8 queries based on research themes): 4. Search GitHub code (for specific implementations): 5. Fetch READMEs for repos that lack descriptions: 6. Merge all results into master database: 7. Write discovery log : Create phase2 discovery/discovery log.md with search queries used, results per source, total unique repos found. Rate Limits GitHub search API: 30 requests/minute (authenticated) Papers With Code API: No strict limit but be respectful (1 req/sec) Add delay 1.0 to batch operations when needed Checkpoint repo db.jsonl populated with 50 200 repos discovery log.md with search details Phase 3: Filtering Goal : Score and rank repos, select top 15 30 for deeper analysis. Steps 1. Enrich metadata for all repos: 2. Score repos (quality + activity scores): 3. LLM relevance scoring : Read through the top ~50 repos (by quality score) and assign relevance score (0.0 1.0) based on: Direct relevance to research topic Implementation completeness Code quality signals (from README, description) Update the relevance scores: 4. Compute composite scores and rank : 5. Select top repos : Filter to top 15 30: 6. Write filtering report : Create phase3 filtering/filtering report.md : Stats before/after filtering Score distributions Top 30 repos with scores and rationale Scoring Formula Checkpoint ranked repos.jsonl with 15 30 repos filtering report.md with scoring details Phase 4: Deep Dive Goal : Clone and deeply analyze the top 8 15 repos. Steps 1. Select repos for deep dive : Take top 8 15 from ranked list. 2. Clone each repo (shallow): 3. Analyze structure for each cloned repo: 4. Extract dependencies : 5. Find implementations : Search for key algorithms/concepts from research: 6. Deep code reading : For each repo, READ the key source files identified by structure analysis. Write a per repo analysis in phase4 deep dive/analyses/{name} analysis.md : Architecture overview Key algorithms implemented Code quality assessment API / interface design Dependencies and requirements Strengths and limitations Reusability assessment (how easy to extract components) 7. Write deep dive summary : phase4 deep dive/deep dive summary.md IMPORTANT: Actually Read Code Do NOT just summarize READMEs. You must: Read the main source files (entry points, core modules) Understand the actual implementation approach Identify specific functions/classes that implement research concepts Note code patterns, design decisions, and trade offs Checkpoint Repos cloned in repos/ Per repo analysis files in analyses/ deep dive summary.md written Phase 5: Analysis Goal : Cross repo comparison and technique to code mapping. Steps 1. Generate comparison matrix : 2. Write comparison matrix : Create phase5 analysis/comparison matrix.md : Table comparing repos across dimensions (language, LOC, stars, framework, license, tests) Dependency overlap analysis Strengths/weaknesses per repo 3. Write technique map : Create phase5 analysis/technique map.md : Map each paper concept / research technique → specific repo + file + function Identify gaps (techniques with no implementation found) Note alternative implementations of the same concept 4. Write analysis report : phase5 analysis/analysis report.md : Executive summary of findings Key insights from code analysis Recommendations for which repos to use for which purposes Checkpoint comparison matrix.md with repo comparison table technique map.md mapping concepts to code analysis report.md with findings Phase 6: Blueprint Goal : Produce an actionable integration and reuse plan. Steps 1. Write integration plan : phase6 blueprint/integration plan.md : Recommended architecture for combining repos Step by step integration approach Dependency resolution strategy Potential conflicts and how to resolve them 2. Write reuse catalog : phase6 blueprint/reuse catalog.md : For each reusable component: source repo, file path, function/class, what it does, how to extract it License compatibility matrix Effort estimates (easy/medium/hard to integrate) 3. Compile final report : 4. Write blueprint summary : phase6 blueprint/blueprint summary.md : One page executive summary Top 5 repos and why Recommended next steps Checkpoint integration plan.md complete reuse catalog.md with component catalog final report.md compiled blueprint summary.md as executive summary Quality Conventions 1. Repos are ranked by composite score : relevance × 0.4 + quality × 0.35 + activity × 0.25 2. Deep dive requires reading actual code , not just READMEs 3. Integration blueprint must map paper concepts → specific code files/functions 4. Incremental saves : Each phase writes to disk immediately 5. Checkpoint recovery : Can resume from any phase by checking what outputs exist 6. All scripts are stdlib only Python — no pip installs needed 7. gh CLI is required for GitHub API access (must be authenticated) 8. Deduplication by repo id (owner/name) across all searches 9. Rate limit awareness : Respect GitHub search API limits (30 req/min) Error Handling If gh is not installed: warn user and provide installation instructions If a repo is archived/deleted: skip gracefully, note in log If clone fails: skip, note in log, continue with remaining repos If Papers With Code API is down: skip, rely on GitHub search only Always write partial progress to disk so work is not lost References See references/phase guide.md for detailed phase execution guidance Deep research skill: ~/.claude/skills/deep research/SKILL.md Paper database pattern: ~/.claude/skills/deep research/scripts/paper db.py