EndnoteLink Skill
Converts a build_doc.py-generated manuscript .docx to EndNote-ready format.
Runs CrossRef metadata validation (retraction screening, author/year checks)
before converting. Outputs an _endnote.docx with {Author, Year #N} temp
citations and a .ris file for import into EndNote.
Triggers
Invoke when the user says any of:
- "endnote link", "endnote-link"
- "convert to endnote", "export to endnote"
- "endnote import", "prepare for endnote"
- "convert citations for endnote"
- "export citations", "reference manager export"
Prerequisites
build_doc.pyhas been run and a.docxexistsreferences/cite_map.jsonexists (auto-generated bybuild_doc.py)references/key_papers.bibis populated (by/literature:card)
If cite_map.json is missing: tell the user to run python3 build_doc.py
first — the template writes it automatically on every build.
Phase 1 — Locate project
Find:
build_doc.py— establishes project rootreferences/cite_map.json— requiredreferences/key_papers.bib— required- The
.docxto convert — default: most recently modified.docxin project root
# Confirm all three exist
ls {project_dir}/build_doc.py
ls {project_dir}/references/cite_map.json
ls {project_dir}/references/key_papers.bib
# Find the docx
ls -t {project_dir}/*.docx | head -5
Pre-flight report:
Pre-flight check
build_doc.py ✓
cite_map.json ✓ ({N} references)
key_papers.bib ✓ ({N} entries)
docx to convert ✓ {filename}
If cite_map.json is absent: stop and tell the user:
cite_map.jsonnot found. Runpython3 build_doc.pyto regenerate it — the template writes it automatically. Once rebuilt, run/literature:endnote-linkagain.
Phase 2 — Run conversion
Run the converter from this skill's references folder:
python3 {base_dir}/references/convert.py {docx_path} \
--project {project_dir} \
--email fakoredesodiq@gmail.com
Where {base_dir} is the "Base directory for this skill" path shown in
this skill's system reminder header (e.g.,
/home/sodiq/.claude/plugins/cache/my-skills/literature/0.1.0/skills/endnote-link).
The script runs in four numbered steps and prints progress:
[1/4] Loading cite_map + bib...
[2/4] CrossRef validation (author · year · retraction)...
[3/4] Fetching RIS...
[4/4] Converting citations and writing outputs...
Flags available:
--skip-validation— skip CrossRef validation (faster, no metadata check)--dry-run— show DOI lookup preview without writing any files--output {path}— custom output docx path--ris {path}— custom RIS output path
Phase 3 — Interpret CrossRef validation output
The script prints a validation block before converting:
══════════════════════════════════════════════════════════
CrossRef Metadata Validation
══════════════════════════════════════════════════════════
[ 1] hackett-2018 ✓ clean
[ 2] skillback-2022 ✓ clean
[ 3] collyer-2022 ✓ clean
...
──────────────────────────────────────────────────────────
Clean: 5 Warnings: 0 Alerts: 0
══════════════════════════════════════════════════════════
Status symbols:
| Symbol | Meaning |
|---|---|
✓ clean |
Author, year, and journal match CrossRef; no retraction |
⚠ Author: ... |
First-author surname differs — check the bib entry |
⚠ Year: ... |
Epub vs print year mismatch — check the bib year field |
⚠ Journal: ... |
Journal name divergence — usually harmless abbreviations |
✗ ALERT: retracted |
Paper has been retracted — do not cite. Remove from manuscript. |
⚠ no DOI — skipped |
BibTeX entry has no DOI — add DOI to key_papers.bib and rerun |
Action on ALERT (retraction):
- Remove the citation from the manuscript
- Update the card: set
tags: [RETRACTED]incard.md, updatemeta.json - Rerun
build_doc.pyand then/literature:endnote-linkagain
Action on Author/Year warning:
- Open
references/key_papers.bib - Verify the
authorandyearfields against the paper - Correct if needed, then rerun — or accept if the discrepancy is a known CrossRef data issue (epub vs print, hyphenated surnames, etc.)
Phase 4 — Report outputs
After the script finishes, report:
══════════════════════════════════════════════════════════
EndnoteLink complete
══════════════════════════════════════════════════════════
CrossRef validation: {N_ok} clean | {N_warn} warnings | {N_alert} alerts
RIS entries: {N} written to {stem}.ris
Converted docx: {stem}_endnote.docx
Next steps in EndNote:
1. File → New (fresh library for this paper — do not reuse old ones)
2. File → Import → File → {stem}.ris
Import Option: Reference Manager (RIS)
3. Open {stem}_endnote.docx in Word
4. Delete the old reference list at the bottom of the document
5. EndNote ribbon → Update Citations and Bibliography
══════════════════════════════════════════════════════════
What this does NOT do
- Does not push citations into EndNote directly (EndNote has no open API)
- Does not modify
build_doc.pyorkey_papers.bib - Does not reformat the reference list style (EndNote handles that via its output style)
- Does not run claim-audit — run
/literature:claim-audit {project_dir}separately if needed
Quick reference
| Command | Effect |
|---|---|
/literature:endnote-link {project_dir} |
Full validation + conversion |
/literature:endnote-link {project_dir} --skip-validation |
Convert only, no CrossRef check |
/literature:endnote-link {project_dir} --dry-run |
Preview DOI lookup without writing files |