$npx -y skills add Lylll9436/Paper-Polish-Workflow-skill --skill ppw-abstractGenerate or optimize academic paper abstracts using the 5-sentence Farquhar formula. Supports generate-from-scratch and restructure-existing paths. Produces labeled output for formula verification plus a clean version for clipboard use. 摘要生成与优化,支持从原始材料生成或改写现有摘要。
| 1 | ## Purpose |
| 2 | |
| 3 | This Skill generates or optimizes academic paper abstracts using the locked 5-sentence Farquhar formula: [1: Contribution], [2: Difficulty], [3: Method], [4: Evidence], [5: Key Result]. It operates on two mutually exclusive paths — generate a new abstract from raw materials (paper sections, bullet points, or a brief description), or restructure an existing abstract to comply with the formula. Both paths produce labeled output first so users can verify formula compliance sentence by sentence, followed by a clean plain-paragraph version ready for clipboard use. When a target journal is specified, journal-specific style conventions are applied. |
| 4 | |
| 5 | ## Trigger |
| 6 | |
| 7 | **Activates when the user asks to:** |
| 8 | - Write, generate, or create an abstract from paper content |
| 9 | - Optimize, restructure, or rewrite an existing abstract |
| 10 | - 写摘要、生成摘要、改写摘要、优化摘要 |
| 11 | |
| 12 | **Example invocations:** |
| 13 | - "Write an abstract for my paper" / "帮我写摘要" |
| 14 | - "Optimize my existing abstract" / "改写我的摘要" |
| 15 | - "Restructure this abstract using the 5-sentence formula" |
| 16 | - "Generate a CEUS-ready abstract from my introduction and results" |
| 17 | |
| 18 | ## Modes |
| 19 | |
| 20 | | Mode | Default | Behavior | |
| 21 | |------|---------|----------| |
| 22 | | `direct` | Yes | Single-pass abstract output using the 5-sentence formula | |
| 23 | | `batch` | | Not supported — abstract requires full paper context | |
| 24 | |
| 25 | **Default mode:** `direct`. User provides content and receives labeled + clean abstract in one pass. |
| 26 | |
| 27 | **Path selection (within direct mode):** |
| 28 | - Input reads like a formed abstract → restructure path |
| 29 | - Input is raw content (sections, bullets, "my paper is about...") → generate path |
| 30 | - Ambiguous → ask before proceeding |
| 31 | |
| 32 | ## References |
| 33 | |
| 34 | ### Required (always loaded) |
| 35 | |
| 36 | | File | Purpose | |
| 37 | |------|---------| |
| 38 | | `references/expression-patterns.md` | Academic expression patterns overview | |
| 39 | |
| 40 | ### Leaf Hints (loaded when needed) |
| 41 | |
| 42 | | File | When to Load | |
| 43 | |------|--------------| |
| 44 | | `references/expression-patterns/introduction-and-gap.md` | Contribution and gap framing (sentences 1-2) | |
| 45 | | `references/expression-patterns/conclusions-and-claims.md` | Calibrated claim language (sentences 1 and 5) | |
| 46 | | `references/expression-patterns/methods-and-data.md` | Method description (sentence 3, when weak) | |
| 47 | | `references/expression-patterns/results-and-discussion.md` | Evidence and result framing (sentences 4-5) | |
| 48 | |
| 49 | ### Journal Template (conditional) |
| 50 | |
| 51 | - When user specifies a target journal, load `references/journals/[journal].md`. |
| 52 | - If template missing, **refuse**: "Journal template for [X] not found. Available: CEUS." |
| 53 | - If no journal specified, ask once; if declined, apply general academic style. |
| 54 | |
| 55 | ## Ask Strategy |
| 56 | |
| 57 | **Before starting, ask about:** |
| 58 | 1. Path: does the user have an existing abstract to restructure, or raw content to generate from? (skip if clear from input) |
| 59 | 2. Target journal if not specified (ask once; if declined, use general academic style) |
| 60 | 3. Word limit if known (typically 150-300 words; ask once) |
| 61 | |
| 62 | **Path inference:** |
| 63 | - User pastes text that reads like an abstract → restructure path |
| 64 | - User provides sections, bullets, or "my paper is about..." → generate path |
| 65 | - Ambiguous → ask: "Do you have an existing abstract to restructure, or shall I generate one from your materials?" |
| 66 | |
| 67 | **Rules:** |
| 68 | - Never ask more than 2 questions before starting. |
| 69 | - Skip path question if inference is clear from input. |
| 70 | - In `direct` mode with sufficient context, proceed without pre-questions. |
| 71 | |
| 72 | ## Workflow |
| 73 | |
| 74 | ### Step 0: Workflow Memory Check |
| 75 | |
| 76 | - Read `.planning/workflow-memory.json`. If file missing or empty, skip to Step 1. |
| 77 | - Check if the last 1-2 log entries form a recognized pattern with `ppw:abstract` that has appeared >= threshold times in the log. See `skill-conventions.md > Workflow Memory > Pattern Detection` for the full algorithm. |
| 78 | - If a pattern is found, present recommendation via AskUser |