# Endnote Link

> EndnoteLink Skill

- Skill: `bolaflame1/endnote-link` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add bolaflame1/endnote-link`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bolaflame1/endnote-link/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Research & Search
- Author: BolaFlame1 (https://skillmd.com/u/bolaflame1)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/bolaflame1/endnote-link

---

# 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.py` has been run and a `.docx` exists
- `references/cite_map.json` exists (auto-generated by `build_doc.py`)
- `references/key_papers.bib` is 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:
1. `build_doc.py` — establishes project root
2. `references/cite_map.json` — required
3. `references/key_papers.bib` — required
4. The `.docx` to convert — default: most recently modified `.docx` in project root

```bash
# 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.json` not found. Run `python3 build_doc.py` to regenerate it —
> the template writes it automatically. Once rebuilt, run `/literature:endnote-link` again.

---

## Phase 2 — Run conversion

Run the converter from this skill's references folder:

```bash
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):**
1. Remove the citation from the manuscript
2. Update the card: set `tags: [RETRACTED]` in `card.md`, update `meta.json`
3. Rerun `build_doc.py` and then `/literature:endnote-link` again

**Action on Author/Year warning:**
1. Open `references/key_papers.bib`
2. Verify the `author` and `year` fields against the paper
3. 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.py` or `key_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 |

