QQnote-skill/SKILL.md

6.5 KiB

name: zotero-obsidian-literature description: Manage the user's Zotero-to-Obsidian literature workflow: batch-generate Zotero child-note AI literature notes from Obsidian templates, audit missing Zotero notes, clean empty Obsidian literature notes, create and refine Dataview literature dashboards, preserve Obsidian Markdown conventions, and package or back up the workflow skill without exposing API keys. Use when the user asks about Zotero AI notes, AwesomeGPT/DeepSeek literature notes, Obsidian literature-note cleanup, Dataview literature dashboards, Zotero note audit/resume, or upgrading this Zotero-Obsidian workflow.

Zotero Obsidian Literature

Use this skill for the user's Zotero + Obsidian literature workflow. It covers Zotero child-note generation, deterministic audits, Obsidian literature-note maintenance, Dataview dashboards, and safe packaging/backups.

Core scripts:

py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\init_private_config.py"
py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\generate_zotero_ai_note.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --item-key SXAIQUJT --skip-existing
py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\audit_zotero_ai_notes.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --keys-only

Requirements

  • Zotero Desktop must be open and Local API enabled at http://127.0.0.1:23119.
  • The vault default is C:\Users\qyh15\Documents\Obsidian Vault.
  • The vault must contain 00 Templater with:
    • 01 ...md research-article template
    • 02 ...md review-article template
    • 03 ...md AI prompt
  • ZOTERO_API_KEY must be available for Zotero Web API writes.
  • LLM settings come from AWESOMEGPT_API_KEY, AWESOMEGPT_BASE_URL, AWESOMEGPT_MODEL, the private local config, or AwesomeGPT preferences in the default Zotero profile.

Never store API keys in SKILL.md, references, committed files, zip files, terminal output, or chat. If keys appear in chat or logs, tell the user to rotate them.

Private Config

Use a local-only config for Zotero and DeepSeek/AwesomeGPT keys. The committed template is config/config.template.json; the real file is config/config.local.json, which is ignored by Git.

Initialize or update it with hidden prompts:

py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\init_private_config.py"

Do not print the config contents. When checking setup, report only whether each key is present. Environment variables override the private config; the private config overrides AwesomeGPT preferences for fields that are present.

Zotero Note Workflows

Single item

py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\generate_zotero_ai_note.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --item-key SXAIQUJT --skip-existing

Multiple items

py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\generate_zotero_ai_note.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --item-keys "SXAIQUJT X7GJZ627 ZCZXGRAM" --limit 0 --skip-existing --fulltext-chars 4000

Whole library

Use only after the user explicitly approves library-wide writes.

py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\generate_zotero_ai_note.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --all --limit 0 --skip-existing --fulltext-chars 4000

For long runs, prefer 20-30 item batches. If a run times out, rerun with --skip-existing; the script resumes by checking child notes for the source Zotero item link.

Missing generated notes

Do this deterministically; do not ask DeepSeek or another LLM to compare library state.

py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\audit_zotero_ai_notes.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --rebuild
py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\audit_zotero_ai_notes.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --keys-only

The cache lives at <vault>\00 Templater\.zotero-ai-notes-index.json. Use --refresh or --rebuild when notes were edited outside this workflow.

Obsidian Workflows

Read references/obsidian-integration.md before changing template handling, adding vault-facing files, or generating Markdown meant to round-trip through Obsidian.

Read references/obsidian-literature-maintenance.md before cleaning empty notes, creating Dataview dashboards, adding CSS snippets, or changing the 01 文献阅读 organization.

Default vault organization:

  • 00 Templater: source templates, prompts, and the hidden Zotero audit cache.
  • 01 文献阅读/00 AI总结笔记: Obsidian-exported/generated literature notes.
  • 01 文献阅读/01 Dataview文献看板: Dataview dashboards for journal, year, actuator, review, DOI, and material/keyword views.
  • .obsidian/snippets/literature-dataview.css: optional CSS snippet for compact Dataview tables.

Operating Rules

  • For live Zotero writes, state that Zotero child notes will be created.
  • Use --dry-run for first-time validation or template changes.
  • Use --fulltext-chars 4000 for cheap, lightweight notes; increase only when the user asks for deeper notes.
  • Do not add visible machine markers to note bodies. Use the Zotero item link for duplicate detection.
  • Do not delete Zotero duplicate notes unless the user explicitly requests cleanup.
  • For Obsidian cleanup, delete only files that are empty after removing frontmatter, separators, whitespace, and empty HTML placeholders.
  • Keep Dataview dashboards readable: avoid GROUP BY tables that put long rows.file.link lists inside one cell; prefer count summaries plus separate one-row-per-paper detail tables.
  • Reserve DeepSeek for generating or improving note content, not deterministic library comparison or file cleanup.
  • If PowerShell/cmd output has Unicode issues, set PYTHONIOENCODING=utf-8 or rely on script UTF-8 reconfiguration.
  • If PDF full text is unavailable, allow fallback to metadata, abstract, BibTeX, and optional local PDF extraction if a Python PDF library exists.

Upgrade Points

Read references/upgrade-plan.md before changing behavior, adding cleanup, adding collection targeting, improving note quality, or adding Gitea/GitHub backup steps.

Read references/upstream-obsidian-skills.md before pulling in more ideas from kepano/obsidian-skills.