npx skills add ...
npx skills add lingzhi227/agent-research-skills --skill 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.
npx skills add lingzhi227/agent-research-skills --skill github-research
Activate this skill when the user wants to:
/github-research <deep-research-output-dir> slash commandThis 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.)
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 |
Goal: Extract all relevant references, URLs, and keywords from the deep-research output.
Create output directory structure:
Extract references from deep-research output:
Review extracted refs: Read the generated JSONL. Note:
Write intake summary: Create phase1_intake/intake_summary.md with:
extracted_refs.jsonl exists with entriesintake_summary.md writtenGoal: Cast a wide net to find 50-200 candidate repos from multiple sources.
Search by direct URLs: Any GitHub URLs from Phase 1 → fetch metadata:
Search Papers With Code: For each paper with an arxiv ID:
Search GitHub by keywords (3-8 queries based on research themes):
Search GitHub code (for specific implementations):
Fetch READMEs for repos that lack descriptions:
Merge all results into master database:
Write discovery log: Create phase2_discovery/discovery_log.md with search queries used, results per source, total unique repos found.
--delay 1.0 to batch operations when neededrepo_db.jsonl populated with 50-200 reposdiscovery_log.md with search detailsGoal: Score and rank repos, select top 15-30 for deeper analysis.
Enrich metadata for all repos:
Score repos (quality + activity scores):
LLM relevance scoring: Read through the top ~50 repos (by quality_score) and assign relevance_score (0.0-1.0) based on:
Compute composite scores and rank:
Select top repos: Filter to top 15-30:
Write filtering report: Create phase3_filtering/filtering_report.md:
ranked_repos.jsonl with 15-30 reposfiltering_report.md with scoring detailsGoal: Clone and deeply analyze the top 8-15 repos.
Select repos for deep dive: Take top 8-15 from ranked list.
Clone each repo (shallow):
Analyze structure for each cloned repo:
Extract dependencies:
Find implementations: Search for key algorithms/concepts from research:
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:
Write deep dive summary: phase4_deep_dive/deep_dive_summary.md
Do NOT just summarize READMEs. You must:
repos/analyses/deep_dive_summary.md writtenGoal: Cross-repo comparison and technique-to-code mapping.
Generate comparison matrix:
Write comparison matrix: Create phase5_analysis/comparison_matrix.md:
Write technique map: Create phase5_analysis/technique_map.md:
Write analysis report: phase5_analysis/analysis_report.md:
comparison_matrix.md with repo comparison tabletechnique_map.md mapping concepts to codeanalysis_report.md with findingsGoal: Produce an actionable integration and reuse plan.
Write integration plan: phase6_blueprint/integration_plan.md:
Write reuse catalog: phase6_blueprint/reuse_catalog.md:
Compile final report:
Write blueprint summary: phase6_blueprint/blueprint_summary.md:
integration_plan.md completereuse_catalog.md with component catalogfinal_report.md compiledblueprint_summary.md as executive summaryrelevance × 0.4 + quality × 0.35 + activity × 0.25gh CLI is required for GitHub API access (must be authenticated)repo_id (owner/name) across all searchesgh is not installed: warn user and provide installation instructionsreferences/phase-guide.md for detailed phase execution guidance~/.claude/skills/deep-research/SKILL.md~/.claude/skills/deep-research/scripts/paper_db.pygithub-research-output/{slug}/
├── repo_db.jsonl # Master repo database
├── phase1_intake/
│ ├── extracted_refs.jsonl # URLs, keywords, paper-repo links
│ └── intake_summary.md
├── phase2_discovery/
│ ├── search_results/ # Raw JSONL from each search
│ └── discovery_log.md
├── phase3_filtering/
│ ├── ranked_repos.jsonl # Scored & ranked subset
│ └── filtering_report.md
├── phase4_deep_dive/
│ ├── repos/ # Cloned repos (shallow)
│ ├── analyses/ # Per-repo analysis .md files
│ └── deep_dive_summary.md
├── phase5_analysis/
│ ├── comparison_matrix.md # Cross-repo comparison
│ ├── technique_map.md # Paper concept → code mapping
│ └── analysis_report.md
└── phase6_blueprint/
├── integration_plan.md # How to combine repos
├── reuse_catalog.md # Reusable components catalog
├── final_report.md # Complete compiled report
└── blueprint_summary.md