$npx -y skills add Lylll9436/Paper-Polish-Workflow-skill --skill ppw-cover-letterGenerate submission-ready cover letters from paper content and target journal requirements. Includes contribution statement, data availability, conflict of interest, and contact block. 生成投稿信,包含贡献声明、数据可用性、利益冲突声明和联系方式。
| 1 | ## Purpose |
| 2 | |
| 3 | This Skill generates complete, submission-ready academic cover letters by loading the target journal's template to align the contribution statement with journal scope and aims, collecting correspondence author details via Ask Strategy, and reading the paper (file or pasted text) to extract the paper title, key contribution, and data availability information. Output is a full letter with all four required content blocks: (1) contribution statement — explicitly aligned with the journal's stated scope from the loaded template; (2) data/code availability statement; (3) conflict of interest declaration; (4) correspondence author contact block. If the journal template is not found, the Skill refuses immediately — it never falls back to generic academic prose, consistent with the journal-aware pattern used throughout this project. |
| 4 | |
| 5 | ## Trigger |
| 6 | |
| 7 | **Activates when the user asks to:** |
| 8 | - Write, generate, or draft a cover letter or submission letter for a paper |
| 9 | - 写投稿信、生成cover letter、帮我写投稿信 |
| 10 | |
| 11 | **Example invocations:** |
| 12 | - "Write a cover letter for my CEUS submission" |
| 13 | - "帮我写投稿信" |
| 14 | - "Generate a cover letter for my paper" |
| 15 | - "写一封投稿到CEUS的cover letter" |
| 16 | - "Help me draft a submission cover letter" |
| 17 | - "帮我生成这篇论文的投稿信" |
| 18 | |
| 19 | ## Modes |
| 20 | |
| 21 | | Mode | Default | Behavior | |
| 22 | |------|---------|----------| |
| 23 | | `direct` | Yes | Single-pass letter generation; all context collected upfront via Ask Strategy | |
| 24 | | `batch` | | NOT supported — each letter requires specific paper context and author details | |
| 25 | |
| 26 | **Default mode:** `direct`. User provides a paper and journal; Skill collects any missing details and generates the complete letter in one pass. |
| 27 | |
| 28 | ## References |
| 29 | |
| 30 | ### Required (always loaded) |
| 31 | |
| 32 | None. |
| 33 | |
| 34 | ### Leaf Hints (loaded conditionally) |
| 35 | |
| 36 | | File | When to Load | |
| 37 | |------|--------------| |
| 38 | | `references/journals/ceus.md` | When user targets CEUS; provides Aims & Scope, scope keywords for contribution alignment | |
| 39 | |
| 40 | ### Loading Rules |
| 41 | |
| 42 | - When journal is specified, load `references/journals/[journal].md`. |
| 43 | - If template not found: **refuse immediately** with: "Journal template for [X] not found. Available: CEUS." |
| 44 | - Do NOT proceed with generic framing if template is missing. |
| 45 | - Extract the Aims & Scope section from the loaded template — the contribution statement must reference it directly. |
| 46 | |
| 47 | ## Ask Strategy |
| 48 | |
| 49 | The Skill needs four inputs. If already provided in trigger or paper content, skip the corresponding question. |
| 50 | |
| 51 | 1. **Target journal** — required; determines which template to load. Ask if not specified. |
| 52 | 2. **Paper file or text** — required; for extracting paper title and key contribution. Ask for file path or paste if not provided. |
| 53 | 3. **Correspondence author details** (name, email, institution) — required; ask as a single grouped question if not provided. |
| 54 | 4. **Data/code availability** — optional; are datasets or code publicly available? If yes, ask for repository URLs. Default to "Data are not publicly available" if user declines or does not know. |
| 55 | |
| 56 | **Rules:** |
| 57 | - Ask at most 3 questions before proceeding. |
| 58 | - Use Structured Interaction when available; fall back to plain-text questions otherwise. |
| 59 | - If correspondence details not provided and user declines: use `[Corresponding Author Name]`, `[Email]`, `[Institution]` placeholders. |
| 60 | |
| 61 | ## Workflow |
| 62 | |
| 63 | ### Step 0: Workflow Memory Check |
| 64 | |
| 65 | - Read `.planning/workflow-memory.json`. If file missing or empty, skip to Step 1. |
| 66 | - Check if the last 1-2 log entries form a recognized pattern with `ppw:cover-letter` that has appeared >= threshold times in the log. See `skill-conventions.md > Workflow Memory > Pattern Detection` for the full algorithm. |
| 67 | - If a pattern is found, present recommendation via AskUserQuestion: |
| 68 | - Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:cover-letter?" |
| 69 | - Options: "Yes, proceed" / "No, continue normally" |
| 70 | - If user accepts: set mode to `direct`, skip Ask Strategy questions. |
| 71 | - If user declines or AskUserQuestion unavailable: continue in normal mode. |
| 72 | |
| 73 | ### Step 1: Collect Context |
| 74 | |
| 75 | - Run Ask Strategy for any missing inputs (journal, paper, author details, data availability). |
| 76 | - Load `references/journals/[journal].md`. If not found: **refuse** with "Journal template for [X] not found. Available: CEUS." Do NOT proceed. |
| 77 | - If paper provided |