科研 Skill
单篇文献入库管理
add-to-library
Adds one verified PDF to a shared bibliography library, computing its citation key and keywords. Use to register a single document outside the full workflow.
SKILL.md
Boundary: where this sits
add-to-library is the direct-to-library route, deliberately outside the project pipeline:
ingest-sourcereads an acquired source into a project's wiki (source page + entities + a project-local BibTeX entry) with a full read. It is project-scoped.acquire-sourcesdownloads the PDFs aliterature-reviewguide lists.add-to-librarytakes one PDF you already have and adds it to the shared master so it surfaces inbib-search.pyfor every future project — no wiki content, no full read. Later, if a project actually cites it,ingest-sourcereads it as usual; the master entry is already there.
Use it when a colleague sends a PDF, or you download one, and you want it in the collection now without ingesting it.
Add a document directly to the master library
Announce at start: "Using add-to-library to add <pdf> to the shared master library — I'll verify the metadata before writing anything."
The deterministic mechanics (compute the bibkey, place the PDF, append the entry) live in scripts/add-to-library.py. Your job is the judgement the script cannot do: verify the metadata against a real record, and curate the keywords. Never let the script mint a key from data you have not verified.
If a condition is unmet: name it, ask for a one-line reason, write it to knowledge/_meta/gate-overrides.log, and close. Exception — never soft-gate past (1): if the metadata cannot be verified, do not write; stop and ask.
(1) is enforced by the script, not by your resolve. add-to-library.py commit refuses without --doi unless you pass --unverified-reason "…", and that reason is written into the entry's note field as UNVERIFIED: … — visible to everyone who ever reads that record, in every project. You cannot write an unverified entry silently.
Checklist
Create a task-list item for each:
-
Resolve the library.
python scripts/add-to-library.py inspect <pdf>resolves it viascripts/library.py. If it reports the library is not configured, that is the machine-local.research-libraryproblem — surface the message, do not proceed. -
Inspect the PDF (cheap).
python scripts/add-to-library.py inspect <pdf> --jsonReturns docinfo (
Title/Author/Keywords/Subject), the first-page text (where the abstract lives), any DOI printed on the front pages, andhas_text_layer. ⛔ Stop-and-ask ifhas_text_layeris false and no DOI was found: a scan with no verifiable identifier cannot be added cheaply — OCR it first, or add it viaingest-source. -
Discover and VERIFY the metadata (this is the load-bearing step). Prefer the
dao-paper-search-mcp(seedocs/recommended-mcps.md); fall back to a manual Crossref lookup if it is absent.- With a DOI (from step 2 or the
doiinput):
or manually:dao-paper-search-mcp.search_crossref(query=<doi>) → exactly one hit; check that its identifiers.doi IS <doi> (a DOI query is a direct lookup from dao-paper-search-mcp 1.2.0; older versions search and can return a different work) → hit.inline_citation.authoritative_bibliography_line (verbatim)curl -s https://api.crossref.org/works/<doi>. - Without a DOI: search
search_crossref/search_openalexby the title + author from docinfo, and require a confident single match. - Cross-check the record against the PDF — title, first author, year must match the docinfo and first page. A DOI can resolve to the wrong record; a title search can return a namesake.
- ⛔ Stop-and-ask on any mismatch, low confidence, or no confident match after the manual fallback. Never guess bibliographic data (the project's hard rule). Present the candidate(s) and ask.
- Choose the entry type:
article,incollection(book chapter — use--booktitle),book,inproceedings, … Chapter-vs-whole-book is a judgement; if the record is ambiguous, ask.
- With a DOI (from step 2 or the
-
Derive keywords cheaply. From the docinfo
Keywords/Subjectfields (often empty or boilerplate — treat as hints) plus the first-page abstract text from step 2, curate 3–8 terms: the canonical name plus known synonyms and aliases across spellings and disciplines (the same discipline asdrafting-manuscript's "Searching for a concept, not a string"). No full read. Thin keywords are acceptable — they accrete later atingest-sourcetime. Never let weak keywords justify skipping step 3.Where the value sits: the abstract's own vocabulary is already in the full-text index — a later rank-fused alias search (
bib-search.py --q, the ranking arm) will match those words with or without you. What only this step can add is the recall arm: terms the abstract does not use — the other disciplines' names, the spelling the field you come from doesn't — because fusion re-ranks what some alias literally matches and adds zero recall. One alias the abstract omits is worth more than three it repeats. -
Choose the kurztitel. One to three significant title words — a judgement, not the first three words of the title ("The Low Chronology and the Problem of…" →
low chronology, notlow-chronology-problem).add-to-library.pyproposes one vialibrary.propose_shorttitle; refine it. -
Commit — dry-run first, then write.
python scripts/add-to-library.py commit --pdf <pdf> \ --author "<first author, as in BibTeX>" --year <YYYY> --title "<full title>" \ --etype <type> --kurztitel "<chosen>" \ [--journal … --booktitle … --pages … --volume … --number … --doi … --url …] \ --keywords "term one; term two; term three"Review the proposed bibkey and, if it reports a disambiguation letter (
mazar-2011b-iron-age), confirm the new document is genuinely a different work from the existingmazar-2011-…before writing. Then re-run with--write. The commit step:- computes the bibkey from your verified fields (refuses, rather than inventing, if a slot is empty);
- if the work is already in the library (matched by DOI), unions your keywords into the existing entry instead of duplicating the key;
- places the PDF (refuses to overwrite a different file at the target path without
--force); - appends the entry to
<library>/references.bib.
-
Re-index so the source is immediately searchable:
python scripts/bib-search.py indexThen close the loop with the search a later drafter would run — canonical name plus your aliases, rank-fused:
python scripts/bib-search.py '"<canonical name>"' --q '<alias>' --key <bibkey>The keyword hit should print first (ahead of any page hit,
page: null). If nothing comes back, the entry is invisible to exactly the query it exists for — fix the keywords now, while the abstract is still in front of you. -
Log. Append one line to
knowledge/_meta/log.md:- YYYY-MM-DD · add-to-library · <bibkey> · verified via <crossref|openalex> -
Soft-gate (above) and report: the bibkey, where the PDF landed, the keywords written.
BibTeX & keyword convention
Same as ingest-source's BibTeX Entry Convention. keywords is semicolon-separated, 3–8 terms, canonical name plus synonyms/aliases — it is what bib-search.py matches when a source describes a method in prose without naming it; the rank-fused --q alias search changes ranking only, never recall, so this field is the sole non-text-derived path into a search result (see ingest-source's keyword step for the full division of labour). The bibkey is autor-jahr-kurztitel, all lowercase ASCII (umlauts → ae/oe/ue, ß → ss; Turkish ı → i, Polish ł → l; particles/spaces removed), letter suffix after the year for a genuine clash. bibkey == PDF filename stem is the cross-project join key — the script enforces the shape.
Red flags
| Tempting shortcut | Why it's wrong |
|---|---|
| "The docinfo Title is the citation — use it." | Docinfo is frequently wrong, stale, or a template placeholder. Verify against Crossref/OpenAlex (step 3). |
| "curl returned 200, so the DOI is right." | A 200 only means the DOI resolves. Check the returned record matches the PDF's title/author/year. |
| "No DOI, but I'll infer the year from the filename." | That is guessing bibliographic data. Stop and ask (step 3). |
| "The keywords look thin, so I'll skip verification and just file it." | Keywords are never a reason to skip step 3. Verification gates the write; keywords do not. |
"The abstract names the method — --q fusion will find this entry, keywords are redundant." | The abstract's words are in the index either way; fusion only re-ranks what an alias literally matches. Keywords earn their keep as the aliases the abstract does not use — and without a full read, nobody has recorded those yet. |
| "The base bibkey already exists — I'll just overwrite it." | If it's the same work, keywords union in automatically. If it's different, take the disambiguation letter. Never overwrite a live key. |
示例提示词
帮我把这篇PDF加入共享文献库,核实元数据并生成规范的文件名。
所属插件
安装该插件会一并获得同领域的 62 个 Skill / MCP。
同插件的其他科研 Skill
- 学术文献获取下载Auto-downloads open-access PDFs for graded sources and writes a manual worklist for paywalled items. Use after literature-review, before ingest-source.
- 数字人文计算方法Surveys computational DH methods: text mining, NLP, corpus linguistics, archive standards, GIS, network analysis, and OCR. Use for an overview of available DH tools.
- 考古地理信息系统分析Runs archaeological GIS analysis with GeoPandas: catchment analysis, viewshed, kernel density, spatial statistics. Use for mapping archaeological site locations.
- 论证结构提取可视化Extracts and visualizes argument structure: Toulmin reconstruction, support/attack graphs, circularity detection. Use to diagram an argument’s logical structure.
- 考古遗物类型学分析Performs artifact analysis: typological classification, ceramic attribute coding, lithic reduction analysis. Use when classifying excavated artifacts statistically.
- 引文与出处核查Checks citations, quotations, page numbers, and bibliography entries for accuracy and source fit. Use before submission to verify source-supported claims.
- 研究选题构思设计Explores research intent, field state, methodology, and ethics, then writes an approved design doc. Use before starting a new research question or chapter.
- 术语译名一致性检查Audits a manuscript for terms, translations, abbreviations, and names whose forms must stay stable. Use when terminology drift could undermine an argument.
- 计算语用学分析Runs computational pragmatics: speech act classification, implicature detection, discourse coherence, politeness analysis. Use for language-use-and-meaning studies.
- 文献综述学术对话构建Turns verified sources into a structured scholarly conversation among positions, not a chronological summary. Use when synthesizing literature into a debate narrative.
- 语料库语言学分析Performs corpus analysis with NLTK/spaCy: collocation, keyword analysis, KWIC concordance, word2vec, diachronic trends. Use for quantitative text-corpus research.
- 数字档案馆资源检索Queries digital archive REST APIs: Europeana, Chronicling America, Internet Archive, HathiTrust, DPLA, OAI-PMH. Use when searching or harvesting heritage metadata.
- 学术手稿章节撰写Drafts a chapter or article section by section from synthesized wiki content, agreeing each section’s argument first. Use to turn stable research synthesis into prose.
- 研究项目漂移状态检测Checks a shared source library and registered projects for drift: un-indexed PDFs, unmerged keywords, bibkey collisions. Use to audit a multi-project research setup.
- EMI课堂语料转写分析Segments and annotates classroom transcripts, coding language choice and discourse function with anonymised output. Use to quantify classroom talk or translanguaging.
- 人工智能伦理分析Analyzes AI ethics: algorithmic fairness metrics, bias auditing, value alignment, moral philosophy reasoning. Use to evaluate an AI system’s ethical dimensions.
- 研究计划任务执行Executes a ready research plan task by task, gating acquisition before ingest and dispatching analysis. Use after writing-research-plan to run the planned work.
- 研究项目结项清单Runs the final completion checklist: rendering, bibliography, wiki, data, reproducibility, archiving. Use when a manuscript is finalized and ready to publish.
- 形式逻辑自动推理Applies formal logic tools: Z3 SMT solver, modal logic S5, SAT encoding, Lean4 proof verification. Use to formalize or mechanically check a logical argument.
- 研究问题凝练构建Turns a broad topic or intuition into a precise, contestable, researchable question. Use at the start of a project when no defensible question yet exists.
- 历史地理信息系统分析Performs historical GIS work: georeferencing old maps, digitizing boundaries, temporal territory overlays, population interpolation. Use for historical spatial analysis.
- 历史语言学比较分析Analyzes historical linguistics in Python: sound correspondences, cognate detection, phylogenetic trees, Swadesh lists. Use when reconstructing language relationships.
- 历史社会网络分析Builds historical network analyses: correspondence networks, prosopography, temporal community detection, Gephi export. Use to map relationships among historical actors.
- 历史文献OCR识别Transcribes printed and handwritten historical documents with Tesseract/Kraken OCR, confidence filtering, spell correction. Use for digitizing scanned historical text.
常见问题
单篇文献入库管理能做什么?
Adds one verified PDF to a shared bibliography library, computing its citation key and keywords. Use to register a single document outside the full workflow。
如何安装单篇文献入库管理?
在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「单篇文献入库管理」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。
单篇文献入库管理需要哪些权限?
该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。
单篇文献入库管理经过官方审核吗?
是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。