Automated literature search using the `lit` CLI tool for comprehensive paper discovery, citation analysis, and bibliography management. Use this skill when: - Conducting systematic literature reviews - Building citation networks from seed papers - Searching for academic papers on a topic - Fetching and managing BibTeX references - Downloading and extracting text from PDFs - Managing research projects with paper collections Prerequisites: - BRIGHTDATA_API_KEY for Google Scholar searches - UNPAYWALL_EMAIL for Open Access PDF lookup (optional) - OPENALEX_MAILTO for higher API rate limits (optional)
This skill inherits all available tools. When active, it can use any tool Claude has access to.
scripts/lit.pyscripts/lit_core/__init__.pyscripts/lit_core/cache.pyscripts/lit_core/cli.pyscripts/lit_core/config.pyscripts/lit_core/models.pyscripts/lit_core/providers/__init__.pyscripts/lit_core/providers/brightdata.pyscripts/lit_core/providers/crossref.pyscripts/lit_core/providers/openalex.pyscripts/lit_core/providers/unpaywall.pyscripts/lit_core/services/__init__.pyscripts/lit_core/services/bibtex.pyscripts/lit_core/services/graph.pyscripts/lit_core/services/pdf.pyscripts/lit_core/services/project.pyscripts/lit_core/services/resolver.pyAutomate literature review workflows using the lit CLI tool.
The lit tool supports a human-style literature review workflow:
skills/research-literature-search/scripts/lit.py
All data is cached in ~/.lit_cache/lit.db (SQLite).
| Command | Purpose |
|---|---|
search | Search Google Scholar for papers |
resolve | Convert paper title to DOI |
refs | Get papers this DOI references (backward) |
cites | Get papers citing this DOI (forward) |
bibtex | Generate BibTeX entries |
graph expand | Build citation network via BFS |
graph export | Export graph to JSON/GraphML/CSV |
graph stats | Show graph statistics |
pdf fetch | Download PDF for a DOI |
pdf extract | Extract text from PDF |
project init | Create a new research project |
project list | List all projects |
workspace create | Create agent workspace |
paper add/list/remove | Manage papers in projects |
history | View operation history |
# Basic search
python skills/research-literature-search/scripts/lit.py search "graph neural networks" -n 20
# With filters
python skills/research-literature-search/scripts/lit.py search "machine learning materials" \
-n 30 \
--year-from 2022 \
--year-to 2024 \
--output results.json
# Review articles only
python skills/research-literature-search/scripts/lit.py search "neural network potentials" --review -n 15
# Sort by date (newest first)
python skills/research-literature-search/scripts/lit.py search "transformer chemistry" --sort-date -n 20
Options:
| Option | Description | Default |
|---|---|---|
-n, --num | Number of results | 20 |
--year-from | Filter from this year | - |
--year-to | Filter up to this year | - |
--sort-date | Sort by date (newest first) | False |
--review | Review articles only | False |
-o, --output | Save JSON to file | stdout |
# Basic resolve
python skills/research-literature-search/scripts/lit.py resolve "Attention Is All You Need"
# With hints for better accuracy
python skills/research-literature-search/scripts/lit.py resolve "M3GNet: A Universal Graph Neural Network" --year 2022
python skills/research-literature-search/scripts/lit.py resolve "Deep Potential" --author "Zhang"
Output:
DOI: 10.1038/s43588-022-00349-3
URL: https://doi.org/10.1038/s43588-022-00349-3
Find papers that a DOI references:
python skills/research-literature-search/scripts/lit.py refs 10.1038/s43588-022-00349-3 --limit 50
Papers are saved to cache for graph building.
Find papers that cite a DOI:
python skills/research-literature-search/scripts/lit.py cites 10.1038/s43588-022-00349-3 --limit 100
# Single DOI
python skills/research-literature-search/scripts/lit.py bibtex --doi 10.1038/s43588-022-00349-3
# Save to file
python skills/research-literature-search/scripts/lit.py bibtex --doi 10.1038/nature12373 -o paper.bib
# Generate from all cached papers
python skills/research-literature-search/scripts/lit.py bibtex --from-cache -o library.bib
Build a citation network starting from a seed paper:
# Default: depth 2, both directions, max 500 nodes
python skills/research-literature-search/scripts/lit.py graph expand 10.1038/s43588-022-00349-3
# Customize traversal
python skills/research-literature-search/scripts/lit.py graph expand 10.1038/nature12373 \
--depth 3 \
--direction forward \
--max-nodes 1000
# Start fresh (ignore saved state)
python skills/research-literature-search/scripts/lit.py graph expand 10.1038/nature12373 --fresh
Options:
| Option | Description | Default |
|---|---|---|
-d, --depth | Traversal depth (hops from seed) | 2 |
--direction | forward, backward, or both | both |
-m, --max-nodes | Maximum nodes to collect | 500 |
--fresh | Ignore saved traversal state | False |
# Export to JSON (default)
python skills/research-literature-search/scripts/lit.py graph export
# Export to GraphML (for Gephi, Cytoscape)
python skills/research-literature-search/scripts/lit.py graph export -f graphml -o citations.graphml
# Export to CSV (creates papers.csv + papers_edges.csv)
python skills/research-literature-search/scripts/lit.py graph export -f csv -o my_papers.csv
python skills/research-literature-search/scripts/lit.py graph stats
Output:
Graph Statistics:
Papers: 150
Papers with DOI: 142
Edges: 523
Year range: 2015 - 2024
Total citations: 12450
Avg citations: 83.0
# Download PDF
python skills/research-literature-search/scripts/lit.py pdf fetch 10.1038/s42256-023-00716-3
# Save to specific directory
python skills/research-literature-search/scripts/lit.py pdf fetch 10.1038/nature12373 -o ./papers/
# Get URL only (don't download)
python skills/research-literature-search/scripts/lit.py pdf fetch 10.1038/nature12373 --url-only
PDF sources (in order):
# Fetch and extract in one step
python skills/research-literature-search/scripts/lit.py pdf extract --doi 10.1038/s42256-023-00716-3
# Extract from local file
python skills/research-literature-search/scripts/lit.py pdf extract --file paper.pdf -o paper.txt
# Don't keep PDF after extraction
python skills/research-literature-search/scripts/lit.py pdf extract --doi 10.1038/nature12373 --no-keep
python skills/research-literature-search/scripts/lit.py project init myreview --description "Systematic review of ML in materials"
Creates directory structure at ~/.lit/projects/<name>/:
searches/ - Search result snapshots
graphs/ - Citation graph exports
exports/ - BibTeX, CSV, GraphML exports
notes/ - Analysis notes
workspaces/ - Agent workspace directories
python skills/research-literature-search/scripts/lit.py project list
python skills/research-literature-search/scripts/lit.py project info myreview
python skills/research-literature-search/scripts/lit.py project delete myreview
python skills/research-literature-search/scripts/lit.py workspace create --project myreview
python skills/research-literature-search/scripts/lit.py workspace list
python skills/research-literature-search/scripts/lit.py workspace list --project myreview
# Merge findings into main project
python skills/research-literature-search/scripts/lit.py workspace merge agent_a1b2c3d4
# Abandon workspace
python skills/research-literature-search/scripts/lit.py workspace abandon agent_a1b2c3d4
# Paper must be in cache first (via search, resolve, refs, or cites)
python skills/research-literature-search/scripts/lit.py paper add 10.1038/s43588-022-00349-3 --project myreview
python skills/research-literature-search/scripts/lit.py paper list --project myreview
python skills/research-literature-search/scripts/lit.py paper remove 10.1038/s43588-022-00349-3 --project myreview
# Show recent operations
python skills/research-literature-search/scripts/lit.py history
# Filter by project
python skills/research-literature-search/scripts/lit.py history --project myreview
# Filter by workspace
python skills/research-literature-search/scripts/lit.py history --workspace agent_a1b2c3d4
# Limit results
python skills/research-literature-search/scripts/lit.py history --limit 20
# 1. Initialize project
python skills/research-literature-search/scripts/lit.py project init ml-materials --description "ML in materials science review"
# 2. Start with review articles
python skills/research-literature-search/scripts/lit.py search "machine learning materials science review" --review -n 15 -o reviews.json
# 3. Find seminal papers and resolve DOIs
python skills/research-literature-search/scripts/lit.py resolve "M3GNet: A Universal Graph Neural Network" --year 2022
# 4. Build citation network from key papers
python skills/research-literature-search/scripts/lit.py graph expand 10.1038/s43588-022-00349-3 --depth 2 --max-nodes 300
# 5. Export for analysis
python skills/research-literature-search/scripts/lit.py graph export -f json -o ml_materials_graph.json
# 6. Generate bibliography
python skills/research-literature-search/scripts/lit.py bibtex --from-cache -o references.bib
# 1. Start with a foundational paper
python skills/research-literature-search/scripts/lit.py resolve "Deep Potential Molecular Dynamics" --year 2018
# 2. Get papers that cite it (forward)
python skills/research-literature-search/scripts/lit.py cites 10.1103/PhysRevLett.120.143001 --limit 100
# 3. Get papers it references (backward)
python skills/research-literature-search/scripts/lit.py refs 10.1103/PhysRevLett.120.143001 --limit 50
# 4. Check graph statistics
python skills/research-literature-search/scripts/lit.py graph stats
# Find paper and get citation
python skills/research-literature-search/scripts/lit.py resolve "Attention Is All You Need"
python skills/research-literature-search/scripts/lit.py bibtex --doi 10.48550/arXiv.1706.03762
| Variable | Purpose | Required |
|---|---|---|
BRIGHTDATA_API_KEY | Google Scholar search, PDF fallback | Yes (for search) |
UNPAYWALL_EMAIL | Open Access PDF lookup | Optional |
OPENALEX_MAILTO | Higher API rate limits | Optional |
Set in your shell:
export BRIGHTDATA_API_KEY="your_api_key"
export UNPAYWALL_EMAIL="your@email.com"
export OPENALEX_MAILTO="your@email.com"
All data is cached in SQLite at ~/.lit_cache/lit.db:
This enables: