QQsci-skill/references/zotero-obsidian-subskill.md

91 lines
3.2 KiB
Markdown

# Zotero-Obsidian Literature Note Subskill
Use this file when the user asks to use the previous Zotero/Obsidian workflow,
generate notes for newly imported papers, batch-process papers with DeepSeek, or
link generated notes into Obsidian.
## Core order
1. Zotero first: identify target items and generate/update Zotero child notes.
2. Obsidian second: link Zotero notes into the vault through Zotero Integration
and Dataview.
3. Manuscript third: use screened notes to rewrite positioning, introduction,
comparison, discussion, and citation placement.
Do not default to creating standalone Obsidian markdown notes when the user says
`文献笔记`; the default target is Zotero child notes.
## Safety and config
- Do not ask the user to paste API keys into chat.
- Load secrets from environment variables, then `config/config.local.json`, then
the local AwesomeGPT/Zotero profile if available.
- Keep `config/config.local.json` ignored and local-only.
- Do not print secret-bearing config or preference lines.
- Treat Zotero local API at `127.0.0.1:23119` as read-oriented.
- For child-note writes, require a configured write path: Zotero Web API,
connector helper, or an existing local helper script.
## Preflight
Before writing notes:
1. Check Zotero is running and the local/connector route is available.
2. Confirm the target collection, selected items, tags, or explicit item keys.
3. Check whether notes already exist and skip or update according to the user's
instruction.
4. Confirm the write route for Zotero child notes.
5. Confirm the DeepSeek/AwesomeGPT config is available without exposing secrets.
## Batch behavior
Batch work must be resumable:
- write a manifest with Zotero item key, title, DOI, note status, timestamp,
and error
- skip items with successful existing notes unless the user asks to regenerate
- process in batches, not one broad unbounded run
- preserve UTF-8 output for Chinese templates and notes
## New paper flow
When the user says they introduced new papers:
1. Identify new Zotero items by collection, tag, selected items, import time, or
explicit keys.
2. For each item, gather metadata, abstract, attachment text if available, and
existing child notes.
3. Send the note-generation prompt to DeepSeek/AwesomeGPT using the user's
template.
4. Create or update the Zotero child note.
5. Refresh or instruct Obsidian Zotero Integration linking only after Zotero
notes are created.
6. Update the manifest and report successes, skips, and failures.
## Manuscript integration flow
After notes exist:
1. Extract manuscript keyword pack.
2. Use `literature-routing.md` to classify strong and weak papers.
3. Build a source map linking paper -> useful claim -> manuscript section.
4. For Word citation help, add native Word comments containing DOI strings only,
one DOI per line.
5. Rewrite the manuscript section with citation placeholders only if the user is
not using the DOI-comment workflow.
6. Flag missing evidence, missing citations, and overclaim risks.
## Output template
`Preflight:`
`Processed Zotero items:`
`Generated or updated child notes:`
`Skipped existing notes:`
`Failed items and reason:`
`Next manuscript-use step:`