$npx -y skills add Lylll9436/Paper-Polish-Workflow-skill --skill ppw-repo-to-paperScan an experiment repo and generate a complete paper outline (H1/H2/H3) with user approval checkpoints at each level, then generate body text with evidence annotations, citations, and bilingual output. Python ML repos. 扫描实验仓库,逐级生成论文大纲(H1/H2/H3),每级用户确认后推进, 然后生成带证据标注、引用和双语输出的正文文本。
| 1 | ## Purpose |
| 2 | |
| 3 | This Skill scans a Python ML experiment repository and generates a hierarchical paper outline |
| 4 | (H1/H2/H3) with user approval checkpoints at each heading level. It serves researchers who |
| 5 | have completed experiments and need to structure findings into an academic paper. The scan |
| 6 | categorizes repo files using patterns from `references/repo-patterns.md`, then progressively |
| 7 | generates headings from coarse (sections) to fine (sub-subsections), with the user confirming |
| 8 | or modifying each level before proceeding. After H2 confirmation, the Skill automatically |
| 9 | collects academic references via Semantic Scholar MCP and saves them as per-section ref files |
| 10 | for downstream body generation. |
| 11 | |
| 12 | ## Trigger |
| 13 | |
| 14 | **Activates when the user asks to:** |
| 15 | - Generate a paper structure, outline, or skeleton from a repository or codebase |
| 16 | - Scan a project and create paper sections from experiment code or results |
| 17 | - 从实验仓库/代码仓库生成论文大纲或论文结构 |
| 18 | |
| 19 | **Example invocations:** |
| 20 | - "Generate a paper outline from my repo" |
| 21 | - "帮我从实验仓库生成论文大纲" |
| 22 | - "Scan my project and create paper structure" |
| 23 | - "把我的代码仓库转成论文框架" |
| 24 | |
| 25 | ## Modes |
| 26 | |
| 27 | | Mode | Default | Behavior | |
| 28 | |------|---------|----------| |
| 29 | | `guided` | Yes | Full 5-step workflow with confirmation at each heading level and section-by-section body generation | |
| 30 | | `direct` | | Not supported -- outline generation inherently requires user validation at each level | |
| 31 | | `batch` | | Not supported -- each repo requires unique analysis | |
| 32 | |
| 33 | **Default mode:** `guided`. The layered confirmation design is central to this Skill. |
| 34 | |
| 35 | ## References |
| 36 | |
| 37 | ### Required (always loaded) |
| 38 | |
| 39 | | File | Purpose | |
| 40 | |------|---------| |
| 41 | | `references/repo-patterns.md` | File categorization patterns and section mapping rules | |
| 42 | | `references/bilingual-output.md` | Bilingual output format (Skill is bilingual-eligible) | |
| 43 | | `references/body-generation-rules.md` | Anti-hallucination rules, citation integration, bilingual format, references.bib algorithm | |
| 44 | | `references/journals/ceus.md` | CEUS journal formatting contract (writing style, section guidance) | |
| 45 | |
| 46 | ### Leaf Hints |
| 47 | |
| 48 | None. All reference files are in `required` because Step 5 body generation always needs CEUS formatting. |
| 49 | |
| 50 | ### Loading Rules |
| 51 | |
| 52 | - Load `repo-patterns.md` and `bilingual-output.md` at Step 1 start. |
| 53 | - Load `body-generation-rules.md` and `journals/ceus.md` at Step 5 start. |
| 54 | - If journal template file is missing, refuse: "Journal template for [X] not found. Available: CEUS." |
| 55 | |
| 56 | ## Ask Strategy |
| 57 | |
| 58 | **Before starting, ask about:** |
| 59 | 1. **Repo path** (required): "Which repository should I scan?" -- use Structured Interaction if available |
| 60 | 2. **Target journal** (optional): "Which journal is this paper targeting?" -- options: CEUS, Other, None/General. |
| 61 | If CEUS, load template at Step 2. If Other, ask for journal name. If None, use IMRaD default |
| 62 | |
| 63 | **Bilingual mode:** Inferred from trigger text. Check for opt-out keywords per `references/bilingual-output.md` |
| 64 | (exact phrases: `english only`, `no bilingual`, `only english`, `不要中文`). Do not ask explicitly. |
| 65 | |
| 66 | **Rules:** |
| 67 | - Never ask more than 2 explicit questions (repo path + journal) |
| 68 | - In direct mode, skip -- but direct mode is not supported for this Skill |
| 69 | |
| 70 | ## Workflow |
| 71 | |
| 72 | ### Step 0: Workflow Memory Check |
| 73 | |
| 74 | - Read `.planning/workflow-memory.json`. If file missing or empty, skip to Step 1. |
| 75 | - Check if the last 1-2 log entries form a recognized pattern with `ppw:repo-to-paper` that has appeared >= threshold times in the log. See `skill-conventions.md > Workflow Memory > Pattern Detection` for the full algorithm. |
| 76 | - If a pattern is found, present recommendation via AskUserQuestion: |
| 77 | - Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:repo-to-paper?" |
| 78 | - Options: "Yes, proceed" / "No, continue normally" |
| 79 | - If user accepts: set mode to `direct`, skip Ask Strategy questions. |
| 80 | - If user declines or AskUserQuestion unavailable: continue in normal mode. |
| 81 | - **Note:** This Skill does not support full `direct` mode. If user accepts the recommendation, skip the Ask Strategy questions (repo path, journal) |