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 https://github.com/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.)
Phase 1: Intake → Extract refs, URLs, keywords from deep-research output
Phase 2: Discovery → Multi-source broad GitHub search (50-200 repos)
Phase 3: Filtering → Score & rank → select top 15-30 repos
Phase 4: Deep Dive → Clone & deeply analyze top 8-15 repos (code reading)
Phase 5: Analysis → Per-repo reports + cross-repo comparison
Phase 6: Blueprint → Integration/reuse plan for research topic
github-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
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.
SLUG=$(echo "$TOPIC" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd 'a-z0-9-')
mkdir -p github-research-output/$SLUG/{phase1_intake,phase2_discovery/search_results,phase3_filtering,phase4_deep_dive/{repos,analyses},phase5_analysis,phase6_blueprint}
python ~/.claude/skills/github-research/scripts/extract_research_refs.py \
--research-dir <deep-research-output-dir> \
--output github-research-output/$SLUG/phase1_intake/extracted_refs.jsonl
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.
python ~/.claude/skills/github-research/scripts/repo_metadata.py \
--repos owner1/name1 owner2/name2 ... \
--output github-research-output/$SLUG/phase2_discovery/search_results/direct_urls.jsonl
python ~/.claude/skills/github-research/scripts/search_paperswithcode.py \
--arxiv-id 2401.12345 \
--output github-research-output/$SLUG/phase2_discovery/search_results/pwc_2401.12345.jsonl
python ~/.claude/skills/github-research/scripts/search_github.py \
--query "multi-agent LLM coordination" \
--min-stars 10 --sort stars --max-results 50 \
--output github-research-output/$SLUG/phase2_discovery/search_results/gh_query1.jsonl
python ~/.claude/skills/github-research/scripts/search_github_code.py \
--query "class MultiAgentOrchestrator" \
--language python --max-results 30 \
--output github-research-output/$SLUG/phase2_discovery/search_results/code_query1.jsonl
python ~/.claude/skills/github-research/scripts/repo_readme_fetch.py \
--input <repos.jsonl> \
--output github-research-output/$SLUG/phase2_discovery/search_results/readmes.jsonl
python ~/.claude/skills/github-research/scripts/repo_db.py merge \
--inputs github-research-output/$SLUG/phase2_discovery/search_results/*.jsonl \
--output github-research-output/$SLUG/repo_db.jsonl
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.
python ~/.claude/skills/github-research/scripts/repo_metadata.py \
--input github-research-output/$SLUG/repo_db.jsonl \
--output github-research-output/$SLUG/repo_db.jsonl \
--delay 0.5
python ~/.claude/skills/github-research/scripts/repo_db.py score \
--input github-research-output/$SLUG/repo_db.jsonl \
--output github-research-output/$SLUG/repo_db.jsonl
relevance_score (0.0-1.0) based on: python ~/.claude/skills/github-research/scripts/repo_db.py tag \
--input github-research-output/$SLUG/repo_db.jsonl \
--ids owner/name --tags "relevance:0.85"
python ~/.claude/skills/github-research/scripts/repo_db.py score \
--input github-research-output/$SLUG/repo_db.jsonl \
--output github-research-output/$SLUG/repo_db.jsonl
python ~/.claude/skills/github-research/scripts/repo_db.py rank \
--input github-research-output/$SLUG/repo_db.jsonl \
--output github-research-output/$SLUG/phase3_filtering/ranked_repos.jsonl \
--by composite_score
python ~/.claude/skills/github-research/scripts/repo_db.py filter \
--input github-research-output/$SLUG/phase3_filtering/ranked_repos.jsonl \
--output github-research-output/$SLUG/phase3_filtering/ranked_repos.jsonl \
--max-repos 30 --not-archived
phase3_filtering/filtering_report.md:activity_score = sigmoid((days_since_push < 90) * 0.4 + has_recent_commits * 0.3 + open_issues_ratio * 0.3)
quality_score = normalize(log(stars+1) * 0.3 + log(forks+1) * 0.2 + has_license * 0.15 + has_readme * 0.15 + not_archived * 0.2)
composite_score = relevance * 0.4 + quality * 0.35 + activity * 0.25
ranked_repos.jsonl with 15-30 reposfiltering_report.md with scoring detailsGoal: Clone and deeply analyze the top 8-15 repos.
python ~/.claude/skills/github-research/scripts/clone_repo.py \
--repo owner/name \
--output-dir github-research-output/$SLUG/phase4_deep_dive/repos/
python ~/.claude/skills/github-research/scripts/analyze_repo_structure.py \
--repo-dir github-research-output/$SLUG/phase4_deep_dive/repos/name/ \
--output github-research-output/$SLUG/phase4_deep_dive/analyses/name_structure.json
python ~/.claude/skills/github-research/scripts/extract_dependencies.py \
--repo-dir github-research-output/$SLUG/phase4_deep_dive/repos/name/ \
--output github-research-output/$SLUG/phase4_deep_dive/analyses/name_deps.json
python ~/.claude/skills/github-research/scripts/find_implementations.py \
--repo-dir github-research-output/$SLUG/phase4_deep_dive/repos/name/ \
--patterns "class Transformer" "def forward" "attention" \
--output github-research-output/$SLUG/phase4_deep_dive/analyses/name_impls.jsonl
phase4_deep_dive/analyses/{name}_analysis.md:phase4_deep_dive/deep_dive_summary.mdDo NOT just summarize READMEs. You must:
repos/analyses/deep_dive_summary.md writtenGoal: Cross-repo comparison and technique-to-code mapping.
python ~/.claude/skills/github-research/scripts/compare_repos.py \
--input github-research-output/$SLUG/phase4_deep_dive/analyses/ \
--output github-research-output/$SLUG/phase5_analysis/comparison.json
phase5_analysis/comparison_matrix.md:phase5_analysis/technique_map.md: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.
phase6_blueprint/integration_plan.md:phase6_blueprint/reuse_catalog.md: python ~/.claude/skills/github-research/scripts/compile_github_report.py \
--topic-dir github-research-output/$SLUG/
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.pyAssists in writing high-quality content by conducting research, adding citations, improving hooks, iterating on outlines, and providing real-time feedback on each section. Transforms your writing process from solo effort to collaborative partnership.
Identifies high-quality leads for your product or service by analyzing your business, searching for target companies, and providing actionable contact strategies. Perfect for sales, business development, and marketing professionals.
Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.
Efficient database search tool for bioRxiv preprint server. Use this skill when searching for life sciences preprints by keywords, authors, date ranges, or categories, retrieving paper metadata, downloading PDFs, or conducting literature reviews.
Query and analyze scholarly literature using the OpenAlex database. This skill should be used when searching for academic papers, analyzing research trends, finding works by authors or institutions, tracking citations, discovering open access publications, or conducting bibliometric analysis across 240M+ scholarly works. Use for literature searches, research output analysis, citation analysis, and academic database queries.
Access USPTO APIs for patent/trademark searches, examination history (PEDS), assignments, citations, office actions, TSDR, for IP analysis and prior art searches.
Multiagent AI system for scientific research assistance that automates research workflows from data analysis to publication. This skill should be used when generating research ideas from datasets, developing research methodologies, executing computational experiments, performing literature searches, or generating publication-ready papers in LaTeX format. Supports end-to-end research pipelines with customizable agent orchestration.
Automated LLM-driven hypothesis generation and testing on tabular datasets. Use when you want to systematically explore hypotheses about patterns in empirical data (e.g., deception detection, content analysis). Combines literature insights with data-driven hypothesis testing. For manual hypothesis formulation use hypothesis-generation; for creative ideation use scientific-brainstorming.
Take lingzhi227/github-research from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip.
Without those the skill loads but fails at the first command.