From pnge-core
Unified literature search across OpenAlex, CrossRef, USGS Publications Warehouse, and DOE OSTI. Use whenever the user asks for academic search, literature search, journal articles, technical reports, citations, or DOI lookups on petroleum engineering, geochemistry, critical minerals, produced water, direct lithium extraction, or reservoir topics. Trigger for phrases like find papers on direct lithium extraction, literature search on Marcellus Shale, look up this DOI, USGS reports on produced water, DOE OSTI reports on critical minerals, NETL technical reports, OpenAlex search, CrossRef lookup, most cited papers on lithium brine, peer-reviewed literature on magnesium recovery, find fact sheets, national lab publications, or who wrote this paper. Auto-routes by query cues and de-duplicates by DOI. For USGS data DOIs 10.5066 or OSTI dataset DOIs point at pnge-core:datacite-doi. Output: unified citation table with DOI, year, authors, source, open-access flag, plus narrative.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pnge-core:pnge-literatureThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A single orchestrated entry point for scholarly discovery across four
A single orchestrated entry point for scholarly discovery across four complementary sources. The student asks "find papers on X" and the skill decides which source(s) to query, merges results, de-duplicates by DOI, and returns a unified citation table.
| Adapter | Index / API | Best For |
|---|---|---|
openalex | https://api.openalex.org/works | Broadest academic coverage, 250M+ works, citations, OA flag |
crossref | https://api.crossref.org/works | Publisher-issued DOIs, journal article metadata, funders |
usgs-pw | https://pubs.usgs.gov/pubs-services/publication | USGS Professional Papers, Fact Sheets, Open-File Reports |
doe-osti | https://www.osti.gov/api/v1/records | DOE-funded research: NETL, national labs, university grants |
A fifth sibling skill, pnge-core:datacite-doi, handles research-data DOIs
registered with DataCite (USGS 10.5066, some OSTI 10.2172, Zenodo,
Figshare, Dryad). This skill does NOT merge DataCite in — it points at
pnge-core:datacite-doi when a CrossRef 404 suggests a DataCite DOI.
None required for any adapter. All four APIs are fully public.
Optional OpenAlex + CrossRef polite pool: providing a contact email yields faster rate limits and priority routing. Resolution order:
~/.config/pnge-literature/credentials — parse [email protected]~/.config/openalex/credentials or ~/.config/crossref/credentialsPNGE_MAILTO, OPENALEX_MAILTO, or CROSSREF_MAILTO env varMAILTO=$(grep '^mailto=' ~/.config/pnge-literature/credentials 2>/dev/null | cut -d= -f2)
[ -z "$MAILTO" ] && MAILTO="${PNGE_MAILTO:-${CROSSREF_MAILTO:-${OPENALEX_MAILTO}}}"
The mailto is a contact address, not a secret. Any valid email works.
Parse the user's request, detect a --source <name> hint if present, and
otherwise apply the routing matrix below.
Explicit source override: if the user says "search OpenAlex", "search CrossRef", "search USGS Publications Warehouse", or "search OSTI" use that source only.
DOI pattern: if the query contains a DOI (10.\d{4,9}/\S+), route
by prefix:
| DOI Prefix | Adapter | Notes |
|---|---|---|
10.3133 | usgs-pw | USGS Numbered Series — direct indexId lookup |
10.2172 | doe-osti | OSTI identifier — may also resolve via pnge-core:datacite-doi |
10.5066 | pnge-core:datacite-doi | USGS data releases — NOT in CrossRef, use DataCite |
| anything else | crossref | Publisher DOI — CrossRef is authoritative |
Keyword routing (no DOI):
| Query Cue | Adapter(s) |
|---|---|
| mentions "USGS" / "Fact Sheet" / "Open-File Report" / "SIR" / "Professional Paper" | usgs-pw |
| mentions "DOE" / "NETL" / "Sandia" / "Berkeley Lab" / "Argonne" / "PNNL" / "ORNL" / "INL" / "NREL" / "LANL" / "LLNL" | doe-osti |
| mentions "peer-reviewed" / "journal" / "citations" / "highly cited" | openalex + crossref |
| generic "find papers on X" / "literature on X" | openalex first, then crossref for DOI enrichment |
| asks for open-access PDFs | openalex with is_oa:true |
| asks for author's works | openalex (author disambiguation is better than CrossRef) |
| asks for a specific DOI's metadata | crossref — or DataCite if 404 |
Auto mode: unless a single source is clearly indicated, run
openalex + either usgs-pw or doe-osti based on topic heuristics
(lithium/produced-water/critical-minerals → add USGS and OSTI; generic
petroleum engineering → OpenAlex alone).
See references/adapters.md for full parameter tables. Quick reference:
OpenAlex:
curl -s "https://api.openalex.org/works?search=direct+lithium+extraction+produced+water&per-page=10&sort=cited_by_count:desc" \
-H "User-Agent: pnge-literature/1.0 (mailto:${MAILTO})"
CrossRef:
curl -s "https://api.crossref.org/works?query=lithium+produced+water&rows=10&sort=is-referenced-by-count&order=desc&select=DOI,title,author,published-print,container-title,is-referenced-by-count,abstract&mailto=${MAILTO}"
USGS Publications Warehouse:
curl -sL "https://pubs.usgs.gov/pubs-services/publication?q=lithium+produced+water&typeName=Report&page_size=10"
DOE OSTI:
curl -s "https://www.osti.gov/api/v1/records?q=lithium+produced+water&rows=10" \
-H "Accept: application/json"
Each adapter returns a different shape. Normalize every hit to a common record:
{
"doi": "10.xxxx/yyyy", // or null if none
"title": "string", // HTML/JATS stripped
"authors": ["Last F.", ...],
"year": 2024,
"venue": "journal or series name",
"type": "journal-article|report|fact-sheet|conference|...",
"abstract": "string or null",
"citations": int or null, // only OpenAlex + CrossRef
"open_access": bool or null, // only OpenAlex
"pdf_url": "string or null",
"source": "openalex|crossref|usgs-pw|doe-osti",
"source_id": "W.../osti_id/indexId"
}
Then de-duplicate by DOI (case-insensitive). When the same DOI comes
from multiple sources, merge by taking the most-complete field values and
recording all sources in provenance. See references/deduplication.md
for the exact merge precedence.
Unified citation table + narrative summary. Cap at 15 rows.
## Literature Search: Direct Lithium Extraction from Produced Water
**Query:** direct lithium extraction produced water
**Sources queried:** OpenAlex, CrossRef, DOE OSTI
**Raw hits:** 47 | **After dedup:** 32 | **Shown:** top 15 by citations
| # | Year | Title | Authors | Venue / Series | Cites | OA | DOI | Source |
|---|------|------------------------------------------------------|-------------------|------------------------|-------|-----|------------------------|----------|
| 1 | 2020 | Lithium recovery from produced water: a review | Smith et al. | Water Research | 312 | Yes | 10.1016/j.watres.2020… | OA + CR |
| 2 | 2025 | Separation of Li and Mg from brines via ZIC | Choi H. et al. | NETL Tech Report | 4 | Yes | 10.2172/3016248 | OSTI |
| 3 | 2024 | Lithium resource in Smackover Formation brines | Knierim & Masters | USGS Fact Sheet 2024-… | 12 | Yes | 10.3133/fs20243052 | USGS-PW |
| … | … | … | … | … | … | … | … | … |
**Summary:** Dominant themes are (1) DLE sorbent development (H2TiO3, Al-based),
(2) field-scale pilots in Smackover and Marcellus, and (3) techno-economic
analyses sub-100 mg/L Li feed. Most cited: Smith 2020 review (312). Most
recent DOE work: NETL zwitterionic chromatography (2025). USGS fact sheet
2024-3052 is the authoritative resource estimate for Smackover.
**Access:** OA = open access PDF available. USGS series always freely
downloadable. OSTI fulltext at `https://www.osti.gov/servlets/purl/{osti_id}`.
Full API details and pagination in references/adapters.md. Condensed:
https://api.openalex.org/worksper-page=1..200, cursor-based deep pagingfilter=open_access.is_oa:true,publication_year:>2019sort=cited_by_count:desc or publication_date:descUser-Agent: pnge-literature/1.0 (mailto:${MAILTO})https://api.crossref.org/worksrows=1..1000, offset max 10000, cursor * for deeper pagingfilter=from-pub-date:2020-01-01,type:journal-article,has-abstract:truesort=is-referenced-by-count&order=desc or sort=relevancemailto=${MAILTO}10.5066) will 404 — point at pnge-core:datacite-doihttps://pubs.usgs.gov/pubs-services/publication (use curl -sL)page_size=1..100, page_number 1-indexedtypeName=Report|Article, year=YYYY, pub_x_days=N/publication/{indexId} e.g. fs20243052 or numeric 70261664https://www.osti.gov/api/v1/recordsrows=1..100, page 1-indexedX-Total-Count response header (use curl -si)sponsor_org=NETL, research_org=..., product_type=Technical+ReportTechnical Report, Journal Article, Conference, Thesis/Dissertation, PatentAccept: application/json (otherwise XML)q stringhttps://www.osti.gov/servlets/purl/{osti_id}| User says... | Route |
|---|---|
| "find papers on DLE from produced water" | openalex + crossref (dedup by DOI) |
| "USGS fact sheets on lithium" | usgs-pw only |
| "most cited papers on Marcellus geochemistry" | openalex (sort by citations) |
| "DOE reports on critical minerals" | doe-osti only |
| "NETL work on direct lithium extraction" | doe-osti with sponsor_org=NETL |
| "look up DOI 10.1016/j.watres.2020.116198" | crossref single-DOI |
| "look up DOI 10.3133/fs20243052" | usgs-pw single indexId |
| "look up DOI 10.5066/P9DSRCZJ" | point at pnge-core:datacite-doi (not CrossRef) |
| "papers by Stringfellow on lithium" | openalex author filter, then crossref for DOIs |
| "recent literature on produced water treatment" | openalex with publication_year:>2023 |
| "Appalachian basin brine chemistry research" | openalex + doe-osti + usgs-pw (topical triad) |
| "open access papers on magnesium recovery" | openalex with filter=open_access.is_oa:true |
Full spec in references/deduplication.md. Short version:
title: longest non-HTML stringauthors: longest list (OpenAlex typically wins)abstract: longest non-empty after stripping markupcitations: max across sourcesopen_access: true if any source says true, else falsepdf_url: prefer OA url > OSTI purl > USGS links[] > CrossRef linksource: comma-joined list of all contributing adaptersFor each adapter, fetch one page and stop unless the user asks "all" or "more". Warn before fetching >500 records across sources.
| Adapter | Signal total | Page mechanism |
|---|---|---|
| openalex | meta.count in body | cursor=* then use meta.next_cursor |
| crossref | message.total-results | offset up to 10000, else cursor=* then next-cursor |
| usgs-pw | recordCount in body | page_number 1-indexed |
| doe-osti | X-Total-Count header | page 1-indexed |
When parallel-running adapters, limit each to per-page=25 in auto mode
to keep total time under ~3 seconds.
| Condition | Source | Action |
|---|---|---|
| HTTP 200 + empty results | any | Report "no hits on {source}"; try adjacent adapter or broaden query |
| HTTP 404 on DOI lookup | crossref | Fall back to DataCite via pnge-core:datacite-doi for prefixes 10.5066, 10.2172, 10.25338 |
| HTTP 400 | any | Echo error body; fix parameter names and retry |
| HTTP 429 rate limit | openalex / crossref | Add mailto polite-pool address; backoff 1s |
| HTTP 500 on date filter | doe-osti | Documented bug — move year into keyword q and retry |
| HTTP 301 redirect | usgs-pw | Always curl -sL to follow; pubs.er.usgs.gov → pubs.usgs.gov |
| X-Rate-Limit-Remaining = 0 | doe-osti | Wait 60s and retry; reduce page size |
| HTML/JATS in title or abstract | any | Strip with sed 's/<[^>]*>//g' before display |
| Citation count = 0 | crossref | Crossref undercounts; cross-check OpenAlex cited_by_count |
| OA flag true but no oa_url | openalex | Note "(OA version not indexed)" and emit DOI link only |
| Adapter timeout | any | Skip that source, annotate output, continue with remaining adapters |
Every response MUST include:
# | Year | Title | Authors | Venue | Cites | OA | DOI | SourceShorten titles to ~60 chars with ellipsis. Use "Last F." for first author plus "et al." when 3+. Always include the DOI column even if null ("—").
A reference Go client is in references/golang_client.go. Single binary:
go run references/golang_client.go \
--source auto \
--query "direct lithium extraction produced water" \
--limit 10 \
--mailto [email protected]
Flags:
--source openalex|crossref|usgs|osti|auto (default: auto)--query STRING (required unless --doi given)--doi STRING (single-DOI lookup; routes by prefix)--limit N (default 10, max 50)--year-from YYYY, --year-to YYYY--mailto EMAIL (polite pool for OpenAlex + CrossRef)--json (emit unified records as JSON instead of a table)The client implements the normalization, de-duplication, and merge precedence described above.
| Companion Skill | Use Together When... |
|---|---|
pnge-core:datacite-doi | DOI is 10.5066 (USGS data) or CrossRef returns 404 on a research-data DOI |
pnge-patents:patentsview | User wants patents alongside peer-reviewed literature (DLE tech scans) |
pnge-federal-data:netl-edx | User needs the underlying dataset cited in an OSTI or USGS report |
pnge-core:usgs-minerals | Commodity summaries complement USGS publication searches on Li/Mg |
pnge-core:usgs-produced-waters | Literature on produced-water chemistry pairs with the geochem database |
doe-osti; for USGS series use usgs-pw.is-referenced-by-count) include only
references deposited by participating publishers via Crossref Cited-by.
Expect undercounts vs OpenAlex or Google Scholar.references/adapters.md documents the rules.10.5066/*) and some OSTI
dataset DOIs (10.2172/* data releases) are registered with DataCite,
not CrossRef. A 404 from CrossRef on these prefixes is expected — use
pnge-core:datacite-doi to resolve them.A... ID); CrossRef does not. For "who has published on
X" queries, prefer OpenAlex.oa_url field is the reliable signal.bash_tool with curl + jq for interactive queries.references/golang_client.go for bulk or scripted use.Accept: application/json for OSTI (otherwise XML).curl -sL for USGS Publications Warehouse (301 redirect on
the legacy pubs.er.usgs.gov host).https://doi.org/
prefix before de-duplicating.^10\.(3133|2172|5066|\d{4,9})/auto mode, run the chosen adapters in parallel (goroutines or
curl &) and join before dedup.npx claudepluginhub jpfielding/claude.pnge --plugin pnge-coreGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.