Validate and add a new journal to the tracking configuration. Use when the user says "add journal", "添加期刊", or asks to track a new journal.
When the user says "add journal", "添加期刊", or asks to track a new journal, execute this workflow.
The user provides:
If ISSN not provided, search CrossRef:
curl -s "https://api.crossref.org/journals?query={URL-encoded-journal-name}&rows=5"
Present matching journals (name, ISSN, publisher) and ask the user to confirm which one.
curl -s "https://api.crossref.org/journals/{ISSN}"
If not found, tell the user the ISSN is invalid.
curl -s "https://api.crossref.org/journals/{ISSN}/works?rows=3&sort=published&order=desc"
Check if the returned articles have abstract fields.
Show: journal name, publisher, ISSN, abstract availability. Ask user to confirm.
Read ~/.claude/skills/paper-rec/config.yaml.
Append to journals list:
- name: {full_journal_name}
full_name: {full_journal_name}
issn: "{ISSN}"
Write the updated config back.
Tell the user: "Added {journal_name} (ISSN: {ISSN}). Next /paper-grab will fetch articles from it."