一键导入
bip-lit
Unified guidance for using the bipartite reference library CLI. Use when searching for papers, managing the library, or exploring literature via S2/ASTA.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Unified guidance for using the bipartite reference library CLI. Use when searching for papers, managing the library, or exploring literature via S2/ASTA.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | bip-lit |
| description | Unified guidance for using the bipartite reference library CLI. Use when searching for papers, managing the library, or exploring literature via S2/ASTA. |
A CLI tool for managing academic references with local storage and external paper search.
Repository: Configured via nexus_path in ~/.config/bip/config.yml
Issues: https://github.com/matsen/bipartite/issues
ALWAYS search locally before using external APIs. NEVER call ASTA without explicit user permission.
When answering questions about papers, READ THE ACTUAL PAPER PDF. Do not rely on abstracts, S2 metadata, or ASTA when the paper is in the local library. Reach for the right reader for the job:
search_pdf_text to jump to the relevant pages, then read_pdf_text / read_pdf_page. MuPDF keeps reading order across columns and inline math intact, and the text is searchable. This is the default.Read with a narrow pages range. The built-in reader renders pages as images (token-heavy, not searchable), so use it only for the 1–3 pages that hold the visual you need — never the whole paper.The nexus library has ~6000 papers. Most relevant papers are already there.
Local search FIRST (always do this):
bip search -a "LastName" "keyword" --human
Always use --human — the default JSON output is verbose and easy to mis-scan.
If bip search fails (e.g., schema error), rebuild the database:
bip rebuild
Then retry the search.
If found locally, READ THE PAPER to answer the question:
bip get <id> --human # Get PDF path
Then use mcp__pdf-navigator__search_pdf_text (jump to the page) and mcp__pdf-navigator__read_pdf_text to find the answer directly in the paper. For a figure or equation you need to see, use the built-in Read tool on a narrow pages range instead. The PDF base path is /Users/matsen/Google Drive/My Drive/Paperpile.
Only if not found locally AND user confirms, use ASTA:
"I couldn't find that paper in the local library. Would you like me to search Semantic Scholar (ASTA)?"
DO NOT call bip asta, mcp__asta__*, or any external API without asking first.
DO NOT rely on abstracts or S2 metadata when you have access to the actual paper PDF.
When invoked with arguments like /bip-lit find <query> or /bip-lit <query>:
bip search "<query>" --humanWhen discussing papers, always look for opportunities to create concept nodes:
Suggest creating concepts when you notice:
| Task | Command |
|---|---|
| Search local library | bip search "query" --human (searches title, abstract, authors, notes) |
| Search by author | bip search -a "LastName" --human |
| Search by title | bip search -t "keywords" --human |
| Search by year | bip search --year 2024 --human |
| Search by note | bip search "AlphaSeq" --human (user notes from Paperpile are indexed) |
| Search by venue | bip search --venue "Nature" --human |
| Lookup by DOI | bip search --doi "10.1234/..." --human |
| Combined search | bip search "topic" -a "Author" --year 2020: --human |
| Semantic search | bip semantic "query" |
| Get paper details | bip get <id> |
| Export to BibTeX | bip export --bibtex <id>... |
| Append to .bib file | bip export --bibtex --append main.bib <id>... |
| Add paper to collection | bip s2 add DOI:10.1234/... |
| Find literature gaps | bip s2 gaps |
| Backfill missing PMCIDs from NCBI | bip ncbi backfill --dry-run |
| One-off PMCID lookup | bip ncbi pmcid DOI:10.1234/... |
| Fast paper search (external) | bip asta search "query" |
| Find text snippets | bip asta snippet "query" |
| Create concept | bip concept add <id> --name "Name" |
| Link paper to concept | bip edge add -s <paper> -t concept:<concept> -r <type> -m "summary" |
| Papers for concept | bip concept papers <concept-id> |
| Concepts for paper | bip paper concepts <paper-id> |
| Import projects from config | bip project import <file> |
| Import with concept edges | bip project import <file> --link-concepts |
Use --author and --year flags for precise filtering:
# Search by author (exact last name matching to avoid false positives)
bip search --author "Yu" --author "Bloom" # Last names only
bip search -a "Tim Yu" -a "Bloom" # First + last name
bip search -a "Yu, Timothy" # Last, First format
# Filter by year
bip search --year 2024 # exact year
bip search --year 2020:2024 # range (inclusive)
bip search --year 2022: # 2022 and later
bip search --year :2020 # 2020 and earlier
# Combine keyword + filters
bip search "deep mutational scanning" --author "Bloom" --year 2023:
Multiple authors use AND logic - all must appear in the paper.
Author matching rules:
-a "Yu") → exact last name match (won't match "Yujia")-a "Tim Yu") → exact last name + first name prefix-a "Yu, Tim") → same as aboveKeep queries short and specific - Long conceptual queries perform poorly:
"correlation between BME criterion and Felsenstein likelihood around correct tree""BME Felsenstein likelihood phylogeny" or "Bruno WEIGHBOR likelihood"Use --author flag instead of embedding names in query - Precise last name matching:
bip search -a "Yu" -a "Bloom" --year 2022: (exact last name match)bip search -a "Tim Yu" -a "Bloom" (first prefix + exact last name)bip search "Tim Yu Bloom" (keyword search is substring-based)Use specific method/algorithm names:
"WEIGHBOR", "FASTME", "neighbor joining" rather than general descriptionsFor finding a specific paper or result:
Local library first (fastest, already curated):
# Use flags for author/year filtering (most reliable)
bip search -a "AuthorName" --year 2020: --human
bip search "topic" -a "Author" --human
# Or plain keyword search (use -a for authors when possible)
bip search "distinctive title words" --human
bip semantic "conceptual description" # for topic-heavy queries
If found, read the paper to get authoritative answers:
bip get <id> --human # Get PDF path
# Then use pdf-navigator to search/read the PDF
External keyword search (only if not found locally, with permission):
bip asta search "AuthorName keyword1 keyword2" --limit 20 --human
Broaden if needed - remove author, try synonyms:
bip asta search "minimum evolution likelihood" --human
bip asta search "distance method maximum likelihood phylogeny" --human
Citation tracing - if you find a related paper, check what cites it:
bip asta citations DOI:10.xxxx/yyyy --limit 50 --human
MCP tools directly - for more control over fields and filters:
mcp__asta__search_papers_by_relevance with specific date ranges
mcp__asta__get_citations with publication_date_range filter
The bip asta snippet command can be slow and unreliable (timeouts are common). Alternatives:
mcp__asta__snippet_search directly with smaller limitsbip asta searchS2 and ASTA both access Semantic Scholar; NCBI is a separate ID-resolution service:
| Use Case | Command | Why |
|---|---|---|
| Add paper to collection | bip s2 add | Only S2 can modify local library |
| Find literature gaps | bip s2 gaps | Analyzes your collection |
| Explore without adding | bip asta * | Faster, read-only |
| Find text snippets in papers | bip asta snippet | Unique to ASTA |
| Fast paper search | bip asta search | 10x faster rate limit |
| Get citations/references | Either S2 or ASTA | ASTA is faster |
| Backfill PMCIDs (e.g., for NIH RPPR) | bip ncbi backfill | NCBI is the canonical source; S2/ASTA do not return PMCIDs reliably |
Rule of thumb: Use bip asta for exploration, bip s2 when you want to modify your library, bip ncbi for authoritative PMCID resolution. NCBI only knows PMCIDs for papers actually in PMC — absence is not a signal that the paper is missing.
See api-guide.md for detailed comparison.
Search local library first:
bip search "Schmidler phylogenetics" --human
# or for topic-heavy queries:
bip semantic "importance sampling MCMC"
Get PDF path for a result:
bip get <id> --human
# pdf_path field + "/Users/matsen/Google Drive/My Drive/Paperpile"
Read the actual paper to answer questions:
# Text: search to the relevant page (MuPDF — searchable, clean reading order)
mcp__pdf-navigator__search_pdf_text(file_path, "phage display")
mcp__pdf-navigator__read_pdf_text(file_path, 2, 3)
For a figure, panel, or rendered equation you need to see, use the
built-in Read tool on a narrow page range instead (it renders pages as
images — token-heavy, so read only the page(s) with the visual):
Read(file_path, pages="4")
Always prefer reading the paper over relying on abstracts or external metadata.
Only if not in library, search externally (with user permission):
bip asta search "phylogenetic inference"
ls -t ~/Downloads/Paperpile*.json | head -1
bip import --format paperpile "<path>"
bip rebuild
Search by topic:
bip asta search "variational inference phylogenetics" --limit 20
Find specific text passages:
bip asta snippet "Bayesian phylogenetic inference"
Trace citations:
bip asta citations DOI:10.1093/sysbio/syy032
bip asta references DOI:10.1093/sysbio/syy032
Add interesting papers to your collection:
bip s2 add DOI:10.1093/sysbio/syy032
See workflows.md for detailed workflow instructions.
All commands output JSON by default. Add --human for readable format:
bip asta search "phylogenetics" --human
bip s2 lookup DOI:10.1234/example --human
Both S2 and ASTA accept these identifier formats:
DOI:10.1093/sysbio/syy032ARXIV:2106.15928PMID:19872477CorpusId:215416146The reliable way to open an S2 paper page in Chrome is to resolve the
identifier to the 40-char paper ID, then open the website URL. The
https://api.semanticscholar.org/... redirect form is NOT reliable — Chrome
often gets a JSON/non-navigable response instead of the rendered page.
# From a DOI: resolve to paperId, then open the website page
doi="10.1093/sysbio/syy032"
pid=$(curl -s "https://api.semanticscholar.org/graph/v1/paper/DOI:$doi?fields=title" \
| sed -n 's/.*"paperId": *"\([^"]*\)".*/\1/p')
open -a "Google Chrome" "https://www.semanticscholar.org/paper/$pid"
# If you already have the 40-char SHA paper ID, open it directly:
open -a "Google Chrome" "https://www.semanticscholar.org/paper/<sha>"
Note: the bare https://www.semanticscholar.org/paper/CorpusID:... form does
NOT resolve (404s) — you must use the SHA paper ID. To resolve a CorpusId
instead of a DOI, swap DOI:$doi above for CorpusId:236964352.
Build a knowledge graph by creating concepts and linking papers to them.
# Add a concept with name, aliases, and description
bip concept add somatic-hypermutation \
--name "Somatic Hypermutation" \
--aliases "SHM,shm" \
--description "Process by which B cells diversify antibody genes"
# List all concepts
bip concept list --human
# Get a specific concept
bip concept get somatic-hypermutation --human
# Use flags: -s (source paper), -t (target concept with concept: prefix), -r (relationship type), -m (summary)
bip edge add -s Halpern1998-yc -t concept:mutation-selection-model -r introduces \
-m "Foundational paper defining the mutation-selection model"
bip edge add -s Yaari2013-dg -t concept:somatic-hypermutation -r models \
-m "Introduces S5F model for SHM targeting"
Note: Use concept: prefix for concept targets, project: for project targets.
| Type | When to Use |
|---|---|
introduces | Paper first presents or defines this concept |
applies | Paper uses concept as a tool or method |
models | Paper creates computational/mathematical model |
evaluates-with | Paper uses concept for evaluation/benchmarking |
critiques | Paper identifies limitations or problems |
extends | Paper builds upon or extends the concept |
# Find all papers linked to a concept
bip concept papers somatic-hypermutation --human
# Filter by relationship type
bip concept papers somatic-hypermutation --type introduces
# Find what concepts a paper relates to
bip paper concepts Halpern1998-yc --human
# Update a concept
bip concept update somatic-hypermutation --description "Updated description"
# Delete a concept (warns if papers linked)
bip concept delete unused-concept
# Force delete (removes linked edges too)
bip concept delete old-concept --force
# Merge duplicate concepts
bip concept merge shm somatic-hypermutation --human
bip asta snippet frequently times out with "context deadline exceeded". Workarounds:
--limit 5 instead of defaultmcp__asta__snippet_search with small limitbip asta search is more reliableIf searches return nothing relevant:
bip search "topic" --human # local
bip semantic "topic" # local semantic
bip asta search "topic" # external
If bip get <id> or bip asta paper <id> fails:
DOI:10.xxxx/yyyy (include prefix)bip asta search "exact paper title"If you see errors like no such column: pmid or similar schema mismatches:
bip rebuild
The SQLite database is ephemeral and rebuilt from the JSONL source of truth. Schema changes require deleting and rebuilding.
bip s2 commands are rate-limited to 1 req/secbip asta for bulk exploration (10 req/sec)Check remote server CPU, memory, and GPU availability via SSH
Cold-start into a worktree/clone from a fresh conversation — read the PR, issue, and any status files, figure out where things stand, then STOP and ask the user what to do next. Use for a fresh conversation dropped into a bip-spawn or bip-epic-spawn worktree/clone that already has history (a PR, an in-progress phase, or a stalled worker).
Quick poll of tracked EPICs and code repos for new manuscript-relevant results
Persist manuscript session state before context reset
Cold-start for a manuscript session — the paper is the source of truth and shared context; discuss results, orchestrate research through issues/PRs, and update the paper as threads complete
Spawn a Claude session in a clone for an EPIC issue