Papers and edges
papers/<W-id>.json, one record per work; graph/edges.jsonl carries who cites whom. Atomic writes: a crash never leaves a half-written file.
Capture the papers once. Query the corpus, not the internet, next time.
One skill and one script: papers from OpenAlex into a git-tracked .lit corpus in your project.
Research conversations re-find the same papers every week. jgs-lit-memory turns each keep-worthy paper into one normalized JSON record under .lit/ in the project that produced it, with citation edges between records. The corpus is plain files, git-tracked, and survives every session. The next conversation asks the corpus before it asks the internet.
papers/<W-id>.json, one record per work; graph/edges.jsonl carries who cites whom. Atomic writes: a crash never leaves a half-written file.
Papers land in inbox.jsonl the moment they come up. No network needed. A triage run resolves the queue and reports what failed, with reasons.
A generated .lit/SKILL.md index carries counts and query recipes, so the agent checks the corpus before re-searching OpenAlex.
lit_fetch.py is the only component that touches the network, and it talks to OpenAlex only. Everything else is agent reading and writing. Singleton DOI and W-id lookups are free; budgeted calls warn without an API key.
| Invocation | Behavior |
|---|---|
--doi <doi> | Singleton capture by DOI (free). seed=true, source=capture. |
--openalex <W-id> | Singleton capture by W-id (free). Same write semantics. |
--arxiv <id> --title <t> | OpenAlex has no arXiv lookup; resolves through the verified title search. Bare --arxiv is a usage error. |
--title <t> [--author] [--year] | Budgeted search with client-side verification. Near-misses print as candidates and write nothing. |
--ids "W1|W2|..." | Batch fetch, 100 per call, skips existing records. |
--inbox | Triage the offline queue: dedupe, resolve, rewrite once. Failures stay queued with their reason. |
--status | Corpus summary. Read-only. |
--check | Live smoke test of the four endpoint forms. |
install.py already targets the main coding agents. Native folder copy for ZCode, Claude Code, OpenAI Codex, GitHub Copilot CLI, and OpenClaw. Gemini CLI as an extension. Cursor as project-local rules. Run python install.py --agent all for the user-global hosts, then --agent cursor in the repo that needs rules. Per-path table: docs/other-agents.md.
Native folder. ~/.zcode/skills/<skill>/. --agent zcode
Native folder, namespaced. ~/.claude/skills/jgs/<skill>/. --agent claude
Project-local .mdc rules. Run in the repo you want. --agent cursor
Extension under ~/.gemini/extensions/. --agent gemini
Native folder. ~/.agents/skills/jgs/<skill>/. --agent codex
Native folder. ~/.copilot/skills/jgs/<skill>/. --agent copilot
The lit-capture skill triggers when a paper comes up with enough identity to fetch (DOI, arXiv id, OpenAlex W-id, or exact title plus author or year) and looks worth keeping. It scans the conversation, dedupes against the corpus, then captures offline or fetches now with your consent.
# say this in a research conversation
Capture this one: 10.1038/nature12373
Save that arXiv paper, 2401.12345, "Attention Is All You Need"
What do we have on citation graph bias? Check the corpus first.Direct script use, after install (ZCode path shown; other hosts use their installed folder):
# status is read-only; try it first
python "$HOME/.zcode/skills/lit-capture/lit_fetch.py" --status
python "$HOME/.zcode/skills/lit-capture/lit_fetch.py" --doi 10.1038/nature12373
python "$HOME/.zcode/skills/lit-capture/lit_fetch.py" --inboxFull invoke and first-run detail, limits, and corpus layout: docs/skill-usage.md. Skill index: SKILLS.md.
Prerequisites: Python 3.9+ (stdlib only), network access to api.openalex.org, an OpenAlex API key optional. Install into every user-global host, or pick one. Restart the agent session so it discovers the skill.
# Python 3.9+, stdlib only. OpenAlex over HTTPS. git clone https://github.com/jgsystemsconsulting/jgs-lit-memory cd jgs-lit-memory python install.py --agent all # ZCode, Claude Code, Codex, Copilot, OpenClaw, Gemini python install.py --agent cursor # project-local .cursor/rules python install.py --dry-run python install.py --list-agents
Prefer your agent to do it? The paste-ready "Install with your AI agent" prompt is in the README. In-host install also works: Claude Code /plugin marketplace add jgsystemsconsulting/jgs-lit-memory, Gemini gemini extensions install from the repo URL.