No slash command · from workflows
Manages Paperpile reference libraries and resolves citations to local PDFs via the paperpile CLI. Handles add, search, fetch, label, edit, trash, and auth operations.
Ships in workflows. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
What this skill carries — grep references/ for any subject the names below miss:
!d=${CLAUDE_SKILL_DIR}; command -v skill-toc >/dev/null 2>&1 && exec skill-toc "$d"; s=$HOME/.claude/skills/plugin-utils/bin/skill-toc; [ -x "$s" ] && exec "$s" "$d"; echo "(skill-toc unavailable: references and scripts are NOT listed here — install the plugin-utils plugin, or start a new session so its bin/ reaches PATH)"
Manage your Paperpile library and resolve citations to PDFs via the paperpile CLI.
CLI-first — this is the whole point of the skill. Every library operation (add, search,
fetch, label, edit, trash, auth) goes through the paperpile CLI, which is pure HTTP. Never
drive the Paperpile web app (app.paperpile.com) via browser automation to add or manage
references — it is slower, the React forms reject synthetic input, and the CLI already does it.
If the CLI fails, it is almost always stale auth — refresh cookies (below), do not reach for the browser.
paperpile binary at ~/.local/bin/paperpile (Bun-compiled from ~/projects/paperpile-cli)paperpile auth fails, refresh them automatically (no manual
Cookie-Editor export needed): ${CLAUDE_SKILL_DIR}/scripts/refresh-auth.sh pulls the
cookies from the logged-in browser over CDP (:9222 by default — the everyday browser,
Chromium on Linux), imports them, and verifies.resolve_pdf.py takes the first REACHABLE port from,
in order, --cdp-port, $PAPERPILE_CDP_PORT, :9250 (the dedicated automation profile at
~/.config/chrome-cdp) and :9222 (the everyday browser). The everyday browser is often the
one actually logged in, so it is tried rather than assumed absent — pass --cdp-port 9222 to
force it.| Need | Command |
|---|---|
| Verify auth | paperpile auth |
| Import cookies | paperpile auth import ~/cookies.json |
| Index/refresh library | paperpile index --refresh |
| Search library | paperpile search "proxy voting" |
| Download PDF by item ID | paperpile download <item_id> |
| Fetch PDF by bibkey | paperpile fetch Smith2024-ab |
| Add by DOI | paperpile add 10.1016/j.jfineco.2024.01.001 |
| Add web source by URL | paperpile add https://example.com/article |
| Add remote PDF | paperpile add https://example.com/report.pdf |
| Add local PDF | paperpile add /path/to/report.pdf |
| Attach PDF to an EXISTING item | paperpile attach <bibkey-or-_id> /path/to/report.pdf --confirm |
| Add DOI stub (no metadata) | paperpile add <doi> --force |
| List labels | paperpile label list |
| Create label | paperpile label create "My Label" |
| Apply label | paperpile label apply "My Label" Smith2024-ab |
| Remove label | paperpile label remove "My Label" Smith2024-ab |
| Delete label | paperpile label delete "My Label" --confirm |
| Trash item | paperpile trash Smith2024-ab --confirm |
| Restore from trash | paperpile trash Smith2024-ab --restore --confirm |
| Edit metadata | paperpile edit Smith2024-ab --title "..." --author "..." --year 2024 --confirm |
Key behaviors:
add auto-detects input type:
10.xxx) -- lookup metadata via Guru, create entryhttps://...) -- create entry with url:[] field (no --force needed)https://.../*.pdf) -- download PDF, copy to Google Drive, attach to entry/path/to/*.pdf) -- copy to Google Drive sync folder, create entry with PDF attached--title, --author, --year, --pubtype for metadata--force only needed for DOIs when Guru metadata is unavailableedit updates metadata fields on existing items via sync API. Dry-run by default -- pass --confirm to apply.fetch resolves a bibkey to PDF via Paperpile API + Google Drive download.search scores against a local index cache. Run paperpile index first.trash and label delete are dry-run by default -- pass --confirm to execute.One command: citation string → paper in Paperpile with PDF.
paperpile find-and-add "<citation>" [--doi DOI] [--ssrn ID] [--title T] [--author A] [--year Y] [--journal J] [--volume V] [--page P] [--json] [--no-pdf]
# Law review article (HeinOnline)
paperpile find-and-add "Robertson, Passive in Name Only, 36 Yale J. on Reg. 795 (2019)"
# SSRN working paper
paperpile find-and-add --ssrn 5093097
# Paper with known DOI
paperpile find-and-add --doi 10.1016/j.jfineco.2024.01.001
# Multi-author law review
paperpile find-and-add "Montagnes, Peskowitz and Sridharan, How Well Do Voting Choice Policies Represent Public and Investor Preferences, SSRN 5093097 (2024)"
pdf_url preprint/publisher download (pure HTTP)filetype:pdf search via CDP (final fallback)~/Google Drive/.../Paperpile/All Papers/<Letter>/)UCLA L. Rev., Yale J. on Reg., Yale L.J., Harv. L. Rev., Stan. L. Rev., Colum. L. Rev., Mich. L. Rev., Va. L. Rev., U. Pa. L. Rev., N.Y.U. L. Rev., Chi. L. Rev., Geo. L.J., Duke L.J., Cornell L. Rev., Nw. U. L. Rev., Tex. L. Rev., B.U. L. Rev., and more (see heinonline.ts in paperpile-cli).
shibidp.its.virginia.edu) are now snapshotted -- EZproxy re-auth is transparent across browser restartsUpdate title, author, year, and other fields on existing library items.
paperpile edit <bibkey-or-_id> --title "..." --author "..." --year 2024 [--confirm]
Supported flags: --title, --author, --year, --journal, --volume, --issue, --pages, --abstract, --url, --doi, --publisher, --language, --pubtype, --citekey
# Edit title and year (dry-run)
paperpile edit Smith2024-ab --title "New Title" --year 2025
# Apply the edit
paperpile edit Smith2024-ab --title "New Title" --year 2025 --confirm
# Institutional author (& treated as single author)
paperpile edit abc123 --author "Davis Polk & Wardwell" --confirm
# Multiple personal authors (comma-separated "First Last" pairs)
paperpile edit abc123 --author "Jack Pitcher, Emily Glazer" --confirm
# Set a DOI (e.g. after a PDF-first add mangled the metadata)
paperpile edit abc123 --doi "10.1111/jofi.12422" --confirm
# SSRN working paper: real DOI is 10.2139/ssrn.<abstract_id> + the abstract URL
paperpile edit abc123 --doi "10.2139/ssrn.666962" \
--url "https://papers.ssrn.com/sol3/papers.cfm?abstract_id=666962" --confirm
Fixing PDF-first metadata damage: paperpile add <local.pdf> lets Paperpile's
server-side PDF-text extractor populate metadata, which often drops co-authors,
blanks the year, or duplicates the title. Prefer DOI-first adds. To repair an
existing entry, set the correct DOI and repopulate authoritatively from Paperpile's
own Guru resolver rather than hand-typing every field. SSRN papers do have real
DOIs (10.2139/ssrn.<abstract_id>), but they resolve to preprint metadata — safe
for genuine working papers, but don't attach them to a version that was later
published (it regresses the journal/volume/page citation).
Key behaviors:
--confirm to mutate._id via the local index (same as trash).action: "update" to patch fields.& are treated as institutional (single author). Comma-separated "First Last" pairs are split into multiple personal authors.| Need | Command |
|---|---|
| Poll for PDF attachment | ${CLAUDE_SKILL_DIR}/scripts/poll_attachment.sh <item_id> |
| Warm up proxy session | ${CLAUDE_SKILL_DIR}/scripts/warmup.sh [CDP_PORT] |
| Refresh Paperpile auth | ${CLAUDE_SKILL_DIR}/scripts/refresh-auth.sh [CDP_PORT] |
| Resolve a DOI to a PDF | ${CLAUDE_SKILL_DIR}/scripts/resolve_pdf.py --doi <DOI> --out <DIR> --via-browser |
| Fetch the PUBLISHED version, not the library copy | ${CLAUDE_SKILL_DIR}/scripts/resolve_pdf.py <BIBKEY> --skip-paperpile --via-browser |
--skip-paperpile bypasses BOTH Paperpile steps (paperpile-api and the synced paperpile dir)
and goes straight to the institutional chain. Use it whenever the goal is the version of record:
the library's own copy is often the SSRN preprint being replaced, and it short-circuits the chain
before any publisher is tried.
Both Paperpile steps are gated on a title-similarity floor of 0.75 (difflib.SequenceMatcher
over normalised lowercase titles) against the bib entry's title. A first-author collision on an
unrelated paper logs best match '<title>' scored <x> < 0.75 and falls through to the next
resolver instead of returning a wrong-title PDF.
warmup.sh auto-clicks the NetBadge cert login via CDP. Runs every 25 min via launchd (com.paperpile.warmup.plist).
resolve_pdf.py and warmup.sh both resolve the port at runtime, taking the first that answers
GET http://127.0.0.1:<port>/json/version:
--cdp-port N (resolve_pdf.py) or the first positional argument (warmup.sh)$PAPERPILE_CDP_PORT~/.config/chrome-cdp)Nothing is hardcoded to 9250 any more: when the automation profile is down, the everyday browser is used, and it is usually the one already logged into NetBadge and Paperpile. Failure messages name the ports actually tried.
--via-browser is the flag that turns on CDP driving in resolve_pdf.py. --via-dia still works
as a deprecated, hidden alias for old callers; do not write it in new commands.
If the /fetch-paper skill is available (lives in dotfiles, not this plugin), prefer it
for downloading paywalled PDFs. It uses a WRDS SOCKS tunnel to present a Penn IP — which
is registered with publishers for IP-based access — and bypasses EZproxy entirely.
Check availability:
which wrds-tunnel && which fetch-paper-browser && echo "fetch-paper available" || echo "fetch-paper not available — falling back to EZproxy/CDP"
If available: use /fetch-paper for PDF acquisition, then attach the result:
paperpile attach <_id> <local.pdf> --confirm.
Do NOT add the PDF — that creates a SECOND entry and lets the server's PDF-text extractor
write the metadata (see the damage note above).paperpile add <local.pdf>.
If not available: use the EZproxy/CDP pipeline in find-and-add as before.See ${CLAUDE_SKILL_DIR}/references/institutional_access.md for technical details.
fetch-paper (dotfiles) → download PDF via WRDS SOCKS
Paperpile (this skill) → cite-check (upload PDFs to Gemini)
→ nlm (upload to NotebookLM)
~/.claude-work/skills/paperpile/cookies/<domain>.json~/.claude-work/skills/paperpile/cache/paperpile-index.json~/Library/CloudStorage/[email protected]/My Drive/resources/Paperpile/All Papers/${CLAUDE_SKILL_DIR}/scripts/refresh-auth.sh — it extracts the live cookies from the
logged-in browser via CDP (:9222 by default; pass a port argument to override) and paperpile auth imports
them (no Cookie-Editor export). Requires being logged into Paperpile in that browser; if not, log
in there first.| Action | Why Wrong | Do Instead |
|---|---|---|
| About to drive the Paperpile web app (app.paperpile.com) via browser automation — CDP clicks, the Add → "Paste references" dialog, filling React forms | The paperpile CLI does every library op over HTTP. The web UI is slower and its React forms silently reject synthetic input (you'll wrestle a textarea that never registers). This is the #1 trap — reaching for the browser when a one-word CLI command exists. | Use the CLI (paperpile add <doi|url|pdf>). If it errors on auth, run scripts/refresh-auth.sh, then retry. |
Using --force without user approval | Adds DOI stubs without metadata -- clutters library | Ask user before adding DOIs without Guru data. URLs and PDFs don't need --force |
Running trash --confirm without showing dry run | Destructive, cannot be undone | Run without --confirm first |
Skipping paperpile index before search | Stale results from cached index | Run paperpile index --refresh first |
| Calling Paperpile API directly | Skips auth, cookies, error handling | Always use the CLI |
Using curl to fetch a DOI URL | Publisher returns HTML paywall, not PDF | Use paperpile find-and-add --doi |
| Running find-and-add with no browser on CDP | CDP PDF fallbacks will fail | Check both ports: curl -sf http://127.0.0.1:9250/json/version || curl -sf http://127.0.0.1:9222/json/version. Either one is enough — the resolver takes the first that answers. |
references/institutional_access.md (opens in a new tab)references/proxy_urls.md (opens in a new tab)scripts/paperpile_scripts_test.py (opens in a new tab)scripts/poll_attachment.sh (opens in a new tab)scripts/refresh-auth.sh (opens in a new tab)scripts/resolve_pdf.py (opens in a new tab)scripts/resolve_pdf_test.py (opens in a new tab)scripts/warmup.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Claude Code refuses to install this plugin
As a github or url source: Failed to clone repository: fatal: clone of '[email protected]:edwinhu/bmll-skill.git' into submodule path 'skills/bmll' failed
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
86 skills in this plugin
/afkUse when the user says '/afk', 'afk', 'going to bed', 'I'm going to sleep', 'work autonomously', 'work on this overnight', 'don't ask me questions', 'while I'm away', or 'do whatever you think is best'. NOT for questions about overnight returns, rates or anything financial; NOT for asking how the mode works./ai-anti-patternsALWAYS load before finalizing ANY written prose, and whenever text is suspected of being machine-written - "does this sound like AI", "make this sound human", "clean up the AI-isms", "did a bot write this", "check this draft before I send it", "review this for AI tells", "this reads like ChatGPT", "review this for mannered prose", "is this too writerly", "is this student paper AI-generated", or before handing back any draft, memo, email, or article you wrote. Use proactively even if the user never mentions AI writing./batch-routerUse when the user says 'bulk LLM job', 'batch job', 'submit a batch job', 'run this prompt over all the documents', 'process thousands of PDFs', 'extract fields from every filing', 'code each filing', 'label / annotate these documents', 'hand-code these', 'have agents read each document', 'which batch provider', 'cheapest way to run this over N rows', 'spend my API credits', 'Claude or OpenAI or Gemini for this batch', or needs any per-row LLM extraction, classification or enrichment over many inputs./bib-manageALWAYS use when a manuscript's BIBLIOGRAPHY is the thing being fixed, or when a cite's PDF turns out to be wrong — 'link my bib entries to the PDFs', 'which sources am I missing a PDF for', 'audit my sources.bib', 'my bib entry has no file field', 'fetch the Federal Register PDFs', 'why can't pincite find this source'. WRONG FILE: 'is this PDF the published version or the preprint', 'this PDF is a book review, not the book', 'the file field points at the wrong paper', 'the PDF doesn't match the citation'. METADATA: 'reconcile my bib against Paperpile', 'these entries were extracted by a model, check them', 'fix the metadata in sources.bib', 'my bib has no DOIs and the fields look wrong', 'pull the real author/journal/volume from my library', 'where did this bib entry's metadata come from'. PAGE RANGES: 'does my bib have page ranges', 'my bib only has start pages', 'backfill the page ranges', 'pull the pages from the DOI', 'add DOIs to my bibliography'. Use proactively before any pincite run — pincite resolves footnotes through `file = {...}` and silently skips entries that lack one. NEGATIVE ROUTING: the page number inside a footnote is pincite, but whether that footnote's PDF is the version of record or the wrong document is THIS skill, mid-pincite-run included; whether a cited source says what the footnote claims is source-verify; Bluebook FORM is bluebook or bluebook-audit; finding or downloading a paper is fetch-paper or paperpile./blaw-edgar-searchUse when the user wants to search SEC filings or exhibits on Bloomberg Law — 'search EDGAR on Bloomberg Law', 'BLAW EDGAR search', 'find exhibits with this clause', 'which 8-Ks attach a consulting agreement', 'pull the Bloomberg Law results list', 'capture the BLAW results' — or needs exhibit-level phrase search with proximity operators that the SEC and WRDS full-text routes handle badly./bluebookALWAYS use for ANY legal citation question, even if the user never says 'Bluebook' - 'cite this case', 'how do I cite a statute', 'is this footnote formatted right', 'id. or supra here', 'cite a law review article', 'what signal goes here', 'format these footnotes', 'short form for this cite', 'block quote this', 'where does the ellipsis go', 'is this quote altered right', or writing or checking any citation or quotation in a legal manuscript. NOT for auditing a whole manuscript's footnotes (use bluebook-audit) and NOT for rendering these rules in Typst (use docx-typst).Other plugins' skills for the same job