paperpile
This skill should be used when the user asks to "add paper", "paperpile add", "fetch PDF for", "find and add", "search paperpile", "find in paperpile", "paperpile search", "label paper", "trash paper", "download paper", "paperpile index", "edit paper metadata", "update paper title", "fix paper author", "paperpile edit", "find PDF online", "search google for PDF", "resolve PDF", "fetch PDF for citation", "get full-text for DOI", "resolve cite to PDF", or any request to manage their Paperpile library or resolve a citation to a local PDF.
What this skill does
# Paperpile
Manage your Paperpile library and resolve citations to PDFs via the `paperpile` CLI.
## Prerequisites
- `paperpile` binary at `~/.local/bin/paperpile` (Bun-compiled from `~/projects/paperpile-cli`)
- Cookies imported via `paperpile auth import <path>` (exported from Cookie-Editor in JSON format)
- For PDF resolution: Chrome running with CDP on port 9250 (dedicated instance at `~/.config/chrome-cdp`)
## Library Management
| 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` |
| 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:
- **DOI** (`10.xxx`) -- lookup metadata via Guru, create entry
- **Web URL** (`https://...`) -- create entry with `url:[]` field (no `--force` needed)
- **Remote PDF URL** (`https://.../*.pdf`) -- download PDF, copy to Google Drive, attach to entry
- **Local PDF** (`/path/to/*.pdf`) -- copy to Google Drive sync folder, create entry with PDF attached
- All modes accept `--title`, `--author`, `--year`, `--pubtype` for metadata
- `--force` only needed for DOIs when Guru metadata is unavailable
- **`edit`** 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.
## Find and Add
**One command: citation string → paper in Paperpile with PDF.**
```bash
paperpile find-and-add "<citation>" [--doi DOI] [--ssrn ID] [--title T] [--author A] [--year Y] [--journal J] [--volume V] [--page P] [--json] [--no-pdf]
```
### Examples
```bash
# 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)"
```
### What it does
1. **Parse** citation string → extract author, title, journal, volume, page, year, DOI, SSRN ID
2. **Discover** metadata: Guru title search → CrossRef → OpenAlex (law reviews skip CrossRef — too many false positives)
3. **Dedup** against cached library index
4. **Add** to Paperpile via POST /api/library
5. **Get PDF** (automatic, no manual steps):
- Guru `pdf_url` preprint/publisher download (pure HTTP)
- HeinOnline via UVA EZproxy CDP (law reviews with volume/page/known journal)
- EZproxy/OpenAthens/SSRN via native CDP
- Google `filetype:pdf` search via CDP (final fallback)
6. **Copy** PDF to Paperpile Google Drive sync folder (`~/Google Drive/.../Paperpile/All Papers/<Letter>/`)
### Supported law review journals (HeinOnline)
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).
### Key design decisions
- **Law review citations** with volume+page+known journal handle skip CrossRef entirely (unreliable for HeinOnline-only journals) and construct metadata from parsed citation fields
- **Paperpile's PDF crawler runs in the browser extension**, not server-side -- neither POST /api/library nor POST /api/sync triggers it. PDF resolution is always active (CDP or HTTP).
- **Guru title search** works for finance/econ journals but returns 0 for law reviews (HeinOnline-only)
- **Shibboleth cookies** (`shibidp.its.virginia.edu`) are now snapshotted -- EZproxy re-auth is transparent across Dia restarts
## Edit Metadata
**Update title, author, year, and other fields on existing library items.**
```bash
paperpile edit <bibkey-or-_id> --title "..." --author "..." --year 2024 [--confirm]
```
Supported flags: `--title`, `--author`, `--year`, `--journal`, `--volume`, `--pages`, `--abstract`, `--url`
### Examples
```bash
# 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
```
**Key behaviors:**
- Dry-run by default -- shows what would change without applying. Pass `--confirm` to mutate.
- Resolves bibkeys to pub `_id` via the local index (same as trash).
- Uses POST /api/sync?v=3 with `action: "update"` to patch fields.
- Author strings with `&` are treated as institutional (single author). Comma-separated "First Last" pairs are split into multiple personal authors.
## Utilities
| 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` |
`warmup.sh` auto-clicks the NetBadge cert login via CDP. Runs every 25 min via launchd (`com.paperpile.warmup.plist`).
## WRDS SOCKS Tunnel (preferred for PDF acquisition)
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:**
```bash
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 `paperpile add <local.pdf>` to add to library.
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.
## Integration
```
fetch-paper (dotfiles) → download PDF via WRDS SOCKS
Paperpile (this skill) → cite-check (upload PDFs to Gemini)
→ nlm (upload to NotebookLM)
```
## Auth & Data
- Cookies: `~/.claude-work/skills/paperpile/cookies/<domain>.json`
- Cache: `~/.claude-work/skills/paperpile/cache/paperpile-index.json`
- Paperpile All Papers: `~/Library/CloudStorage/[email protected]/My Drive/resources/Paperpile/All Papers/`
- Re-import cookies when they expire (~30 days for Paperpile, ~8-12h for Shibboleth hard expiry)
## Red Flags -- STOP If You Catch Yourself:
| Action | Why Wrong | Do Instead |
|--------|-----------|------------|
| Using `--force` without user approval | Adds DOI stubRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.