118 lines
7.1 KiB
Markdown
118 lines
7.1 KiB
Markdown
---
|
|
name: MYwrite
|
|
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 MYwrite, Zotero AI notes, AwesomeGPT/DeepSeek literature notes, Obsidian literature-note cleanup, Dataview literature dashboards, Zotero note audit/resume, or upgrading this Zotero-Obsidian workflow.
|
|
---
|
|
|
|
# MYwrite
|
|
|
|
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:
|
|
|
|
```powershell
|
|
py "$env:USERPROFILE\.codex\skills\MYwrite\scripts\init_private_config.py"
|
|
py "$env:USERPROFILE\.codex\skills\MYwrite\scripts\generate_zotero_ai_note.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --item-key SXAIQUJT --skip-existing
|
|
py "$env:USERPROFILE\.codex\skills\MYwrite\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:
|
|
|
|
```powershell
|
|
py "$env:USERPROFILE\.codex\skills\MYwrite\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
|
|
|
|
```powershell
|
|
py "$env:USERPROFILE\.codex\skills\MYwrite\scripts\generate_zotero_ai_note.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --item-key SXAIQUJT --skip-existing
|
|
```
|
|
|
|
### Deep full-detail item
|
|
|
|
Use this when the user asks for `满血版本`, `详细版`, `深度精读`, or says the batch note is not as detailed as manually generated AwesomeGPT notes. When regenerating, prefer `--replace-existing` so the existing AI child note is updated instead of creating duplicate Zotero child notes.
|
|
|
|
```powershell
|
|
py "$env:USERPROFILE\.codex\skills\MYwrite\scripts\generate_zotero_ai_note.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --item-key SXAIQUJT --mode deep --fulltext-chars 80000 --max-tokens 12000 --replace-existing
|
|
```
|
|
|
|
### Multiple items
|
|
|
|
```powershell
|
|
py "$env:USERPROFILE\.codex\skills\MYwrite\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.
|
|
|
|
```powershell
|
|
py "$env:USERPROFILE\.codex\skills\MYwrite\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.
|
|
|
|
```powershell
|
|
py "$env:USERPROFILE\.codex\skills\MYwrite\scripts\audit_zotero_ai_notes.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --rebuild
|
|
py "$env:USERPROFILE\.codex\skills\MYwrite\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](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](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.
|
|
- For regenerating notes, use `--replace-existing` by default; do not create duplicate child notes unless the user explicitly asks for a new comparison copy.
|
|
- Use `--dry-run` for first-time validation or template changes.
|
|
- Use `--fulltext-chars 4000` for cheap, lightweight notes; use `--mode deep --fulltext-chars 80000 --max-tokens 12000` when the user asks for a full-detail note.
|
|
- 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](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](references/upstream-obsidian-skills.md) before pulling in more ideas from `kepano/obsidian-skills`.
|