Literature Survey Generator
SkillDatabases & dataGenerates a complete academic literature survey from a research topic. Your AI searches academic databases, downloads the papers it finds, and writes the review in LaTeX, then checks its own draft and revises it based on feedback. The finished survey comes with a BibTeX bibliography built from the sources it used.
Available today. Use it from your connected AI after setup.
No other account needed.
After adding it, give your AI a research topic and ask it to produce a literature survey. It handles the searching, writing, and revisions from there.
Then ask your AI: use the Literature Survey Generator skill
What your AI can do with it
- Search academic databases including OpenAlex, CrossRef, and Unpaywall
- Download papers as PDFs
- Build a BibTeX bibliography from the sources it finds
- Draft a full literature review in LaTeX
- Compile the finished document so it is ready to use
- Review the draft for quality and revise it based on feedback
What this skill tells your AI
The instructions your AI receives, as published by brycewang-stanford/auto-empirical-research-skills in skills/68-research-productivity-skills/literature-survey-generator/SKILL.md and read by ahel’s review.
A multi-agent, multi-phase pipeline that produces a complete academic literature survey in LaTeX with BibTeX — from search to final compiled PDF.
When to Use
- User wants a literature review on a topic across specific journals
- User wants to find and synthesize recent papers in a field
- User asks for a survey of Top 5 / Top Field journals on a topic
- User wants automated paper search → download → review writing
Overview
The pipeline has 4 phases, each using parallel subagents where possible:
Phase 1: SEARCH (parallel per journal)
↓ search_{journal}.json files
Phase 2: PROCESS (3 parallel agents)
↓ references.bib + paper_summaries.md + pdfs/
Phase 3: DRAFT (1 agent + compilation)
↓ survey.tex → survey.pdf
Phase 4: REVIEW & REVISE (sequential)
↓ review_report.md → survey_v2.tex → survey_v2.pdf
Execution Instructions
Step 0: Setup
-
Parse the user's request to extract:
- Topic: The search query (e.g., "networks", "behavioral economics")
- Journals: Which journals to search (default: Top 5 Economics)
- Year range: Publication year(s) (default: current year)
- Output format: LaTeX (default), Markdown, or both
-
Create working directory:
agent_tasks/{topic_slug}_{YYYYMMDDHH}/ -
Write
plan.mdto the working directory documenting the execution plan. -
Set up task tracking with TaskCreate for the 4 phases.
Step 1: Phase 1 — Parallel Journal Search
Launch one subagent per journal (up to 10 in parallel). Each agent:
- Queries OpenAlex API with the journal's source ID and topic keyword
- Queries CrossRef API with the journal's ISSN and topic keyword
- Deduplicates results by DOI
- Saves to
search_{journal_abbrev}.json
Agent prompt template:
Search for papers about "{TOPIC}" published in {JOURNAL_NAME} in {YEAR}.
1. OpenAlex API (source ID: {OPENALEX_ID}):
curl -s "https://api.openalex.org/works?filter=primary_location.source.id:{OPENALEX_ID},default.search:{TOPIC},publication_year:{YEAR}&per_page=50&mailto=xueheng@mail.sysu.edu.cn"
2. CrossRef API (ISSN: {ISSN}):
curl -s "https://api.crossref.org/journals/{ISSN}/works?query={TOPIC}&filter=from-pub-date:{YEAR}-01-01&rows=50&mailto=xueheng@mail.sysu.edu.cn"
Extract: title, authors, doi, year, cited_by, pdf_urls, abstract (from inverted index), openalex_id.
Deduplicate by DOI. Save to: {WORKDIR}/search_{ABBREV}.json
Key journal identifiers (verify OpenAlex IDs via API before use):
| Journal | ISSN | OpenAlex ID |
|---|---|---|
| American Economic Review | 0002-8282 | S23254222 |
| Econometrica | 0012-9682 | S95464858 |
| Journal of Political Economy | 0022-3808 | (verify via API) |
| Quarterly Journal of Economics | 0033-5533 | S203860005 |
| Review of Economic Studies | 0034-6527 | (verify via API) |
For non-Top-5 journals, first look up the OpenAlex source ID:
curl -s "https://api.openalex.org/sources?search={journal+name}&mailto=xueheng@mail.sysu.edu.cn"
Wait for all search agents to complete before proceeding.
After all agents complete, do a quick tally: read each search_*.json and count papers. If total < 3, consider broadening the search terms or year range. If total > 30, the topic may need narrowing — flag this to the user.
Step 2: Phase 2 — Process (3 Parallel Agents)
Launch these 3 agents simultaneously:
Agent A: PDF Downloader
For each paper with a DOI:
- Query Unpaywall:
https://api.unpaywall.org/v2/{DOI}?email=xueheng@mail.sysu.edu.cn - Check
best_oa_location.url_for_pdfand alloa_locations[].url_for_pdf - If PDF URL found, download to
pdfs/{safe_filename}.pdf - Verify each download is a real PDF (file > 10KB, starts with %PDF)
- Save
pdfs/download_report.md
Agent B: BibTeX Builder
For each DOI:
curl -sL -H "Accept: application/x-bibtex" "https://doi.org/{DOI}"
- Clean citation keys to
{firstauthor}{year}{keyword}format - Add foundational references cited in the introduction (if known)
- Save to
references.bib
Agent C: Summary Extractor
For each paper:
- Read abstracts from
search_*.jsonfiles - For missing/truncated abstracts, query OpenAlex for full inverted abstract
- As fallback, query Semantic Scholar (with 3s sleep between calls)
- Save
paper_summaries.mdwith per-paper sections:- Title, Authors, Journal, DOI, Citations, Full Abstract, Key Themes
- Save
all_papers.json(consolidated, enriched metadata)
Wait for all 3 agents to complete before proceeding.
Step 3: Phase 3 — Draft LaTeX Survey
Launch 1 agent to write the survey. The agent reads:
paper_summaries.md(content source)references.bib(citation keys)
Survey structure (adapt based on paper count and topics):
\documentclass[12pt]{article}
\usepackage{amsmath,amssymb,natbib,geometry,hyperref,booktabs,setspace,array}
\bibliographystyle{plainnat}
1. Title, Author, Abstract (150-200 words)
2. Introduction
- Motivation for the topic
- Selection methodology (how papers were found)
- Brief overview of themes
- Positioning relative to existing surveys
3. Summary Table (booktabs: Authors, Journal, Title, Type, Key Aspect)
4-6. Thematic Sections (group papers by theme, not by journal)
- Each paper: 2+ paragraphs of substantive discussion
- Critical engagement: limitations, open questions
- Cross-references between papers where relevant
7. Methodological Advances (compare approaches across papers)
8. Conclusion (synthesis, gaps, future directions)
Important instructions for the drafting agent:
- Use
\citet{}for in-text citations,\citep{}for parenthetical - Be transparent about papers with tangential relevance to the topic
- Add critical engagement (limitations, open questions) for at least 3 papers
- Verify all
\citekeys match entries inreferences.bib - Target 8-15 pages when compiled
After the agent saves survey.tex, compile it:
cd {WORKDIR}
pdflatex -interaction=nonstopmode survey.tex
bibtex survey
pdflatex -interaction=nonstopmode survey.tex
pdflatex -interaction=nonstopmode survey.tex
Check for errors. Fix any compilation issues before proceeding.
Step 4: Phase 4 — Review & Revise
4a: Review Agent
Reads survey.tex, paper_summaries.md, references.bib.
Writes review_report.md covering:
- Content Accuracy: Does each paper description match its abstract?
- Structure: Is the grouping logical? Are transitions smooth?
- Writing Quality: Academic tone, citation style consistency
- Completeness: Are all papers discussed substantively?
- Specific Revisions: 5-10 actionable changes with priority (HIGH/MEDIUM/LOW)
- Overall Score: X/10 with top 3 strengths and weaknesses
4b: Revision Agent
Reads review_report.md, survey.tex, paper_summaries.md.
Implements ALL revision suggestions. Saves to survey_v2.tex.
Final compilation:
cd {WORKDIR}
pdflatex -interaction=nonstopmode survey_v2.tex
bibtex survey_v2
pdflatex -interaction=nonstopmode survey_v2.tex
pdflatex -interaction=nonstopmode survey_v2.tex
Verify zero errors in the final PDF.
Step 5: Deliver
Report to the user:
- Total papers found per journal
- PDF download success rate
- Review score and key improvements made
- Final PDF page count and location
- List all deliverables in the working directory
Critical Rules
-
File handoff, not context handoff: Every agent saves its output to a file. Never pass large content back to the main agent. Agents return only a status summary (paper count, success/failure, file paths).
-
Parallel where possible, sequential where required: Phases 1 and 2 are parallel internally. Phase 3 depends on Phase 2 outputs. Phase 4 is sequential (review before revision).
-
All agents get
mode: auto: Subagents need Bash, Read, Write, Edit access to do their work without permission prompts. -
Verify before proceeding: Always compile LaTeX and check for errors between phases. Don't hand broken output to the next phase.
-
Be transparent about relevance: Not every paper returned by keyword search is centrally about the topic. The survey should acknowledge varying degrees of relevance rather than force-fitting papers into the narrative.
-
Respect API rate limits: OpenAlex (add mailto), CrossRef (add mailto), Semantic Scholar (3s between calls), arXiv (3s between calls).
Customization Points
- Different journals: Change the journal table. For any journal, look up its OpenAlex source ID first.
- Different output format: Swap LaTeX template for Markdown if user prefers.
- Broader search: Add NBER, SSRN, arXiv searches in Phase 1 using the
academic-paper-searchskill's API patterns. - Deeper review: Add a second review-revise cycle if the first review score < 7.
- Zotero import: After Phase 2, optionally import all papers via
zotero_add_by_doi.
File Structure (Final)
agent_tasks/{topic}_{timestamp}/
├── plan.md # Execution plan
├── search_aer.json # Per-journal search results
├── search_ecma.json
├── search_jpe.json
├── search_qje.json
├── search_restud.json
├── all_papers.json # Consolidated metadata
├── paper_summaries.md # Full abstracts + key themes
├── references.bib # Complete BibTeX database
├── pdfs/ # Downloaded open-access PDFs
│ ├── *.pdf
│ └── download_report.md
├── survey.tex # Initial draft
├── survey.pdf # Initial compilation
├── review_report.md # Quality review
├── survey_v2.tex # Revised draft
└── survey_v2.pdf # Final PDF (deliverable)
Signals
- GitHub stars
- 4k
- Forks
- 476
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
literature-survey-generator- Source
- github.com/brycewang-stanford/auto-empirical-research-skills