$npx -y skills add Yuan1z0825/nature-skills --skill nature-readerBuild full-paper Chinese-English side-by-side, figure/table-aware, source-grounded Markdown readers for journal or conference papers from PDF, DOI, arXiv, publisher HTML, or pasted text. Use whenever the user asks to translate or read a paper, make 中英文对照/原文对照/全文翻译解读, extract figu
| 1 | # Full-Paper Markdown Reader — Router |
| 2 | |
| 3 | This skill is split into two layers: |
| 4 | |
| 5 | - A **static layer** under `static/` that holds versioned, reusable content fragments (core principles, the reading workflow, the output contract, and per-source-format extraction guidance). |
| 6 | - A **dynamic layer** (this file plus `manifest.yaml`) that detects the request's source format and loads only the fragments needed for the current job. |
| 7 | |
| 8 | Do not try to apply the reading logic from memory or from this router. Always load fragments from disk as described below. |
| 9 | |
| 10 | ## Routing protocol |
| 11 | |
| 12 | Follow these five steps every time the skill is invoked. |
| 13 | |
| 14 | ### 1. Load the manifest and the core layer |
| 15 | |
| 16 | Read [manifest.yaml](manifest.yaml). It declares the `source_format` axis, the allowed values, and the file paths each value maps to. |
| 17 | |
| 18 | Also read every file listed under `always_load`. These hold the core principles, the reading workflow, and the output contract that apply to every reading job, plus the shared Terminology Ledger used to build the recurring-term table. |
| 19 | |
| 20 | ### 2. Detect the source format |
| 21 | |
| 22 | Decide the `source_format` value using the manifest's `detect:` hint and the user's input: |
| 23 | |
| 24 | - `pdf-text` — selectable-text PDF. Default. |
| 25 | - `scanned-pdf` — image-only or OCR-required PDF. |
| 26 | - `html` — publisher or preprint HTML page. |
| 27 | - `doi-arxiv` — a bare DOI or arXiv link that must be resolved first. |
| 28 | - `pasted-text` — pasted prose or notes with no retrievable original layout. |
| 29 | |
| 30 | State the detected value in one short line to the user before processing, so they can correct you cheaply. A source may map to more than one value (for example a DOI that resolves to a PDF); load the resolution fragment first, then the fragment for the resolved artifact. |
| 31 | |
| 32 | ### 3. Load the matching fragment(s) |
| 33 | |
| 34 | Read the file mapped for the detected `source_format`. Do **not** read every fragment in `static/`. Load only what step 2 selected. |
| 35 | |
| 36 | ### 4. Build the reader using the loaded material |
| 37 | |
| 38 | Apply the loaded fragments in this priority order: |
| 39 | |
| 40 | 1. Core principles (`core/principles.md`) — bilingual reader by default, translate for meaning, never degrade to a summary, copyright caution. |
| 41 | 2. Source-format fragment — how to extract text, figures, and tables for this input. |
| 42 | 3. Reading workflow (`core/workflow.md`) — the six-step source-map-first process. |
| 43 | 4. Output contract (`core/output-contract.md`) — required files and the pre-response verification checklist. |
| 44 | |
| 45 | Build the Terminology Ledger as you translate (`../nature-shared/core/terminology-ledger.md`); it becomes the `paper.md` recurring-term table and the `source_map.json` glossary. |
| 46 | |
| 47 | If constraints prevent full processing, still create a draft reader and label missing pages, figures, or low-confidence crops in `translation_notes.md`. Do not switch to summary mode. |
| 48 | |
| 49 | ### 5. Reach for references only when needed |
| 50 | |
| 51 | The files under `references/` are deep references, not defaults. Open them on demand per the `references.on_demand` table in the manifest: |
| 52 | |
| 53 | - detailed figure/table cropping and placement → `references/figure-extraction.md`. |
| 54 | - exact field schema for `paper.md` / `source_map.json` → `references/output-spec.md`. |
| 55 | - answering follow-up questions with source citations → `references/grounding-rules.md`. |
| 56 | |
| 57 | ## Why this split |
| 58 | |
| 59 | - The static layer is versioned and reviewable. Adding a new source format is one new fragment plus one manifest line. |
| 60 | - The dynamic layer keeps each invocation cheap: only the fragment relevant to this input enters context. |
| 61 | - The router itself is short on purpose. Update fragments, not this file, when adding scope. |
| 62 | - This structure mirrors `nature-writing` and `nature-polishing` so shared content lives in `nature-shared/`. |