16-Skill Claude Code plugin for academic paper writing, polishing, and submission.

GitHub stars
389

Install

/plugin install paper-polish-workflow@paper-polish-workflow

Run it inside Claude Code after adding the marketplace with /plugin marketplace add Lylll9436/Paper-Polish-Workflow-skill.

Contents

Discovered from source

Skills 16

Purpose

This Skill searches Google Scholar using Chrome DevTools MCP tools, presents search results to the user for selection, and retrieves BibTeX entries for selected papers. It automates the manual process of searching Google Scholar, clicking "Cite", and copying BibTeX. This Skill does NOT use Semantic Scholar MCP — it operates entirely through browser automation.

Trigger

Activates when the user asks to:

  • Search Google Scholar for a paper
  • Get BibTeX from Google Scholar
  • /get-paper <search query>

Workflow

Step 1: Navigate to Google Scholar

  • Call mcp__chrome-devtools__list_pages to check browser state.
  • If no page is open on scholar.google.com, call mcp__chrome-devtools__navigate_page to https://scholar.google.com.
  • If already on Google Scholar, reuse the current page.

Step 2: Search

  • Take a snapshot to find the search box element.
  • Fill the search box with the user's query using mcp__chrome-devtools__fill.
  • Click the Search button using mcp__chrome-devtools__click.
  • Wait for results with mcp__chrome-devtools__wait_for (text: ["Cited by"]).

Step 3: Present Results

  • Take a snapshot of search results.
  • Extract the top 5-8 results: title, authors, venue, year, citation count.
  • Present them as a numbered list to the user.
  • Ask the user which paper(s) to retrieve BibTeX for (support multiple selections).
  • If the user's query is an exact title and the first result is a clear match, skip asking and auto-select it.

Step 4: Get BibTeX (for each selected paper)

For each selected paper:

  1. Click Cite: Click the Cite button (haspopup="menu") for the selected result.
  2. Wait for dialog: Wait for ["BibTeX"] text to appear.
  3. Click BibTeX link: Click the BibTeX link inside the Cite dialog.
  4. Read BibTeX: Wait for ["@"] to appear on the new page. Take a snapshot and extract the full BibTeX entry text.
  5. Navigate back: Go back to the search results page (mcp__chrome-devtools__navigate_page type=back).
  6. Close dialog if open: If the Cite dialog is still showing, click Cancel.

Step 5: Output

  • Display all collected BibTeX entries to the user.
  • Ask the user if they want to append these entries to a specific .bib file.
    • If yes, read the target bib file, check for duplicate keys, and append new entries.
    • Default target: manuscript/references/references.bib (if it exists in the current project).

Output Contract

OutputFormatCondition
bibtex_entryBibTeX textAlways produced
Paper metadataNumbered list with title, authors, venue, year, citationsAlways presented before selection

Edge Cases

SituationHandling
Google Scholar CAPTCHA or rate-limitInform the user and stop
No results foundInform the user, suggest alternative keywords
BibTeX page fails to loadRetry once, then inform the user
Multiple papers selectedLoop through Step 4 for each selection
Cite dialog not closingNavigate back to force close

Notes

  • BibTeX keys from Google Scholar are auto-generated (e.g., wang2024assessing). Do not modify them unless the user asks.
  • This skill uses Chrome DevTools MCP tools only. It does NOT use Semantic Scholar MCP.
  • Multiple papers can be fetched in one session by repeating Step 4.

Prerequisites

This Skill requires Chrome DevTools MCP server to be configured in Claude Code. To enable it:

  1. Open Claude Code settings.
  2. Navigate to MCP Servers.
  3. Add the Chrome DevTools MCP server.
  4. Ensure a Chrome browser is running with remote debugging enabled.

Skill: get-paper

Purpose

This Skill provides a systematic, top-down workflow for polishing academic papers. It works from structure to logic to expression, with user confirmation at each decision point. Expression options are drawn from reference-driven academic patterns rather than ad hoc rewrites, ensuring professional and consistent output suitable for journal submission.

Trigger

Activates when the user asks to:

  • Polish, revise, or improve an academic paper section by section
  • 润色、精修、逐步改进学术论文

Example invocations:

  • "Polish my paper section by section" / "润色论文"
  • "Help me revise my introduction step by step" / "精修论文"
  • "Guide me through polishing this draft" / "帮我逐步润色这篇论文"

Modes

ModeDefaultBehavior
interactiveYesFull 4-step flow with user confirmation at each decision point
guidedMulti-pass with confirmation at key checkpoints only
directSingle-pass polish using defaults; skip AskUserQuestion
batchSame operation applied across multiple sections sequentially

Default mode: interactive

Mode inference: "quickly" or "just fix" switches to direct. "step by step" or "逐步" confirms interactive (already default).

References

Required (always loaded)

FilePurpose
references/expression-patterns.mdAcademic expression patterns overview and module index

Leaf Hints (loaded when needed)

FileWhen to Load
references/expression-patterns/introduction-and-gap.mdPolishing introduction or background content
references/expression-patterns/methods-and-data.mdPolishing methods, data, or study area content
references/expression-patterns/results-and-discussion.mdPolishing results or discussion content
references/expression-patterns/conclusions-and-claims.mdPolishing conclusion content
references/expression-patterns/geography-domain.mdContent involves spatial, urban, or planning topics
references/anti-ai-patterns.mdPolishing expression (Step 3) -- screen for AI-sounding phrases
references/journals/ceus.mdTarget journal is CEUS

Loading Rules

  • Load expression patterns overview at start; select the appropriate leaf based on section type.
  • Load anti-AI patterns when polishing expression (Step 3).
  • Load journal template when target journal is specified.
  • Load geography-domain.md when spatial, urban, or planning content is detected.
  • If a reference file is missing, warn the user and proceed with reduced capability.

Ask Strategy

Before starting, ask about:

  1. Target journal (if not already known)
  2. Which section to work on
  3. Preferred mode (if ambiguous from trigger)

Rules:

  • Never ask more than 3 questions before producing initial output.
  • In direct mode, skip pre-questions if the user provided enough context.
  • In batch mode, skip per-item questions; apply settings from the first item.
  • Use Structured Interaction when available; fall back to plain-text questions otherwise.
  • See skill-conventions.md > AskUserQuestion Enforcement for full rules.

Workflow

Step 1: Collect Context

  • Determine input type (file path or pasted text).
  • Load required references (expression-patterns overview).
  • Identify target journal; load journal template if specified.
  • Read input content using the Read tool; extract key numbers, claims, and data points.
  • Locate example/reference papers if the user provides them (use Read tool for PDFs).
  • In interactive or guided mode: confirm scope with the user before proceeding.

Step 2: Structure & Logic Confirmation

  • Analyze section macro structure (e.g., Abstract = Background + Gap + Method + Results + Contribution).
  • Present a structure table for user confirmation.
  • Break content into sentences; assign a logic function to each.
  • Present the logic chain for user confirmation.
  • Checkpoint: user confirms structure and logic before expression work begins.
  • In direct mode: run structure and logic analysis internally, proceed to Step 3 automatically.

Step 3: Expression Polish & Consistency

  • Load the section-appropriate expression pattern leaf and anti-AI patterns.
  • For each sentence with expression issues, present 2-3 options via AskUserQuestion (interactive mode) or apply the best option automatically (direct mode).
AskUserQuestion({
  question: "Which expression do you prefer for [sentence function]?",
  options: [
    { label: "[Expression A]", description: "[full sentence with expression A]" },
    { label: "[Expression B]", description: "[full sentence with expression B]" },
    { label: "[Expression C]", description: "[full sentence with expression C]" }
  ]
})
  • Reference paper consultation: when the user questions professionalism, use the Read tool to load example papers and extract expression patterns.
  • Journal style check: apply journal-specific requirements from the loaded template.
  • Repetition and coherence pass: check for repeated expressions and missing transitions; suggest fixes.
  • Cross-section consistency: verify numbers, terminology, and claims across sections.

Step 4: Output

  • Generate highlights if the journal requires them (for CEUS, see references/journals/ceus.md).
  • Suggest a read-aloud final check to catch awkward phrasing.
  • Compile all confirmed content into the final version.
  • Present the final version with word count for user confirmation.
  • Write to *_polished.md after confirmation (or automatically in batch mode).
  • Report word count and any journal constraint notes.

Output Contract

OutputFormatCondition
polished_textMarkdown file (*_polished.md) or conversation outputAlways produced
change_summaryMarkdown in sessionAlways produced
Word countIntegerAlways reported
Journal compliance notesBullet listWhen a target journal is specified

Edge Cases

SituationHandling
Unprofessional word flaggedPresent 2-3 alternatives via AskUserQuestion; accept if user insists
Section too long for single passSplit into paragraph-level sub-passes; maintain cross-paragraph coherence
No journal specifiedDefault to general academic style; note in output
Mixed language inputDetect dominant language; ask user to confirm target language
Reference paper provided as PDFUse Read tool to load PDF; extract style patterns for expression matching
Abrupt sentence transitionProvide transition options via AskUserQuestion
Repetition detected between sectionsIdentify repeated content; suggest which occurrence to rephrase
Logic structure needs modificationReturn to Step 2 to re-confirm structure before continuing

Fallbacks

ScenarioFallback
Structured Interaction unavailableAsk 1-3 plain-text questions covering highest-impact gaps; do not block workflow
Reference file missingLog the missing file, proceed with reduced capability, warn the user
Target journal not specifiedAsk once; if declined, use general academic style
PDF reference paper unreadableAsk user to paste relevant excerpts instead

Skill: paper-polish-workflow Conventions: references/skill-conventions.md

Purpose

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.

Trigger

Activates when the user asks to:

  • Write, generate, or create an abstract from paper content
  • Optimize, restructure, or rewrite an existing abstract
  • 写摘要、生成摘要、改写摘要、优化摘要

Example invocations:

  • "Write an abstract for my paper" / "帮我写摘要"
  • "Optimize my existing abstract" / "改写我的摘要"
  • "Restructure this abstract using the 5-sentence formula"
  • "Generate a CEUS-ready abstract from my introduction and results"

Modes

ModeDefaultBehavior
directYesSingle-pass abstract output using the 5-sentence formula
batchNot supported — abstract requires full paper context

Default mode: direct. User provides content and receives labeled + clean abstract in one pass.

Path selection (within direct mode):

  • Input reads like a formed abstract → restructure path
  • Input is raw content (sections, bullets, "my paper is about...") → generate path
  • Ambiguous → ask before proceeding

References

Required (always loaded)

FilePurpose
references/expression-patterns.mdAcademic expression patterns overview

Leaf Hints (loaded when needed)

FileWhen to Load
references/expression-patterns/introduction-and-gap.mdContribution and gap framing (sentences 1-2)
references/expression-patterns/conclusions-and-claims.mdCalibrated claim language (sentences 1 and 5)
references/expression-patterns/methods-and-data.mdMethod description (sentence 3, when weak)
references/expression-patterns/results-and-discussion.mdEvidence and result framing (sentences 4-5)

Journal Template (conditional)

  • When user specifies a target journal, load references/journals/[journal].md.
  • If template missing, refuse: "Journal template for [X] not found. Available: CEUS."
  • If no journal specified, ask once; if declined, apply general academic style.

Ask Strategy

Before starting, ask about:

  1. Path: does the user have an existing abstract to restructure, or raw content to generate from? (skip if clear from input)
  2. Target journal if not specified (ask once; if declined, use general academic style)
  3. Word limit if known (typically 150-300 words; ask once)

Path inference:

  • User pastes text that reads like an abstract → restructure path
  • User provides sections, bullets, or "my paper is about..." → generate path
  • Ambiguous → ask: "Do you have an existing abstract to restructure, or shall I generate one from your materials?"

Rules:

  • Never ask more than 2 questions before starting.
  • Skip path question if inference is clear from input.
  • In direct mode with sufficient context, proceed without pre-questions.

Workflow

Step 0: Workflow Memory Check

  • Read .planning/workflow-memory.json. If file missing or empty, skip to Step 1.
  • 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.
  • If a pattern is found, present recommendation via AskUserQuestion:
    • Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:abstract?"
    • Options: "Yes, proceed" / "No, continue normally"
  • If user accepts: set mode to direct, skip Ask Strategy questions.
  • If user declines or AskUserQuestion unavailable: continue in normal mode.

Step 1: Collect Context

  • Load references/expression-patterns.md overview.
  • If journal specified, load references/journals/[journal].md. If missing, refuse with: "Journal template for [X] not found. Available: CEUS."
  • Read user input: file via Read tool, or pasted text from conversation.
  • Determine path: restructure if input reads like a formed abstract; generate if raw materials. Ask if ambiguous.
  • Opt-out check: Scan the user's trigger prompt for any of these phrases (case-insensitive, exact phrase match): english only, no bilingual, only english, 不要中文. Store result as bilingual_mode (true/false). This flag governs Step 3 output below.
  • Record workflow: Append {"skill": "ppw:abstract", "ts": "<ISO timestamp>"} to .planning/workflow-memory.json. Create file as [] if missing. Drop oldest entry if log length >= 50.

Step 2a: Generate Path (raw content provided)

  • Load references/expression-patterns/introduction-and-gap.md for contribution and gap framing.
  • Load references/expression-patterns/conclusions-and-claims.md for calibrated claim language.
  • Load references/expression-patterns/methods-and-data.md if the user's method description is weak.
  • Synthesize sentence 1 (contribution): start with "We introduce / propose / demonstrate / show..."
  • Synthesize sentence 2 (difficulty): why this problem is hard or why it matters.
  • Synthesize sentence 3 (method): how the problem is solved, with key technical terminology.
  • Load references/expression-patterns/results-and-discussion.md for sentences 4-5.
  • Synthesize sentence 4 (evidence): what was measured, on what benchmark or dataset.
  • Synthesize sentence 5 (key result): the most important number or qualitative outcome.

Step 2b: Restructure Path (existing abstract provided)

  • Load the same leaf hints as the generate path.
  • Map each existing sentence to one of the 5 formula positions.
  • Rewrite each sentence to tighten formula compliance while preserving the user's content.
  • Internal audit: After restructuring, verify all 5 positions are filled.
  • Flag any missing position with [MISSING: position-name] — never silently drop content.

Step 3: Output

  • Present the labeled version first (formula positions explicit, see Output Contract).

  • Present the clean version (plain paragraph, no labels) separated by ---.

  • If the user wants to save: offer to write to a file using the Write tool.

  • If word limit was specified, report word count; warn if over limit.

  • Bilingual display: If bilingual_mode is true: after presenting the labeled version and after presenting the clean version, append a > **[Chinese]** ... blockquote for each sentence of the abstract. Use a header: "双语对照 / Bilingual Comparison:" before the blockquotes. Format:

    [Chinese] [1: 贡献] ... [Chinese] [2: 难度] ... [Chinese] [3: 方法] ... [Chinese] [4: 证据] ... [Chinese] [5: 关键结果] ...

    Each blockquote corresponds to one Farquhar formula sentence. Label prefixes in Chinese are for readability only -- the clean version Chinese follows the plain paragraph structure without labels.

  • If bilingual_mode is false (opt-out detected): skip bilingual display entirely.

  • Optionally recommend the Polish Skill for further expression refinement.

Output Contract

OutputFormatCondition
labeled_abstractLabeled 5-sentence block with [N: Position] markersAlways
clean_abstractPlain paragraph with no labels, separated by ---Always
Word countIntegerWhen user specified a word limit
bilingual_abstract> **[Chinese]** ... blockquotes in session (one per sentence)When bilingual_mode is true (default). Skipped when opt-out detected.

Exact labeled format:

[1: Contribution] We propose...
[2: Difficulty] Despite growing interest in X, existing approaches fail to...
[3: Method] We address this by...
[4: Evidence] Evaluated on N datasets...
[5: Key Result] Our approach achieves...

---
Clean version:
We propose... Despite growing interest in X, existing approaches fail to... We address this by... Evaluated on N datasets... Our approach achieves...

Edge Cases

SituationHandling
Input is ambiguous (not clearly raw content or existing abstract)Ask before proceeding: "Do you have an existing abstract to restructure, or shall I generate one?"
Existing abstract has fewer than 5 sentencesRun restructure path; flag missing positions with [MISSING: ...]
User specifies word limitCount words in output; warn if over limit with exact count
Journal specified but template missingRefuse: "Journal template for [X] not found. Available: CEUS."
Formula position cannot be filled from available contentFlag with [MISSING: difficulty statement]; do not invent content
User provides only a title or one-sentence summaryAsk for more content before proceeding

Fallbacks

ScenarioFallback
Structured Interaction unavailableAsk 1-2 plain-text questions (path + journal)
Expression pattern leaf missingProceed with general academic register; warn user
Journal template missing (no journal specified)Ask once; if declined, use general academic style
Write tool failsPresent output in conversation instead

Examples

Invocation: "Help me restructure my abstract to follow the 5-sentence formula."

User pastes: "In this paper we study urban mobility patterns using GPS data. We find that mobility is highly predictable. We propose a model called MobNet. It outperforms existing approaches by 12% on the next-location prediction task."

Output:

[1: Contribution] We propose MobNet, a model for predicting urban mobility using GPS data.
[2: Difficulty] Despite the prevalence of GPS data, existing mobility models fail to capture [MISSING: difficulty statement — why prediction is hard or why existing approaches fall short].
[3: Method] MobNet addresses this by [MISSING: method description — how MobNet works].
[4: Evidence] Evaluated on a next-location prediction task using GPS traces from urban environments.
[5: Key Result] MobNet outperforms existing approaches by 12% on next-location prediction.

---
Clean version:
We propose MobNet, a model for predicting urban mobility using GPS data. [MISSING: difficulty statement]. MobNet addresses this by [MISSING: method description]. Evaluated on a next-location prediction task using GPS traces from urban environments. MobNet outperforms existing approaches by 12% on next-location prediction.

Two formula positions are flagged as missing. Please provide: (1) why mobility prediction is hard or what existing approaches fail to do, and (2) a brief description of how MobNet works.


Skill: abstract-skill Conventions: references/skill-conventions.md

Purpose

This Skill generates or optimizes LaTeX figure and table captions for academic papers. For spatial figures (maps, GIS outputs, aerial photos), the Skill proactively collects study area, data source, and CRS metadata using a geography-aware Ask Strategy. For non-spatial figures and tables, geography questions are skipped entirely. Output is written directly to the user's .tex file at the correct \caption{} location using the Read-before-Write pattern. When a target journal is specified, caption length and style are adapted to the journal template.

Core Prompt

Source: awesome-ai-research-writing — 生成图的标题 + 生成表的标题

图标题 Prompt:

# Role
你是一位经验丰富的学术编辑,擅长撰写精准、规范的论文插图标题。

# Task
请将我提供的【中文描述】转化为符合顶级会议规范的【英文图标题】。

# Constraints
1. 格式规范:
   - 如果翻译结果是名词性短语:请使用 Title Case 格式,即所有实词的首字母大写,末尾不加句号。
   - 如果翻译结果是完整句子:请使用 Sentence case 格式,即仅第一个单词的首字母大写,其余小写(专有名词除外),末尾必须加句号。

2. 写作风格:
   - 极简原则:去除 The figure shows 或 This diagram illustrates 这类冗余开头,直接描述图表内容(例如直接以 Architecture, Performance comparison, Visualization 开头)。
   - 去 AI 味:尽量避免使用复杂的生僻词,保持用词平实准确。

3. 输出格式:
   - 只输出翻译后的英文标题文本。
   - 不要包含 Figure 1: 这样的前缀,只输出内容本身。
   - 必须对特殊字符进行转义(例如:`%`、`_`、`&`)。
   - 保持数学公式原样(保留 `$` 符号)。

表标题 Prompt:

# Role
你是一位经验丰富的学术编辑,擅长撰写精准、规范的论文表格标题。

# Task
请将我提供的【中文描述】转化为符合顶级会议规范的【英文表标题】。

# Constraints
1. 格式规范:
   - 如果翻译结果是名词性短语:请使用 Title Case 格式,即所有实词的首字母大写,末尾不加句号。
   - 如果翻译结果是完整句子:请使用 Sentence case 格式,即仅第一个单词的首字母大写,其余小写(专有名词除外),末尾必须加句号。

2. 写作风格:
   - 常用句式:对于表格,推荐使用 Comparison with, Ablation study on, Results on 等标准学术表达。
   - 去 AI 味:尽量避免使用 showcase, depict 等词,直接使用 show, compare, present。

3. 输出格式:
   - 只输出翻译后的英文标题文本。
   - 不要包含 Table 1: 这样的前缀,只输出内容本身。
   - 必须对特殊字符进行转义(例如:`%`、`_`、`&`)。
   - 保持数学公式原样(保留 `$` 符号)。

Trigger

Activates when the user asks to:

  • Write, generate, or create a caption for a figure or table
  • Optimize, improve, or rewrite an existing weak caption
  • 写图题、生成图表说明、优化标题、改写图表描述

Example invocations:

  • "Write a caption for my figure" / "帮我写图表标题"
  • "Optimize this table caption" / "优化我的图表说明"
  • "Generate a CEUS-ready figure caption" / "帮我生成符合期刊要求的图题"
  • "Improve the caption for my map figure"
  • "帮我生成符合CEUS要求的图题"

Modes

ModeDefaultBehavior
directYesSingle-pass caption output after Ask Strategy questions
batchNot supported — each caption requires its own figure/table context

Default mode: direct. User provides figure/table context and receives a complete LaTeX caption in one pass.

Path selection (within direct mode):

  • User provides an existing caption to improve → Optimize path
  • User provides content description only → Generate path
  • Ambiguous → ask: "Do you have an existing caption to improve, or shall I generate one from your description?"

References

Required (always loaded)

FilePurpose
references/expression-patterns.mdAcademic expression patterns overview — always loaded as entrypoint

Leaf Hints (loaded conditionally)

FileWhen to Load
references/expression-patterns/geography-domain.mdWhen figure type is spatial (map, photo, GIS output); provides study area framing, spatial description patterns, planning language

Journal Template (conditional)

  • When user specifies a target journal, load references/journals/[journal].md.
  • If template missing, refuse: "Journal template for [X] not found. Available: CEUS."
  • If no journal specified, ask once; if declined, use general academic style.

Ask Strategy

Before starting, collect:

  1. Figure or table type (always required — determines whether spatial questions apply): map / chart / diagram / photo / data table?

  2. Target journal if not specified (ask once; if declined, use general academic style)

  3. If figure type is spatial (map, photo, GIS output):

    • Study area / city name (e.g., "Beijing Chaoyang District")
    • Data source brief (e.g., "OpenStreetMap 2023", "Landsat-8 imagery")
    • CRS (ask only if user knows it; skip if uncertain — do not press)
    • Key legend items (ask only if map or chart has a visible legend)
  4. If figure type is non-spatial (bar chart, line chart, schematic, data table): Skip all geography questions. Ask only for data source if not mentioned.

Rules:

  • Never ask more than 3 questions before proceeding
  • Missing spatial metadata (CRS, legend): skip the clause gracefully — do NOT insert [MISSING: ...] stubs in caption output
  • If .tex file has multiple \caption{} commands: ask which \label{} (e.g., \label{fig:study_area}) is the target before writing
  • In direct mode with sufficient context already provided, proceed without pre-questions

Workflow

Step 0: Workflow Memory Check

  • Read .planning/workflow-memory.json. If file missing or empty, skip to Step 1.
  • Check if the last 1-2 log entries form a recognized pattern with ppw:caption that has appeared >= threshold times in the log. See skill-conventions.md > Workflow Memory > Pattern Detection for the full algorithm.
  • If a pattern is found, present recommendation via AskUserQuestion:
    • Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:caption?"
    • Options: "Yes, proceed" / "No, continue normally"
  • If user accepts: set mode to direct, skip Ask Strategy questions.
  • If user declines or AskUserQuestion unavailable: continue in normal mode.

Step 1: Collect Context

  • Load references/expression-patterns.md overview.
  • If journal specified, load references/journals/[journal].md. If missing, refuse: "Journal template for [X] not found. Available: CEUS."
  • Read user input: if file provided, use Read tool; otherwise accept pasted text description.
  • Run Ask Strategy questions to fill any gaps not already answered by input.
  • Determine path: if user provides an existing caption to improve → Optimize path; if user provides content description only → Generate path; ask if ambiguous.
  • Record workflow: Append {"skill": "ppw:caption", "ts": "<ISO timestamp>"} to .planning/workflow-memory.json. Create file as [] if missing. Drop oldest entry if log length >= 50.

Step 2a: Generate Path (new caption from content description)

  • Follow the Core Prompt constraints above (figure or table prompt as applicable) as the primary instruction set for caption generation.

  • If figure type is spatial: load references/expression-patterns/geography-domain.md.

  • Apply figure vs. table branching logic:

TypeCaption Focus
MapSpatial extent, CRS (if provided), data source, scale bar mention
Chart / DiagramVariables described, trend or comparison purpose, data source
PhotoSubject, location (if provided), data source or photographer credit
TableRow/column semantics, statistical context, units, data source
  • Compose caption using locked three-part LaTeX format: \caption{[Subject / study area]. [Key content description]. [Data source statement].}
  • Adapt length and style to journal template if loaded.

Step 2b: Optimize Path (improve existing weak caption)

  • If figure type is spatial: load references/expression-patterns/geography-domain.md.
  • Review existing caption for: completeness (subject/content/source), spatial metadata gaps, terminology precision, journal length compliance.
  • Rewrite using the same branching logic and three-part format as the Generate path.
  • Do not introduce [MISSING: ...] placeholders; generate from available content.

Step 3: Write to File

  • Read the target .tex file (required before Write — locate \caption{} or \caption[]{} insertion point).
  • If multiple \caption{} commands exist in the file: apply Ask Strategy rule to confirm target \label{} before writing.
  • Replace existing \caption{} content (or insert if empty) at the identified location.
  • Write updated file.
  • If Write tool fails: present final caption in conversation with instructions to paste at \caption{} location.

Output Contract

OutputFormatCondition
caption_latexLaTeX \caption{...} string written to .tex fileAlways — file input and Write succeeds
caption_latexLaTeX \caption{...} string in conversationFallback — Write fails, or pasted text input

LaTeX caption format examples:

Figure (spatial):

\caption{Distribution of urban green space in Shenzhen Nanshan District. Data derived from OpenStreetMap 2023. Projected in WGS 84 / UTM Zone 50N.}

Figure (non-spatial):

\caption{Comparison of model accuracy across three benchmark datasets. All values are F1 scores. Data from the COCO 2017 validation set.}

Table:

\caption{Descriptive statistics of land use change by category, 2010--2020. All areas reported in km\textsuperscript{2}. Data from the Third National Land Survey.}

Edge Cases

SituationHandling
Journal specified but template not foundRefuse: "Journal template for [X] not found. Available: CEUS."
Figure type is spatial but no study area or data source providedGenerate from available content; skip missing clauses; do NOT use [MISSING: ...]
.tex file has multiple \caption{} commandsAsk which \label{} is the target before writing
User provides both existing caption and content descriptionDefault to Optimize path; confirm if ambiguous
Figure type unclear ("my figure")Ask type before any branching logic
Input is only a file path with no descriptionRead the file; ask for clarification if content is ambiguous
Non-standard caption format in journal templateJournal template overrides default three-part format rules
User declines to provide CRSSkip CRS clause entirely; do not leave placeholder

Fallbacks

ScenarioFallback
Structured Interaction unavailableAsk 1-3 plain-text questions (figure type, journal, study area if spatial)
geography-domain.md leaf missingProceed with general spatial description; warn user of reduced quality
Journal template missing (no journal specified)Ask once; if declined, use general academic style
Write tool failsPresent caption in conversation; advise user to paste at \caption{} location
.tex file not found or unreadablePresent caption in conversation

Examples

Invocation: "Write a caption for my map figure showing urban heat island distribution in Guangzhou."

Ask Strategy exchange:

  • Type: map (spatial → geography questions apply)
  • Study area: Guangzhou
  • Data source: Landsat-8 imagery, 2022
  • CRS: user does not know → skipped
  • Journal: CEUS

Generated caption (after loading CEUS template and geography-domain.md):

\caption{Spatial distribution of urban heat island intensity in Guangzhou. Land surface temperature derived from Landsat-8 imagery (2022). City boundary data from the National Geomatics Center of China.}

Write step: Skill reads paper.tex, locates \caption{} at \label{fig:uhi}, replaces content, writes file.


Skill: caption-skill Conventions: references/skill-conventions.md

Purpose

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.

Trigger

Activates when the user asks to:

  • Write, generate, or draft a cover letter or submission letter for a paper
  • 写投稿信、生成cover letter、帮我写投稿信

Example invocations:

  • "Write a cover letter for my CEUS submission"
  • "帮我写投稿信"
  • "Generate a cover letter for my paper"
  • "写一封投稿到CEUS的cover letter"
  • "Help me draft a submission cover letter"
  • "帮我生成这篇论文的投稿信"

Modes

ModeDefaultBehavior
directYesSingle-pass letter generation; all context collected upfront via Ask Strategy
batchNOT supported — each letter requires specific paper context and author details

Default mode: direct. User provides a paper and journal; Skill collects any missing details and generates the complete letter in one pass.

References

Required (always loaded)

None.

Leaf Hints (loaded conditionally)

FileWhen to Load
references/journals/ceus.mdWhen user targets CEUS; provides Aims & Scope, scope keywords for contribution alignment

Loading Rules

  • When journal is specified, load references/journals/[journal].md.
  • If template not found: refuse immediately with: "Journal template for [X] not found. Available: CEUS."
  • Do NOT proceed with generic framing if template is missing.
  • Extract the Aims & Scope section from the loaded template — the contribution statement must reference it directly.

Ask Strategy

The Skill needs four inputs. If already provided in trigger or paper content, skip the corresponding question.

  1. Target journal — required; determines which template to load. Ask if not specified.
  2. Paper file or text — required; for extracting paper title and key contribution. Ask for file path or paste if not provided.
  3. Correspondence author details (name, email, institution) — required; ask as a single grouped question if not provided.
  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.

Rules:

  • Ask at most 3 questions before proceeding.
  • Use Structured Interaction when available; fall back to plain-text questions otherwise.
  • If correspondence details not provided and user declines: use [Corresponding Author Name], [Email], [Institution] placeholders.

Workflow

Step 0: Workflow Memory Check

  • Read .planning/workflow-memory.json. If file missing or empty, skip to Step 1.
  • 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.
  • If a pattern is found, present recommendation via AskUserQuestion:
    • Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:cover-letter?"
    • Options: "Yes, proceed" / "No, continue normally"
  • If user accepts: set mode to direct, skip Ask Strategy questions.
  • If user declines or AskUserQuestion unavailable: continue in normal mode.

Step 1: Collect Context

  • Run Ask Strategy for any missing inputs (journal, paper, author details, data availability).
  • Load references/journals/[journal].md. If not found: refuse with "Journal template for [X] not found. Available: CEUS." Do NOT proceed.
  • If paper provided as file: use Read tool to load it; extract title and key contribution.
  • If paper provided as pasted text: extract title and key contribution from the pasted content.
  • Extract Aims & Scope section from the loaded journal template (contribution statement references this directly).
  • Record workflow: Append {"skill": "ppw:cover-letter", "ts": "<ISO timestamp>"} to .planning/workflow-memory.json. Create file as [] if missing. Drop oldest entry if log length >= 50.

Step 2: Draft Letter

Use the following locked letter format:

[Date]

The Editor-in-Chief
[Editor Name]
[Journal Name]

Dear [Editor Name],

We submit our manuscript entitled "[Paper Title]" for consideration in [Journal Name].

**Contribution Statement**
[1–2 sentences explicitly referencing journal's stated scope from loaded template]

**Data and Code Availability**
[Repository URLs, or "Data are not publicly available due to [reason]."]

**Conflict of Interest**
The authors declare no conflict of interest.

**Corresponding Author**
[Name]
[Email]
[Institution]

Sincerely,
[Authors]

Contribution statement rule: Write 1–2 sentences that explicitly reference the journal's stated scope and aims from the loaded template. Use journal-specific framing: "This paper addresses [X], which aligns directly with [Journal]'s focus on [scope phrase from template]." Do NOT use generic framing ("this paper advances the field of...").

Data/code block: List repository URLs if provided; otherwise state "Data are not publicly available due to [reason if given, otherwise omit reason clause]."

Conflict of interest: Always use the standard declaration "The authors declare no conflict of interest."

Contact block: Use provided author details or bracketed placeholders if not provided.

Step 3: Output

  • File input: Write to {input_filename_without_ext}_cover_letter.md using the Write tool.
  • Pasted text input: Display the complete letter in conversation.
  • Confirm output location to user.

Output Contract

OutputFormatCondition
cover_letter_mdMarkdown file at {input_filename_without_ext}_cover_letter.mdFile input
cover_letter_textComplete letter in conversationPasted text input or Write tool failure

Required content blocks (all four mandatory in every letter):

**Contribution Statement**    ← references journal scope explicitly
**Data and Code Availability** ← links or "not publicly available"
**Conflict of Interest**       ← standard declaration
**Corresponding Author**       ← name, email, institution

Note: Contribution statement must reference journal scope explicitly — not generic academic praise.

Edge Cases

SituationHandling
Journal template not foundRefuse: "Journal template for [X] not found. Available: CEUS." Do not generate with generic framing.
Paper file not found or unreadableAsk user to paste paper text or abstract instead
Correspondence details not provided; user declinesUse [Corresponding Author Name], [Email], [Institution] placeholders; note user must fill before submission
Data availability unknownUse "Data availability will be confirmed at revision stage."
Multiple authors listed for correspondenceAsk which one is the corresponding author; include only one in the contact block
Aims & Scope section thin in templateUse all available scope language from template; note contribution alignment may be approximate

Fallbacks

ScenarioFallback
Structured Interaction unavailableAsk journal name and author details as sequential plain-text questions
Read tool fails on paper fileAsk user to paste abstract or key contribution sentences
Write tool failsDisplay complete letter in conversation; advise user to copy to a .md file
references/journals/ceus.md missingRefuse with journal-missing message; do not generate without template

Examples

Invocation: "Write a cover letter for my CEUS submission" (with file my_paper.tex)

  1. Skill loads references/journals/ceus.md — extracts Aims & Scope.
  2. Skill reads my_paper.tex — extracts title and key contribution.
  3. Skill asks: "Please provide your name, email, and institution for the correspondence block."
  4. Skill asks: "Are your data or code publicly available? If yes, please share the repository URL(s)."
  5. Skill generates letter and writes to my_paper_cover_letter.md.

First 8 lines of output:

March 2026

The Editor-in-Chief
[Editor Name]
Computers, Environment and Urban Systems

Dear [Editor Name],

We submit our manuscript entitled "Spatiotemporal Analysis of Urban Heat Islands Using Remote
Sensing" for consideration in Computers, Environment and Urban Systems.

**Contribution Statement**
This paper addresses urban heat island detection and mitigation across metropolitan areas, which
aligns directly with CEUS's focus on computational approaches to understanding urban systems and
the built environment.

Skill: cover-letter-skill Conventions: references/skill-conventions.md

Purpose

This Skill detects AI-generated patterns in English academic text and rewrites flagged passages with explainable, risk-tagged results. It scans text against three pattern dimensions (vocabulary inflation, sentence overclaims, transition smoothing) from the anti-AI patterns library, presents detections grouped by risk level (High Risk / Medium Risk / Optional), and lets users batch-select which items to rewrite. Rewrites restructure expressions rather than just swapping synonyms, preserving academic meaning and quality. For file input, edits are made in-place with LaTeX comment annotations for traceability; for pasted text, results appear in conversation.

Core Prompt

Source: awesome-ai-research-writing — 去 AI 味(LaTeX 英文)

# Role
你是一位计算机科学领域的资深学术编辑,专注于提升论文的自然度与可读性。你的任务是将大模型生成的机械化文本重写为符合顶级会议(如 ACL, NeurIPS)标准的自然学术表达。

# Task
请对我提供的【英文 LaTeX 代码片段】进行"去 AI 化"重写,使其语言风格接近人类母语研究者。

# Constraints
1. 词汇规范化:
   - 优先使用朴实、精准的学术词汇。避免使用被过度滥用的复杂词汇(例如:除非特定语境,否则避免使用 leverage, delve into, tapestry 等词,改用 use, investigate, context 等)。
   - 只有在必须表达特定技术含义时才使用术语,避免为了形式上的"高级感"而堆砌辞藻。

2. 结构自然化:
   - 严禁使用列表格式:必须将所有的 item 内容转化为逻辑连贯的普通段落。
   - 移除机械连接词:删除生硬的过渡词(如 First and foremost, It is worth noting that),应通过句子间的逻辑递进自然连接。
   - 减少插入符号:尽量减少破折号(—)的使用,建议使用逗号、括号或从句结构替代。

3. 排版规范:
   - 禁用强调格式:严禁在正文中使用加粗或斜体进行强调。学术写作应通过句式结构来体现重点。
   - 保持 LaTeX 纯净:不要引入无关的格式指令。

4. 修改阈值(关键):
   - 宁缺毋滥:如果输入的文本已经非常自然、地道且没有明显的 AI 特征,请保留原文,不要为了修改而修改。
   - 正向反馈:对于高质量的输入,应在 Part 3 中给予明确的肯定和正向评价。

5. 输出格式:
   - Part 1 [LaTeX]:输出重写后的代码(如果原文已足够好,则输出原文)。
     * 语言要求:必须是全英文。
     * 必须对特殊字符进行转义(例如:`%`、`_`、`&`)。
     * 保持数学公式原样(保留 `$` 符号)。
   - Part 2 [Translation]:对应的中文直译。
   - Part 3 [Modification Log]:
     * 如果进行了修改:简要说明调整了哪些机械化表达。
     * 如果未修改:请直接输出中文评价:"[检测通过] 原文表达地道自然,无明显 AI 味,建议保留。"
   - 除以上三部分外,不要输出任何多余的对话。

# Execution Protocol
在输出前,请自查:
1. 拟人度检查:确认文本语气自然。
2. 必要性检查:当前的修改是否真的提升了可读性?如果是为了换词而换词,请撤销修改并判定为"检测通过"。

AI 味高频词汇参考表:

Accentuate, Ador, Amass, Ameliorate, Amplify, Alleviate, Ascertain, Advocate, Articulate, Bear, Bolster,
Bustling, Cherish, Conceptualize, Conjecture, Consolidate, Convey, Culminate, Decipher, Demonstrate,
Depict, Devise, Delineate, Delve, Delve Into, Diverge, Disseminate, Elucidate, Endeavor, Engage, Enumerate,
Envision, Enduring, Exacerbate, Expedite, Foster, Galvanize, Harmonize, Hone, Innovate, Inscription,
Integrate, Interpolate, Intricate, Lasting, Leverage, Manifest, Mediate, Nurture, Nuance, Nuanced, Obscure,
Opt, Originates, Perceive, Perpetuate, Permeate, Pivotal, Ponder, Prescribe, Prevailing, Profound, Recapitulate,
Reconcile, Rectify, Rekindle, Reimagine, Scrutinize, Substantiate, Tailor, Testament, Transcend, Traverse,
Underscore, Unveil, Vibrant

Trigger

Activates when the user asks to:

  • Detect, scan, or check for AI-generated patterns in academic text
  • Rewrite or reduce AI traces in English writing
  • 降AI、检测AI痕迹、降低AI检测分数

Example invocations:

  • "De-AI this paragraph" / "降AI这段论文"
  • "Check my paper for AI patterns" / "AI检测并改写"
  • "Scan only -- just show detections" / "只扫描不改写"

Modes

ModeDefaultBehavior
directYesFull detect-then-rewrite two-phase workflow with batch selection
batchSame operation across multiple files with same settings

Default mode: direct. User says "de-AI this" and gets detect + rewrite.

Mode inference: "scan only", "just check", or "只检测" triggers detect-only (skip rewrite phase). "De-AI all sections" or "batch" switches to batch.

References

Required (always loaded)

FilePurpose
references/anti-ai-patterns.mdRisk model, category map, retrieval contract
references/expression-patterns.mdAcademic expression patterns for rewrite quality

Leaf Hints (loaded proactively for detection)

FileWhen to Load
references/anti-ai-patterns/vocabulary.mdAlways -- loaded proactively for full-text scan
references/anti-ai-patterns/sentence-patterns.mdAlways -- loaded proactively for full-text scan
references/anti-ai-patterns/transitions-and-tone.mdAlways -- loaded proactively for full-text scan

Leaf Hints (loaded during rewrite phase)

FileWhen to Load
references/expression-patterns/introduction-and-gap.mdRewriting introduction or background content
references/expression-patterns/methods-and-data.mdRewriting methods or data content
references/expression-patterns/results-and-discussion.mdRewriting results or discussion content
references/expression-patterns/conclusions-and-claims.mdRewriting conclusion content

Loading Rules

  • Load ALL three anti-AI pattern leaves proactively at the start for full-text scanning.
  • Load expression patterns overview at the start; load section-specific leaves during rewrite phase based on detected section type.
  • When a target journal is specified, also load references/journals/[journal].md. If template missing, refuse with message: "Journal template for [X] not found. Available: CEUS."
  • If an anti-AI pattern leaf is missing, warn the user and proceed with reduced detection coverage.

Ask Strategy

Before starting, ask about:

  1. Target journal (if not specified) -- determines style consideration during rewrite
  2. Scope: full paper or specific section (if ambiguous)

Rules:

  • In direct mode, skip pre-questions when the user provides enough context.
  • Never ask more than 2 questions before scanning.
  • Use Structured Interaction when available; fall back to plain-text questions otherwise.

Workflow

Step 0: Workflow Memory Check

  • Read .planning/workflow-memory.json. If file missing or empty, skip to Phase 1.
  • Check if the last 1-2 log entries form a recognized pattern with ppw:de-ai that has appeared >= threshold times in the log. See skill-conventions.md > Workflow Memory > Pattern Detection for the full algorithm.
  • If a pattern is found, present recommendation via AskUserQuestion:
    • Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:de-ai?"
    • Options: "Yes, proceed" / "No, continue normally"
  • If user accepts: set mode to direct, skip Ask Strategy questions.
  • If user declines or AskUserQuestion unavailable: continue in normal mode.

Phase 1: Detect

Step 1 -- Prepare:

  • Load all three anti-AI pattern leaves (vocabulary, sentence-patterns, transitions-and-tone).
  • If target journal specified, load journal template; if missing, refuse.
  • Read user input (file via Read tool, or pasted text from conversation).
  • Opt-out check: Scan the user's trigger prompt for any of these phrases (case-insensitive, exact phrase match): english only, no bilingual, only english, 不要中文. Store result as bilingual_mode (true/false). This flag governs Phase 2 bilingual output below.
  • Record workflow: Append {"skill": "ppw:de-ai", "ts": "<ISO timestamp>"} to .planning/workflow-memory.json. Create file as [] if missing. Drop oldest entry if log length >= 50.

Step 2 -- Scan:

  • Follow the Core Prompt constraints above as the primary instruction set for detection and rewrite.
  • Scan full text against all three pattern dimensions in a single pass.
  • For each match, check domain term protection: if the flagged term is standard domain terminology used in context (e.g., "landscape" in a geography paper, "robust" in a statistics paper), mark as SKIPPED with reason.
  • For Optional-tier matches: only flag if the pattern appears 3+ times in the text. Single occurrences are suppressed to reduce noise.

Step 3 -- Present Detection Report:

  • Summary line: "Found N AI patterns (X High Risk / Y Medium Risk / Z Optional)" plus count of skipped domain terms.
  • Detailed list grouped by risk level (High first, then Medium, then Optional). Each item shows:
[#N] [HIGH RISK] Vocabulary Inflation
  Original: "This groundbreaking approach transforms the analytical framework"
  Pattern: "groundbreaking" -- promotional, exaggerated vocabulary (vocabulary.md)
  Suggestion: "This useful approach improves the analytical framework"

Step 4 -- User Selection:

  • Ask which items to rewrite:
    • "Fix all High Risk"
    • "Fix High + Medium"
    • "Fix all"
    • Specific items by number: "fix 1, 3, 7"

Phase 2: Rewrite

Step 1 -- Group and Rewrite:

  • Group selected items by paragraph. When multiple items appear in the same paragraph, rewrite them together in one pass to maintain coherence.
  • Load relevant expression pattern leaves based on section type for higher quality alternatives beyond the anti-AI replacement column.
  • Restructure expressions -- do not just swap synonyms. Preserve academic meaning and quality.
  • If target journal specified, consider journal style preferences during rewrite.

Step 2 -- Apply Changes:

  • File input: Use Edit tool for in-place modifications. Add % [De-AI] Original: <original text> LaTeX comment on the line immediately before each rewritten passage.
    • Multi-line originals: each line gets its own % [De-AI] Original: prefix.
    • If existing % [De-AI] Original: annotations found, clean them up before adding new ones.
  • Pasted text: Present rewritten version in conversation with before/after comparison for each changed passage.

Step 3 -- Rewrite Report:

FieldContent
Total rewritesApplied N of M detected items
By categoryVocabulary inflation: count, Sentence overclaim: count, Transition smoothing: count
Skipped itemsOptional below threshold, domain terms protected
Word count delta+/- N words

Step 4 -- Bilingual Display:

  • If bilingual_mode is true and input was a file: for each paragraph that was rewritten in Step 1, display a > **[Chinese]** ... blockquote in conversation showing the Chinese translation of the rewritten English text.

  • Use a section header in conversation: "双语对照 / Bilingual Comparison:" before the first blockquote.

  • Format per paragraph:

    [Chinese] [Chinese translation of the rewritten paragraph]

  • Do not insert Chinese into the .tex file. The file remains English-only and submission-ready.

  • If bilingual_mode is false (opt-out detected): skip this step entirely.

  • Pasted text input: if bilingual_mode is true, append the > **[Chinese]** ... blockquote immediately after each rewritten paragraph in the conversation diff output.

Step 5 -- Summary:

  • If further polishing is needed, recommend: "Consider running the Polish Skill for additional refinement."

LaTeX Annotation Format

  • Format: % [De-AI] Original: <original text> on the line immediately before the replacement.
  • Multi-line originals: each line gets its own % [De-AI] Original: prefix.
  • Annotations are valid LaTeX comments -- the file compiles with them present.
  • Cleanup: after user confirms acceptance, remove all lines matching ^% \[De-AI\] Original:.
  • If existing % [De-AI] Original: annotations are found, clean them up before adding new ones.

Output Contract

OutputFormatCondition
Detection reportStructured markdown (summary + detailed list)Always (Phase 1)
Rewritten textIn-place LaTeX with annotations (file) or conversation diff (pasted)Phase 2
Rewrite reportStructured markdown tableAfter Phase 2
Word count deltaIntegerAfter Phase 2
bilingual_conversation> **[Chinese]** ... blockquotes in sessionPhase 2 rewritten paragraphs only. Skipped when opt-out detected.

Edge Cases

SituationHandling
No AI patterns detectedReport "No AI patterns detected" and exit; do not proceed to rewrite
Input too short (< 3 sentences)Warn detection may be unreliable on short text; proceed if user confirms
All detections are domain terms (all skipped)Report "N patterns matched but all identified as domain terminology -- no rewrites needed"
Existing % [De-AI] Original: annotationsClean up old annotations before running new scan
Input language is not EnglishWarn and suggest running Translation Skill first
Journal template missing when journal specifiedRefuse: "Journal template for [X] not found. Available: CEUS."
Very long input (10+ pages)Process in sections; maintain cross-section awareness

Fallbacks

ScenarioFallback
Structured Interaction unavailableAsk 1-2 plain-text questions (journal + scope)
Anti-AI pattern leaf missingWarn user, proceed with available modules (reduced detection coverage)
Expression pattern leaf missingUse overview entrypoint for general rewrite patterns
Target journal not specifiedAsk once; if declined, use general academic style for rewrites
File is read-only or Edit failsPresent changes as a diff in conversation; user applies manually

Skill: de-ai-skill Conventions: references/skill-conventions.md

Purpose

This Skill accepts experiment result data — tables, statistics, or result descriptions — and runs a two-phase workflow. Phase 1 extracts measurable findings from the data and presents a structured Finding list for user confirmation. Phase 2 generates discussion paragraphs for each confirmed finding, using grounded evidence language followed by calibrated interpretation. Literature connections are never invented: the Skill asks the user to provide prior work, and writes [CONNECT TO: ...] placeholders when none is supplied. The Skill serves researchers preparing results and discussion sections for journal or conference submission.

Core Prompt

Source: awesome-ai-research-writing — 实验分析

# Role
你是一位具有敏锐洞察力的资深数据科学家,擅长处理复杂的实验数据并撰写高质量的学术分析报告。

# Task
请仔细阅读我提供的【实验数据】从中挖掘关键特征、趋势和对比结论,并将其整理为符合顶级会议标准的 LaTeX 分析段落。

# Constraints
1. 数据真实性:
   - 所有结论必须严格基于输入的数据。严禁编造数据、夸大提升幅度或捏造不存在的实验现象。
   - 如果数据中没有明显的优势或趋势,请如实描述,不要强行总结所谓的显著提升。

2. 分析深度:
   - 拒绝简单的报账式描述(例如不要只说 A 是 0.5,B 是 0.6),重点在于比较和趋势分析。
   - 关注点包括:方法的有效性(SOTA 比较)、参数的敏感性、性能与效率的权衡,以及消融实验中的关键模块贡献。

3. 排版与格式规范:
   - 严禁使用加粗或斜体:正文中不要使用 \textbf 或 \emph,依靠文字逻辑来表达重点。
   - 结构强制:必须使用 \paragraph{核心结论} + 分析文本 的形式。
     * \paragraph{} 中填写高度凝练的短语结论(使用 Title Case 格式)。
     * 紧接着在同一段落中展开具体的数值分析和逻辑推演。
   - 不要使用列表环境,保持纯文本段落。

4. 输出格式:
   - Part 1 [LaTeX]:只输出分析后的 LaTeX 代码。
     * 必须对特殊字符进行转义(例如:`%`、`_`、`&`)。
     * 保持数学公式原样(保留 `$` 符号)。
     * 不同的结论点之间请空一行。
   - Part 2 [Translation]:对应的中文直译(用于核对数据结论是否准确)。
   - 除以上两部分外,不要输出任何多余的对话。

Trigger

Activates when the user asks to:

  • Analyze experiment results, identify patterns, or extract findings from result data
  • Generate discussion paragraphs from confirmed findings
  • 分析实验结果、识别规律、生成讨论段落

Example invocations:

  • "Analyze my results table and write discussion"
  • "帮我分析实验结果并写讨论段"
  • "Generate discussion paragraphs for my findings"
  • "What patterns do my experiment results show?"

Modes

ModeDefaultBehavior
directYesFull two-phase workflow: Phase 1 finding list → user confirm → Phase 2 discussion
batchNot supported — experiment analysis requires full context of the complete results set

Default mode: direct. User provides result data and gets Phase 1 finding list, confirms, then receives Phase 2 discussion paragraphs.

Mode inference: "Just identify findings" or "只分析不写讨论" runs Phase 1 only.

References

Required (always loaded)

FilePurpose
references/expression-patterns.mdExpression patterns overview; loaded at Phase 1 start

Leaf Hints (loaded in Phase 2)

FileWhen to Load
references/expression-patterns/results-and-discussion.mdAlways in Phase 2 — result reporting and pattern interpretation language
references/expression-patterns/conclusions-and-claims.mdAlways in Phase 2 — calibrated claim language (suggests, indicates, scope)
references/expression-patterns/methods-and-data.mdIn Phase 2 if user's result description includes method details needing clarification
references/anti-ai-patterns/vocabulary.mdIn Phase 2 — screen generated output for AI-sounding vocabulary

Conditional

FileWhen to Load
references/journals/[journal].mdWhen user specifies a target journal. If missing, refuse: "Journal template for [X] not found. Available: CEUS."

Ask Strategy

Before starting, ask about:

  1. Research questions: "What are the main research questions this experiment addresses?" (Required — Phase 2 uses these to connect findings to purpose)
  2. Prior work to connect to: "Which papers or findings should the discussion reference?" (Optional — ask once; if declined, use [CONNECT TO: ...] placeholders in Phase 2)
  3. Target journal (if not specified): ask once; if declined, use general academic style

Rules:

  • Never ask more than 3 questions before starting Phase 1
  • Research questions are mandatory; the Skill cannot produce grounded Phase 2 output without them
  • If the user declines to provide research questions, write [RESEARCH QUESTION: describe your RQ here] placeholders rather than blocking the workflow entirely

Workflow

Step 0: Workflow Memory Check

  • Read .planning/workflow-memory.json. If file missing or empty, skip to Phase 1.
  • Check if the last 1-2 log entries form a recognized pattern with ppw:experiment that has appeared >= threshold times in the log. See skill-conventions.md > Workflow Memory > Pattern Detection for the full algorithm.
  • If a pattern is found, present recommendation via AskUserQuestion:
    • Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:experiment?"
    • Options: "Yes, proceed" / "No, continue normally"
  • If user accepts: set mode to direct, skip Ask Strategy questions.
  • If user declines or AskUserQuestion unavailable: continue in normal mode.

Phase 1: Analyze Results

Step 1 — Prepare:

  • Load references/expression-patterns.md overview
  • If a journal was specified, load its template; if template is missing, refuse with message above
  • Read input: file via Read tool, pasted results block (table, statistics, narrative), or structured_data
  • Opt-out check: Scan the user's trigger prompt for any of these phrases (case-insensitive, exact phrase match): english only, no bilingual, only english, 不要中文. Store result as bilingual_mode (true/false). This flag governs Phase 2 bilingual output below.
  • Guard — measurable data required: if input is vague (e.g., "my results show improvement" without values, comparisons, or metrics), refuse: "Please provide specific values, comparisons, or metrics before I can identify findings."
  • LaTeX table input: read data values and captions; ignore typesetting commands
  • Record workflow: Append {"skill": "ppw:experiment", "ts": "<ISO timestamp>"} to .planning/workflow-memory.json. Create file as [] if missing. Drop oldest entry if log length >= 50.

Step 2 — Extract Findings:

  • Identify measurable comparisons: method A vs. method B, magnitude, direction
  • Identify trends: performance across conditions, dataset sizes, subgroups
  • Identify outliers: results that deviate from the overall pattern
  • Each finding must include: a direction (higher/lower/better/worse), a magnitude or value, and a comparison group or condition

Step 3 — Present Finding List:

  • Use locked format per item:
    Finding 1: [subject] [comparison/trend] [value] on [metric/condition]
    Finding 2: Performance degrades in [condition] ([N] vs. [M])
    Finding 3: [Subgroup] shows the largest effect ([value])
    
  • Summary line: "Identified N findings. Please confirm, correct, or add before I write discussion."
  • Wait for user approval before proceeding to Phase 2

Phase 2: Generate Discussion

Step 1 — Prepare:

  • Load references/expression-patterns/results-and-discussion.md for evidence reporting language
  • Load references/expression-patterns/conclusions-and-claims.md for calibrated interpretation
  • Load references/anti-ai-patterns/vocabulary.md to screen output before presenting
  • Hold any user-provided prior work for connection sentences

Step 2 — Write Discussion Paragraphs:

  • Follow the Core Prompt constraints above as the primary instruction set for analysis and output formatting.
  • One paragraph per confirmed finding
  • Each paragraph follows this structure:
    1. Evidence sentence: state the finding with full quantification (use results-and-discussion.md patterns for comparative and trend language)
    2. Interpretation sentence: claim using calibrated language from conclusions-and-claims.md ("suggests", "indicates" — never lead with interpretation before evidence)
    3. Connection sentence: if user provided prior work, connect the finding to it; otherwise write [CONNECT TO: describe the prior finding here]
  • CRITICAL rule: Interpretation sentence must follow the evidence sentence. Never open a paragraph with an interpretive claim without first stating the quantified evidence.
  • After generating all paragraphs, check output against vocabulary.md; revise any flagged patterns

Step 3 — Output:

  • Present all discussion paragraphs in sequence

  • Bilingual display: If bilingual_mode is true: after each discussion paragraph, append a > **[Chinese]** ... blockquote containing the Chinese translation of that paragraph. Use a section header "双语对照 / Bilingual Comparison:" before the first paragraph. Format per finding paragraph:

    [English discussion paragraph for Finding N]

    [Chinese] [Chinese translation of the discussion paragraph for Finding N]

  • Do not insert Chinese into any written file. If the user requested writing discussion to the paper file via Write tool, write English-only paragraphs to the file; the Chinese blockquotes remain in conversation only.

  • If bilingual_mode is false (opt-out detected): skip bilingual display entirely.

  • If file input was used, offer to append discussion to file using Write tool

  • Recommend Polish Skill for further expression refinement if higher-register prose is desired

Output Contract

OutputFormatCondition
pattern_analysisStructured Finding list (Finding N: format)Always — Phase 1
discussion_paragraphsOne paragraph per confirmed findingPhase 2 only, after Phase 1 confirmation
bilingual_discussion> **[Chinese]** ... blockquotes in session (one per finding paragraph)Phase 2 only. Skipped when opt-out detected. Not written to file.

Note: Phase 2 output cannot be produced without Phase 1 confirmation. If user skips Phase 1 and requests discussion directly, require Phase 1 completion first.

Edge Cases

SituationHandling
Input is vague (no measurable values)Refuse Phase 1 with: "Please provide specific values, comparisons, or metrics before I can identify findings."
User skips Phase 1 and asks for discussionRequire Phase 1 completion first; do not generate paragraphs without confirmed findings
User provides no research questionsAsk once; if declined, write [RESEARCH QUESTION: describe your RQ here] placeholders
User provides no prior literatureUse [CONNECT TO: ...] placeholders; do not attempt to name papers or authors
Only one finding identifiedProduce a single discussion paragraph; do not pad or invent additional findings
Finding conflicts with user-stated hypothesisFlag the discrepancy explicitly; do not suppress the conflicting result
Journal specified but template missingRefuse: "Journal template for [X] not found. Available: CEUS."
Input is LaTeX table markupRead data values and captions; ignore typesetting commands
Phase 1 produces no findingsReport "No measurable findings identified from input" and stop

Fallbacks

ScenarioFallback
Structured Interaction unavailableAsk 1-3 plain-text questions: research questions, prior work, target journal
Expression pattern leaf missingProceed with general academic register; warn user of reduced quality
Write tool failsPresent discussion paragraphs in conversation; user saves manually
Phase 1 produces no findingsReport clearly and stop; do not proceed to Phase 2

Examples

Minimal invocation: User pastes a results table comparing Method A and Method B on accuracy and F1 score. User states RQ: "Does our approach outperform the baseline on both metrics?"

Phase 1 output:

Finding 1: Method A outperforms Method B by 3.2 percentage points on accuracy (87.4% vs. 84.2%)
Finding 2: Method A outperforms Method B by 4.1 points on F1 score (82.6 vs. 78.5)

Identified 2 findings. Please confirm, correct, or add before I write discussion.

User confirms. No prior work provided.

Phase 2 output (Finding 1):

Method A achieves 87.4% accuracy, outperforming Method B by 3.2 percentage points (84.2%).
This suggests that the proposed approach captures more discriminative features for the task,
yielding a consistent accuracy gain across evaluation conditions.
[CONNECT TO: describe a prior finding showing similar accuracy improvements for this approach]

Skill: experiment-skill Conventions: references/skill-conventions.md

Purpose

This Skill searches academic literature using the Semantic Scholar MCP, presents an interactive numbered result list (up to 10 papers), waits for the user to select a specific paper, then generates a verified BibTeX entry built exclusively from MCP-returned data. Before any workflow begins, a pre-flight probe confirms MCP availability — if unavailable, the Skill refuses immediately with setup instructions rather than proceeding with degraded capability. After the user selects a paper, a mandatory anti-hallucination verification prompt reminds the user to confirm the paper's actual relevance before committing the citation. This Skill does not write or rewrite paper content; it searches, selects, and generates citation entries only.

Trigger

Activates when the user asks to:

  • Search or find academic papers on a topic
  • Generate BibTeX or citation entries for a reference
  • 帮我找文献、检索相关论文、帮我生成引用格式

Example invocations:

  • "Find papers about urban heat island" / "帮我找关于城市热岛的文献"
  • "Search literature for spatiotemporal analysis" / "检索时空分析相关文献"
  • "Generate BibTeX for a citation" / "帮我生成BibTeX引用格式"

Modes

ModeDefaultBehavior
directYesSingle-shot search → result list → user selects → BibTeX generated; no iteration
batchNot supported — each search requires user selection in session

Default mode: direct. Search is single-shot: if results are unsatisfactory, user re-triggers the Skill with different keywords.

References

Required (always loaded)

None. This is a search task — no expression pattern files needed.

Leaf Hints

None.

No reference files loaded. All paper metadata sourced from Semantic Scholar MCP at runtime.

Ask Strategy

The Skill collects search inputs conversationally. At most two questions:

  1. Search query (required): the topic or keyword to search — ask only if not provided in the trigger message.
  2. Result count (optional): how many results to display. Default: 5. Maximum: 10.

If the user provides the topic in the trigger message, skip question 1 and proceed immediately.

Workflow

Step 0: Workflow Memory Check

  • Read .planning/workflow-memory.json. If file missing or empty, skip to Step 1.
  • Check if the last 1-2 log entries form a recognized pattern with ppw:literature that has appeared >= threshold times in the log. See skill-conventions.md > Workflow Memory > Pattern Detection for the full algorithm.
  • If a pattern is found, present recommendation via AskUserQuestion:
    • Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:literature?"
    • Options: "Yes, proceed" / "No, continue normally"
  • If user accepts: set mode to direct, skip Ask Strategy questions.
  • If user declines or AskUserQuestion unavailable: continue in normal mode.

Step 1: MCP Pre-flight Check

  1. Call mcp__semantic-scholar__papers-search-basic with {"query": "test", "limit": 1}.

  2. If the call succeeds: proceed to Step 2.

  3. If the call fails or tool is unavailable: refuse immediately with:

    "Semantic Scholar MCP is not available. To use this Skill:

    1. Open Claude Code Settings → MCP Servers
    2. Add the Semantic Scholar server (server key: semanticscholar)
    3. Restart Claude Code and retry"

    Do NOT proceed past this point if MCP is unavailable.

Step 2: Collect Search Query

  1. Extract the search topic from the trigger message if present.
  2. If topic not provided, ask: "What topic or keywords should I search for?"
  3. Confirm result count (default: 5).
  • Record workflow: Append {"skill": "ppw:literature", "ts": "<ISO timestamp>"} to .planning/workflow-memory.json. Create file as [] if missing. Drop oldest entry if log length >= 50.

Step 3: Execute Search and Build Result Cards

  1. Call mcp__semantic-scholar__papers-search-basic with the user's query and result count.

  2. For each returned paper: if the abstract field is empty in the search result, call mcp__semantic-scholar__get-paper-abstract to fetch an abstract excerpt.

  3. Display numbered result cards in this exact format:

    **[1] Title of the Paper**
    Authors: Smith, J.; Lee, K. · Year: 2023 · Citations: 142
    > "One sentence from abstract describing the core contribution..."
    
    **[2] Another Relevant Paper**
    Authors: Zhang, W. · Year: 2022 · Citations: 89
    > "Abstract not available"
    
  4. End the display with: "Please select a paper (enter number), or type 'none' to cancel."

Step 4: User Selection

  1. Wait for the user to enter a number or "none".

  2. If "none": respond "Search cancelled." and end the session.

  3. If out-of-range number: ask the user to re-enter a valid number from the displayed list.

  4. If valid number: confirm the selection by restating the paper title.

  5. Display the mandatory verification prompt (never omit):

    "Please confirm that the selected paper actually supports the claim you are citing — do not rely solely on the title."

Step 5: Generate BibTeX

  1. Construct the BibTeX entry using only fields returned by the MCP for the selected paper.

  2. Citation key format: firstAuthorLastnameLowercaseYYYYfirstKeyword (e.g., smith2023urban).

  3. Use @article for journal papers, @inproceedings for conference papers, @misc for preprints — follow the paper type returned by MCP.

  4. If any field (volume, pages, DOI) is not returned by MCP, omit that field — never fill from prior knowledge.

  5. Display the BibTeX in a code fence:

    @article{smith2023urban,
      title     = {Full title from MCP},
      author    = {Last, First and Last2, First2},
      journal   = {Journal name from MCP},
      year      = {2023},
      volume    = {101},
      pages     = {101943},
      doi       = {10.1016/j.compenvurbsys.2023.101943}
    }
    

Output Contract

OutputFormatCondition
bibtex_entryBibTeX code block (@article, @inproceedings, or @misc)After user selects a paper

All field values must come from the MCP-returned paper record. Never supply missing fields from prior knowledge — omit them instead.

Example BibTeX (all fields from MCP data):

@article{li2022spatiotemporal,
  title  = {Spatiotemporal Analysis of Urban Land Use Change},
  author = {Li, Wei and Wang, Fang},
  journal = {Computers, Environment and Urban Systems},
  year   = {2022},
  volume = {95},
  pages  = {101812},
  doi    = {10.1016/j.compenvurbsys.2022.101812}
}

Edge Cases

SituationHandling
MCP pre-flight failsRefuse with exact setup instructions from Step 1; never proceed to search
Search returns zero results"No papers found for '[query]'. Try broader keywords or re-trigger with different terms."
Abstract field missing for a resultShow "Abstract not available" in result card; do not skip the paper
User selects out-of-range numberAsk to re-enter a valid number from the displayed list
User types "none""Search cancelled." — end session
MCP returns non-article typeUse @inproceedings or @misc as appropriate; never force @article
DOI not returned by MCPOmit doi field; add comment: % DOI not available — please verify manually

Fallbacks

ScenarioFallback
Semantic Scholar MCP unavailableRefuse immediately with setup guidance (Step 1 handles this); no partial fallback mode
get-paper-abstract call fails for one paperMark abstract as "Abstract not available"; continue displaying remaining results
Structured Interaction unavailableAsk search query as plain-text question; proceed with numbered list in conversation
Basic search returns poor resultsInform user: "If results are poor, re-trigger the Skill with more specific keywords" (single-shot only)

Examples

User: "Find papers about urban heat island mitigation"

Skill: [Pre-flight check passes silently] → Calls mcp__semantic-scholar__papers-search-basic with {"query": "urban heat island mitigation", "limit": 5} → Displays results:

**[1] Urban Heat Island Mitigation through Green Infrastructure**
Authors: Smith, J.; Lee, K. · Year: 2023 · Citations: 142
> "This study evaluates green roof and tree-planting strategies for reducing UHI intensity in dense urban cores."

**[2] Cool Pavements and Their Effect on Urban Thermal Comfort**
Authors: Zhang, W.; Chen, L. · Year: 2022 · Citations: 89
> "A field experiment comparing reflective pavement materials across five climate zones."

Please select a paper (enter number), or type "none" to cancel.

User: "1"

Skill: "You selected: Urban Heat Island Mitigation through Green Infrastructure (Smith, J.; Lee, K., 2023)."

"Please confirm that the selected paper actually supports the claim you are citing — do not rely solely on the title."

Skill (after user confirms):

@article{smith2023urban,
  title   = {Urban Heat Island Mitigation through Green Infrastructure},
  author  = {Smith, John and Lee, Kwang-Ho},
  journal = {Computers, Environment and Urban Systems},
  year    = {2023},
  volume  = {101},
  pages   = {101943},
  doi     = {10.1016/j.compenvurbsys.2023.101943}
}

Skill: literature-skill Conventions: references/skill-conventions.md

Purpose

This Skill reads a full academic paper and verifies logical consistency across its sections. It identifies four types of issues — argument chain gaps (AC-), unsupported claims (UC-), terminology inconsistencies (TI-), and number contradictions (NC-) — and produces a two-part bilingual report. Part 1 maps each section's primary claim as an Argument Chain View table, showing how claims connect (or fail to connect) from Introduction through Conclusion. Part 2 categorizes every identified issue with a problem description, an impact statement, and a one-sentence directional suggestion, each followed by an inline Chinese translation. The Skill never rewrites text; it identifies and suggests only.

Core Prompt

Source: awesome-ai-research-writing — 逻辑检查

# Role
你是一位负责论文终稿校对的学术助手。你的任务是进行"红线审查",确保论文没有致命错误。

# Task
请对我提供的【英文 LaTeX 代码片段】进行最后的一致性与逻辑核对。

# Constraints
1. 审查阈值(高容忍度):
   - 默认假设:请预设当前的草稿已经经过了多轮修改与校正,质量较高。
   - 仅报错原则:只有在遇到阻碍读者理解的逻辑断层、引起歧义的术语混乱、或严重的语法错误时才提出意见。
   - 严禁优化:对于"可改可不改"的风格问题、或者仅仅是"换个词听起来更高级"的建议,请直接忽略,不要通过挑刺来体现你的存在感。

2. 审查维度:
   - 致命逻辑:是否存在前后完全矛盾的陈述?
   - 术语一致性:核心概念是否在没有说明的情况下换了名字?
   - 严重语病:是否存在导致句意不清的中式英语(Chinglish)或语法结构错误。

3. 输出格式:
   - 如果没有上述"必须修改"的错误,请直接输出中文:[检测通过,无实质性问题]。
   - 如果有问题,请使用中文分点简要指出,不要长篇大论。

Trigger

Activates when the user asks to:

  • Check, verify, or find logical problems in their paper
  • 检查论文逻辑、验证论证链、帮我找逻辑问题

Example invocations:

  • "Check the logic of my paper" / "检查我的论文逻辑"
  • "Verify argument chain across sections" / "验证论文各章节论证是否自洽"
  • "Find logical inconsistencies in my draft" / "帮我找论文里的逻辑问题"

Modes

ModeDefaultBehavior
directYesSingle-pass full-paper analysis, no intermediate confirmation steps
batchNot supported — cross-section logic verification requires full-paper context

Default mode: direct. User provides the paper and receives a complete two-part logic report.

References

Required (always loaded)

Logic verification loads references/bilingual-output.md to govern the Chinese translation format and opt-out behavior. No expression pattern leaves are needed, and anti-AI patterns are not loaded (consistent with Reviewer Simulation Skill convention). Logic verification is also journal-agnostic; no journal templates are loaded.

Leaf Hints

None.

Ask Strategy

Before starting, ask about:

  1. Input format: file path or pasted text? (skip if obvious from how the user invoked the Skill)
  2. Section structure: ask only if section boundaries are unclear from the input (e.g., unnumbered prose without headings)

Rules:

  • In direct mode with sufficient input, proceed without pre-questions.
  • Do not ask more than 1 question before starting analysis.
  • Use Structured Interaction when available; fall back to a single plain-text question otherwise.

Workflow

Step 0: Workflow Memory Check

  • Read .planning/workflow-memory.json. If file missing or empty, skip to Step 1.
  • Check if the last 1-2 log entries form a recognized pattern with ppw:logic that has appeared >= threshold times in the log. See skill-conventions.md > Workflow Memory > Pattern Detection for the full algorithm.
  • If a pattern is found, present recommendation via AskUserQuestion:
    • Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:logic?"
    • Options: "Yes, proceed" / "No, continue normally"
  • If user accepts: set mode to direct, skip Ask Strategy questions.
  • If user declines or AskUserQuestion unavailable: continue in normal mode.

Step 1 — Input Guard

  • Accept input as a file path (Read tool) or pasted text from conversation.
  • Full-paper guard: If input appears to be partial — single section heading only, fewer than ~500 words, or missing Methods/Results/Discussion markers — refuse with:

    "Cross-section verification requires the full paper. Please provide the complete manuscript."

  • Parse section structure: identify section boundaries and titles exactly as they appear in the paper.
  • Record workflow: Append {"skill": "ppw:logic", "ts": "<ISO timestamp>"} to .planning/workflow-memory.json. Create file as [] if missing. Drop oldest entry if log length >= 50.

Step 2 — Analyze Four Issue Types

  • Follow the Core Prompt constraints above as the primary instruction set — especially the high-tolerance threshold and the "仅报错原则".

Run all four issue-type checks before building the Argument Chain View table. The table Status column is derived from the issues found in this step.

Argument Chain Gaps (AC-)
  • Map each section's primary research claim or contribution.
  • Check: Does the Introduction claim get supported by the Methods design?
  • Check: Do the Results address the measurements stated in Methods?
  • Check: Does the Discussion draw conclusions that follow from the Results?
  • Check: Does the Conclusion match the findings stated in the Discussion?
  • For each chain break, create Issue AC-N with the relevant section references.
Unsupported Claims (UC-)
  • Scan for assertive statements that lack evidence, a citation, or a data reference.
  • Focus on bold claims in Introduction and Discussion sections.
  • For each unsupported claim, create Issue UC-N quoting the exact claim text.
Terminology Inconsistencies (TI-)
  • Track all technical terms and model/method names introduced in the Introduction.
  • Compare usage across all sections for variation: explicit renames, abbreviations introduced mid-paper, mixed use of formal and informal names.
  • For each inconsistency, create Issue TI-N quoting ALL variant terms verbatim with their section locations.
  • If an abbreviation is defined on first use in the Introduction, do not flag it as an inconsistency.
Number Contradictions (NC-)
  • Extract quantitative values stated in the Introduction (sample size, accuracy claims, improvement figures).
  • Compare against values stated in Results and Conclusion.
  • For each discrepancy, create Issue NC-N quoting both values and their locations.
  • Ignore numbers in non-quantitative contexts (figure labels, section numbers, footnote markers).

Step 3 — Build Part 1 Argument Chain View

  • After AC- analysis is complete, build the table using analysis evidence.
  • Status = "Connected" only when no AC- issue spans that section pair.
  • Status = "Gap" when one or more AC- issues involve that section transition.
  • Use section titles exactly as they appear in the paper.

Step 4 — Write Report

  • Opt-out check: Before assembling the report, scan the user's original trigger prompt for any of these phrases (case-insensitive, exact phrase match): english only, no bilingual, only english, 不要中文. If any phrase is detected: omit all > **[Chinese]** ... blockquotes from the report -- produce English-only issue entries. If none detected: include Chinese blockquotes as normal.
  • Assemble the two-part report (see Output Contract for locked format).
  • Report presents Part 1 table first (readability), then Part 2 categorized issues.
  • File input: Derive output filename as {input_filename_without_ext}_logic.md; write using Write tool.
  • Pasted text input: Present report in conversation.
  • State issue count summary at the end: "Found N issues: X AC-, Y UC-, Z TI-, W NC-."

Output Contract

OutputFormatCondition
logic_reportMarkdown file {input_filename_without_ext}_logic.mdFile input
logic_reportConversation outputPasted text input

Locked two-part report format:

# Logic Verification Report

**Paper:** [title or filename]
**Date:** [date]

## Part 1 — Argument Chain View

| Section | Primary Claim | Connects To | Status |
|---------|--------------|-------------|--------|
| Introduction | [claim] | Methods | Connected / Gap |
| Methods | [claim] | Results | Connected / Gap |
| Results | [claim] | Discussion | Connected / Gap |
| Discussion | [claim] | Conclusion | Connected / Gap |
| Conclusion | [claim] | — | Terminal |

## Part 2 — Categorized Issue List

### Argument Chain Gaps

**Issue AC-1: [Descriptive Title]**
**Section:** [Introduction]
**Problem:** [description]
**Why this matters:** [impact on argument coherence]
**Suggestion:** [one-sentence directional suggestion]
> **[Chinese]** 问题:... 为什么重要:... 建议:...

### Unsupported Claims

**Issue UC-1: [Descriptive Title]**
[same three-part structure + Chinese blockquote]

### Terminology Inconsistencies

**Issue TI-1: [Descriptive Title]**
[same structure — quote exact verbatim terms from the paper]

### Number Contradictions

**Issue NC-1: [Descriptive Title]**
[same structure]

Notes:

  • Part 1 Argument Chain View table is English only (structural, not language-sensitive).
  • Part 2 issue entries are bilingual: English problem/why/suggestion followed immediately by > **[Chinese]** ... blockquote.
  • Issue numbering is consecutive within each category (AC-1, AC-2, …; UC-1, UC-2, …).

Edge Cases

SituationHandling
Input is partial (single section or < 500 words)Refuse: "Cross-section verification requires the full paper. Please provide the complete manuscript."
Paper has no Discussion (e.g., Results → Conclusion directly)Adapt chain view to actual sections present; note missing sections in the table with "N/A"
Paper uses Chinese section titlesUse Chinese titles as-is in the table and all section references
No issues found in a categoryInclude the category heading in Part 2 with "No issues identified in this category."
User asks Skill to rewrite identified issuesDecline: "This Skill identifies issues and suggests directions only. Use the Polish Skill for rewriting."
Numbers appear in non-quantitative context (figure labels, section numbers)Ignore; focus on empirical claims and quantitative results only
Abbreviation is defined on first use in IntroductionDo not flag as a TI- inconsistency; defined abbreviations are intentional

Fallbacks

ScenarioFallback
Structured Interaction unavailableProceed in direct mode without pre-questions; ask file-vs-pasted via plain text only if genuinely unclear
Read tool fails (file not found or unreadable)Ask user to paste the paper text instead
Write tool failsPresent the logic report in conversation; advise user to save manually as _logic.md
Paper is extremely long (> 20,000 words)Warn: "Analysis may be approximate for very long manuscripts." Offer to focus on specific section pairs if needed

Examples

Minimal invocation (file input):

User: "Check the logic of my draft: /papers/urban_model.pdf"

Ask Strategy (direct mode — file path provided, proceeding without pre-questions)

Step 2 analysis runs: AC-1 found (Introduction→Methods chain break), TI-1 found (terminology variant) Step 3 derives Status column from AC-1

Truncated output (urban_model_logic.md):

# Logic Verification Report

**Paper:** urban_model.pdf
**Date:** 2026-03-12

## Part 1 — Argument Chain View

| Section | Primary Claim | Connects To | Status |
|---------|--------------|-------------|--------|
| Introduction | Urban sprawl prediction framework proposed | Methods | Gap |
| Methods | Gradient boosting model trained on parcel data | Results | Connected |
| Results | 82% accuracy on hold-out set | Discussion | Connected |
| Discussion | Model generalizes to mid-size cities | Conclusion | Connected |
| Conclusion | Framework advances urban planning practice | — | Terminal |

## Part 2 — Categorized Issue List

### Argument Chain Gaps

**Issue AC-1: Introduction Framework Not Reflected in Methods Design**
**Section:** [Introduction], [Methods]
**Problem:** The Introduction proposes a "multi-scale prediction framework," but Methods describes a single-scale gradient boosting model with no multi-scale architecture.
**Why this matters:** Reviewers will note the mismatch between the stated contribution and the actual implementation, undermining the novelty claim.
**Suggestion:** Either update the Introduction to describe a single-scale model, or add a multi-scale component to Methods with justification.
> **[Chinese]** 问题:引言提出"多尺度预测框架",但方法章节仅描述单尺度梯度提升模型,无多尺度架构。为什么重要:审稿人会注意到声明贡献与实际实现之间的不一致,削弱新颖性声明。建议:修改引言以描述单尺度模型,或在方法中补充多尺度组件并加以说明。

### Unsupported Claims

No issues identified in this category.

### Terminology Inconsistencies

**Issue TI-1: "Urban Sprawl Prediction Framework" vs. "Urban Growth Model"**
**Section:** [Introduction, 第2段], [Methods, 第1段]
**Problem:** The Introduction uses "urban sprawl prediction framework" while Methods refers to the same system as "urban growth model" without an explicit rename or definition.
**Why this matters:** Readers and reviewers may interpret these as different systems, reducing clarity.
**Suggestion:** Choose one term and use it consistently throughout, or introduce the alternative as a defined synonym on first use.
> **[Chinese]** 问题:引言使用"城市蔓延预测框架",方法章节将同一系统称为"城市增长模型",未作明确说明。为什么重要:读者和审稿人可能将其理解为不同系统,降低论文清晰度。建议:统一使用一个术语,或在首次出现时将替代名称定义为同义词。

### Number Contradictions

No issues identified in this category.

Found 2 issues: 1 AC-, 0 UC-, 1 TI-, 0 NC-.


Skill: logic-skill Conventions: references/skill-conventions.md

Purpose

This Skill polishes English academic text for journal submission through two modes: Quick-fix (default, intelligent single-pass) and Guided (fixed three-step: structure, logic, expression). For file input, it edits the original file in-place using the Edit tool and preserves originals as LaTeX comment annotations for traceability. For pasted text, polished output is presented directly in conversation. The Skill adapts to journal-specific style when a target journal is specified, detects translationese automatically, and avoids high-frequency AI vocabulary by loading anti-AI patterns proactively.

Core Prompt

Source: awesome-ai-research-writing — 表达润色(英文论文)

# Role
你是一位计算机科学领域的资深学术编辑,专注于提升顶级会议(如 NeurIPS, ICLR, ICML)投稿论文的语言质量。

# Task
请对我提供的【英文 LaTeX 代码片段】进行深度润色与重写。你的目标不仅仅是修正错误,而是要全面提升文本的学术严谨性、清晰度与整体可读性,使其达到零错误的最高出版水准。

# Constraints
1. 学术规范与句式优化(核心任务):
   - 严谨性提升:调整句式结构以适配顶级会议的写作规范,增强文本的正式性与逻辑连贯性。
   - 句法打磨:优化长难句的表达,使其更加流畅自然;消除由于非母语写作导致的生硬表达。
   - 零错误原则:彻底修正所有拼写、语法、标点及冠词使用错误。

2. 词汇与语体控制:
   - 正式语体:必须使用标准的学术书面语。严禁使用缩写形式(例如:必须使用 it is 而非 it's,使用 does not 而非 doesn't)。
   - 词汇选择:拒绝堆砌华丽辞藻或生僻词汇。仅使用科研领域通用、易理解的词汇(Simple & Clear),确保文本清晰、简洁。
   - 所有格与结构:避免使用名词所有格形式(尤其是方法名、模型名或系统名 + 's)。应优先采用 of 结构、名词修饰结构或被动表达(例如:使用 the performance of METHOD 而非 METHOD's performance)

3. 内容与格式保持:
   - 术语维持:不要展开常见的领域缩写(例如:保持 LLM 原样,不要展开为 Large Language Models)。
   - 命令保留:严格保留原文中的 LaTeX 命令(如 `\cite{}`, `\ref{}`, `\eg`, `\ie` 等)。
   - 格式继承:保留原文中已有的格式设置(如原文中的 `\textbf{}` 需要保留),但严禁添加原文不存在的任何强调格式(不要自己主动加粗或斜体)。

4. 结构要求:
   - 严禁列表化:不要将段落改写为 item 列表,必须保持完整的段落结构。

5. 输出格式:
   - Part 1 [LaTeX]:只输出润色后的英文 LaTeX 代码。
     * 必须对特殊字符进行转义(例如:`%`、`_`、`&`)。
     * 保持数学公式原样(保留 `$` 符号)。
   - Part 2 [Translation]:对应的中文直译。
     * 严禁在中文名词后使用括号标注英文(拒绝双语冗余)。
   - Part 3 [Modification Log]:使用中文简要说明主要的润色点(例如:优化了句式结构,增强了学术语气,修正了语法错误)。
   - 除以上三部分外,不要输出任何多余的对话。

Trigger

Activates when the user asks to:

  • Polish, improve, or refine English academic text
  • 润色、改善、优化英文学术文本

Example invocations:

  • "Polish this paragraph for CEUS" / "润色这段英文"
  • "Guided polish my methods section" / "引导模式润色方法部分"
  • "Quick fix my introduction" / "帮我快速润色引言"
  • "Polish all sections in my paper"

Modes

ModeDefaultBehavior
direct (Quick-fix)YesIntelligent single-pass polish, minimal interaction
guidedThree-step flow: structure, logic, expression with checklist at each step
batchQuick-fix across multiple sections/files with same settings

Default mode: direct (Quick-fix). User says "polish this" and gets polished output.

Mode inference: "guided polish", "step by step", or "引导模式" switches to guided. "Polish all sections" or "batch" switches to batch.

References

Required (always loaded)

FilePurpose
references/expression-patterns.mdAcademic expression patterns overview and module index

Leaf Hints (loaded when needed)

FileWhen to Load
references/expression-patterns/introduction-and-gap.mdPolishing introduction or background content
references/expression-patterns/methods-and-data.mdPolishing methods, data, or study area content
references/expression-patterns/results-and-discussion.mdPolishing results or discussion content
references/expression-patterns/conclusions-and-claims.mdPolishing conclusion content
references/expression-patterns/geography-domain.mdContent involves spatial, urban, or planning topics
references/anti-ai-patterns/vocabulary.mdAlways -- loaded proactively for vocabulary screening
references/anti-ai-patterns/sentence-patterns.mdAlways -- loaded proactively for sentence pattern screening
references/anti-ai-patterns/transitions-and-tone.mdAlways -- loaded proactively for transition screening

Loading Rules

  • Load expression patterns overview at the start; select the appropriate leaf based on section type.
  • Load ALL three anti-AI pattern leaves proactively (vocabulary, sentence-patterns, transitions-and-tone).
  • When a target journal is specified, also load references/journals/[journal].md.
  • Load geography-domain.md when spatial, urban, or planning content is detected.
  • If a reference file is missing, warn the user and proceed with reduced capability (except journal templates; see Fallbacks).

Ask Strategy

Before starting, ask about:

  1. Target journal (if not specified in trigger) -- determines style loading
  2. Which section this text belongs to (only if ambiguous from content or headers)
  3. In guided mode only: confirm scope before starting

Rules:

  • In direct (Quick-fix) mode, skip pre-questions when the user provides enough context.
  • If the user specifies a journal with no template at references/journals/[journal].md, refuse and instruct the user to add a template.
  • Never ask more than 3 questions before producing output.
  • Use Structured Interaction when available; fall back to plain-text questions otherwise.

Workflow

Step 0: Workflow Memory Check

  • Read .planning/workflow-memory.json. If file missing or empty, skip to Step 1.
  • Check if the last 1-2 log entries form a recognized pattern with ppw:polish that has appeared >= threshold times in the log. See skill-conventions.md > Workflow Memory > Pattern Detection for the full algorithm.
  • If a pattern is found, present recommendation via AskUserQuestion:
    • Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:polish?"
    • Options: "Yes, proceed" / "No, continue normally"
  • If user accepts: set mode to direct, skip Ask Strategy questions.
  • If user declines or AskUserQuestion unavailable: continue in normal mode.

Quick-fix (Direct) Mode

Step 1 -- Collect Context:

  • Determine input type: file path (use Edit tool) or pasted text (output in conversation).
  • Load references: expression pattern leaf by section type, all anti-AI pattern leaves, journal template if specified.
  • Detect input characteristics: translationese presence, section type, text length for smart adaptation.
  • Opt-out check: Scan the user's trigger prompt for any of these phrases (case-insensitive, exact phrase match): english only, no bilingual, only english, 不要中文. Store result as bilingual_mode (true/false). This flag governs Step 5 bilingual output below.
  • Record workflow: Append {"skill": "ppw:polish", "ts": "<ISO timestamp>"} to .planning/workflow-memory.json. Create file as [] if missing. Drop oldest entry if log length >= 50.

Step 2 -- Polish:

  • Follow the Core Prompt constraints above as the primary instruction set for this step.
  • Single intelligent pass covering expression, logic, and structure as needed based on text quality.
  • Priority: expression issues first, then logic coherence, then structural adjustments.
  • Apply journal style preferences from loaded template.
  • Avoid anti-AI vocabulary; flag and rewrite AI-sounding phrases.
  • Pay special attention to translationese if detected (literal structures, calques, excessive "of" constructions).
  • For file input: use Edit tool; add % [Polish] Original: <original text> annotation before each modification.
  • For pasted text: present polished output directly in conversation with key changes highlighted.

Step 3 -- Smart Adaptation:

  • Short text (up to ~3 paragraphs): polish entirely in one pass.
  • Long text (4+ paragraphs or multiple \section{} markers): split by section, process sequentially, maintain terminology consistency across sections.

Step 4 -- Summary:

  • Generate concise report: change count, modification types (expression/logic/structure), notes.
  • Include "Recommend running De-AI Skill for further detection check" when substantial rewrites were made.

Step 5 -- Bilingual Display (file input only):

  • If bilingual_mode is true and input was a file: for each paragraph that was modified in Step 2, display a > **[Chinese]** ... blockquote in conversation showing the Chinese translation of the polished English text.

  • Use a section header in conversation: "双语对照 / Bilingual Comparison:" before the first blockquote.

  • Format per paragraph:

    [Chinese] [Chinese translation of the polished paragraph]

  • Do not insert Chinese into the .tex file. The file remains English-only and submission-ready.

  • If bilingual_mode is false (opt-out detected): skip this step entirely.

  • Pasted text input: if bilingual_mode is true, append the > **[Chinese]** ... blockquote immediately after each polished paragraph in the conversation output.

Guided Mode

Step 1 -- Collect Context: Same as Quick-fix Step 1, plus confirm scope with user.

Steps 2-4 follow the same pattern: Analyze current text, present numbered checklist of problems found, user selects which to fix ("fix 1, 3" or "all"), apply selected fixes in batch using Edit tool with annotations, report changes. Re-read the file before each step to see the result of previous edits.

StepFocusKey Checks
2. StructureParagraph organization, topic sentences, section flowRedundancy, ordering, paragraph purpose, section transitions
3. LogicArgument coherence, claim support, terminology consistencyArgument chains, evidence links; cross-section coherence when multi-section input
4. ExpressionWord choice, sentence clarity, tone, concisenessAnti-AI patterns, translationese, academic register, hedging calibration

Step 5 -- Summary: Same as Quick-fix Step 4.

Step 6 -- Bilingual Display: Same as Quick-fix Step 5. If bilingual_mode is true, display > **[Chinese]** ... blockquotes in conversation for each modified paragraph. If false, skip entirely.

LaTeX Annotation Format

  • Format: % [Polish] Original: <original text> on the line immediately before the replacement text.
  • Multi-line originals: each line gets its own % [Polish] Original: prefix.
  • Annotations are valid LaTeX comments -- the file still compiles with them present.
  • Cleanup: after user confirms acceptance, remove all lines matching ^% \[Polish\] Original: pattern.
  • If existing % [Polish] Original: annotations are found, clean them up before adding new ones.

Output Contract

OutputFormatCondition
polished_textIn-place edits (file) or conversation output (pasted text)Always produced
change_annotationsLaTeX comments (% [Polish] Original:)File input only
summary_reportMarkdown in session (not in file)Always produced
bilingual_conversation> **[Chinese]** ... blockquotes in sessionFile input: modified paragraphs only. Pasted text: after each output paragraph. Skipped when opt-out detected.

Edge Cases

SituationHandling
Input too short (single sentence)Polish but warn limited context for structural assessment
No section headers in inputDefault to expression-focused polishing
Pasted text inputOutput directly in conversation; no file operations
File inputUse Edit tool only; never Write (do not overwrite entire file)
Journal specified but no templateRefuse; instruct user to add template at references/journals/[journal].md
Very long input (10+ sections)Process in batches; maintain cross-section terminology awareness
Existing % [Polish] Original: annotationsClean up old annotations before adding new ones
Mixed LaTeX and textPreserve all LaTeX commands; polish surrounding natural language only
Text with obvious translationeseFlag in summary; prioritize translationese fixes in expression pass

Fallbacks

ScenarioFallback
Structured Interaction unavailableAsk 1-3 plain-text questions covering highest-impact gaps
Expression pattern leaf missingUse overview entrypoint for general patterns
Journal template missing for specified journalRefuse -- instruct user to add the template first
Anti-AI patterns file missingProceed without; rely on Claude's vocabulary awareness
File is read-only or Edit failsPresent changes as a diff in conversation; user applies manually

Skill: polish-skill Conventions: references/skill-conventions.md

Purpose

This Skill scans a Python ML experiment repository and generates a hierarchical paper outline (H1/H2/H3) with user approval checkpoints at each heading level. It serves researchers who have completed experiments and need to structure findings into an academic paper. The scan categorizes repo files using patterns from references/repo-patterns.md, then progressively generates headings from coarse (sections) to fine (sub-subsections), with the user confirming or modifying each level before proceeding. After H2 confirmation, the Skill automatically collects academic references via Semantic Scholar MCP and saves them as per-section ref files for downstream body generation.

Trigger

Activates when the user asks to:

  • Generate a paper structure, outline, or skeleton from a repository or codebase
  • Scan a project and create paper sections from experiment code or results
  • 从实验仓库/代码仓库生成论文大纲或论文结构

Example invocations:

  • "Generate a paper outline from my repo"
  • "帮我从实验仓库生成论文大纲"
  • "Scan my project and create paper structure"
  • "把我的代码仓库转成论文框架"

Modes

ModeDefaultBehavior
guidedYesFull 5-step workflow with confirmation at each heading level and section-by-section body generation
directNot supported -- outline generation inherently requires user validation at each level
batchNot supported -- each repo requires unique analysis

Default mode: guided. The layered confirmation design is central to this Skill.

References

Required (always loaded)

FilePurpose
references/repo-patterns.mdFile categorization patterns and section mapping rules
references/bilingual-output.mdBilingual output format (Skill is bilingual-eligible)
references/body-generation-rules.mdAnti-hallucination rules, citation integration, bilingual format, references.bib algorithm
references/journals/ceus.mdCEUS journal formatting contract (writing style, section guidance)

Leaf Hints

None. All reference files are in required because Step 5 body generation always needs CEUS formatting.

Loading Rules

  • Load repo-patterns.md and bilingual-output.md at Step 1 start.
  • Load body-generation-rules.md and journals/ceus.md at Step 5 start.
  • If journal template file is missing, refuse: "Journal template for [X] not found. Available: CEUS."

Ask Strategy

Before starting, ask about:

  1. Repo path (required): "Which repository should I scan?" -- use Structured Interaction if available
  2. Target journal (optional): "Which journal is this paper targeting?" -- options: CEUS, Other, None/General. If CEUS, load template at Step 2. If Other, ask for journal name. If None, use IMRaD default

Bilingual mode: Inferred from trigger text. Check for opt-out keywords per references/bilingual-output.md (exact phrases: english only, no bilingual, only english, 不要中文). Do not ask explicitly.

Rules:

  • Never ask more than 2 explicit questions (repo path + journal)
  • In direct mode, skip -- but direct mode is not supported for this Skill

Workflow

Step 0: Workflow Memory Check

  • Read .planning/workflow-memory.json. If file missing or empty, skip to Step 1.
  • 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.
  • If a pattern is found, present recommendation via AskUserQuestion:
    • Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:repo-to-paper?"
    • Options: "Yes, proceed" / "No, continue normally"
  • If user accepts: set mode to direct, skip Ask Strategy questions.
  • If user declines or AskUserQuestion unavailable: continue in normal mode.
  • Note: This Skill does not support full direct mode. If user accepts the recommendation, skip the Ask Strategy questions (repo path, journal) using inferred context, but retain all guided Step checkpoints (Steps 2-5 confirmations). The output contract is not altered.

Step 1: Scan Repository

Prepare:

  • Load references/repo-patterns.md and references/bilingual-output.md
  • Read the repository directory structure (top 2 levels: root + first-level subdirectories)
  • Categorize each file using the File Identification Patterns table from repo-patterns.md
  • Apply ambiguity rules for files matching multiple categories (lowest priority number wins)
  • Skip hidden files, test files, and binary data files per the Skip Rules in repo-patterns.md

Present:

  • Display a categorized summary table:

    CategoryFiles FoundKey Items
    documentation3README.md, docs/overview.md
    results5results/metrics.csv, scores.json
  • Mark missing categories: "No [category] files found"

  • Summary line: "Scanned N files in M categories. Proceeding to H1 outline generation..."

  • If user wants to review or correct, they can interrupt; otherwise auto-proceed to Step 2

  • Record workflow: Append {"skill": "ppw:repo-to-paper", "ts": "<ISO timestamp>"} to .planning/workflow-memory.json. Create file as [] if missing. Drop oldest entry if log length >= 50.


Step 2: Generate H1 Outline

Prepare:

  • If journal specified (e.g., CEUS), load references/journals/[journal].md and use its Section Guidance headings as H1 structure. CEUS sections: Abstract, Introduction, Study Area / Data / Methods, Results, Discussion, Conclusion
  • If no journal specified, use IMRaD default: Introduction, Methods, Results and Discussion, Conclusion
  • Adjust base sections based on scan summary (e.g., add "Study Area" if spatial data detected)

Present:

  • Display H1 headings with one-sentence descriptions:
    # 1. Introduction
        Establish research context, literature gap, and contribution statement.
    # 2. Methods
        Describe the analytical approach, data sources, and model architecture.
    
  • Bilingual: if bilingual mode is ON, add Chinese translation of each description using Markdown blockquote format: > **[Chinese]** ... per references/bilingual-output.md
  • Summary line: "Generated N H1 sections. Please confirm, modify, or add before proceeding to H2."
  • Wait for user confirmation ("ok") or modification instructions

On modification: Revise H1 headings per user feedback and re-display. Loop until confirmed.

Section adjustment examples:

  • If scan found spatial data files (shapefiles, GeoJSON) -> consider adding "Study Area" H1 section
  • If scan found no result files -> mark Results section with warning placeholder
  • If scan found multiple distinct model implementations -> consider splitting Methods into sub-approaches

Step 3: Generate H2 Outline

Prepare:

  • For each confirmed H1 section, read relevant repo files to generate H2 sub-headings
  • Use the Category to Paper Section Mapping from repo-patterns.md to identify which files inform each H1 section
  • Read actual file contents (README for Introduction, config files for Methods, result files for Results) -- H2 generation requires content reading, not just directory structure
  • Generate 2-4 H2 sub-headings per H1 section, each with a one-sentence description

Present:

  • Display full H1 + H2 hierarchy with source annotations on each H2:
    # 1. Introduction
    ## 1.1 Research Background and Motivation  <- from: README.md
        Urban heat island measurement requires fine-grained spatial analysis approaches.
    ## 1.2 Literature Gap and Contribution  <- from: README.md
        Existing methods lack integration of street-level semantics with thermal data.
    
  • Source annotations: list the 1-3 most directly relevant files (highest-priority per repo-patterns.md)
  • Bilingual: if ON, add Chinese descriptions in > **[Chinese]** ... blockquote format
  • Same confirmation loop as Step 2: "Generated N H2 subsections across M H1 sections. Please confirm, modify, or add before proceeding to H3."

Step 2.5: Literature Collection

Pre-flight:

  • Call mcp__semantic-scholar__papers-search-basic with {"query": "test", "limit": 1}
  • If call succeeds: proceed to literature collection below
  • If call fails or tool unavailable: skip Step 2.5 entirely
    • Insert [CITATION NEEDED] after each H2 subsection description in the outline
    • Display: "Semantic Scholar MCP not available. Skipping literature collection. [CITATION NEEDED] markers added."
    • Proceed directly to Step 4 (H3 generation)

Collect references:

FOR each H1 section: FOR each H2 subsection under this H1: 1. Derive search query: extract 2-5 key technical terms from the H2 title and description, contextualized by the H1 section title. Use English terms only (ignore Chinese translations in bilingual mode). Strip filler words (and, of, the, for). Example: H1="Methods", H2="Gradient Boosting Prediction Framework", description="Feature engineering using street-level semantic segmentation data" -> query: "gradient boosting prediction street-level semantic segmentation" 2. Call mcp__semantic-scholar__papers-search-basic with {"query": derived_query, "limit": 10} 3. For each result where the abstract field is empty: call mcp__semantic-scholar__get-paper-abstract with the paper's paperId. If abstract is still empty after fetch, mark as "Abstract not available" 4. Filter results by relevance: assess how many distinct claims/arguments the H2 subsection needs to make, then keep 5-10 papers that best support those claims. Discard papers that are only tangentially related based on title and abstract content 5. Display progress line: ✓ 1.1 Research Background: 8 refs found (or ⚠ 1.1 Research Background: 0 refs found for zero results) 6. If a search call fails mid-batch: mark that H2 as [CITATION NEEDED], display warning, continue to next H2 END FOR END FOR

Write ref files:

Create {repo_path}/.paper-refs/ directory. Write one Markdown file per H1 section, named by the section topic in lowercase (e.g., introduction.md, methods.md, results.md).

Each file uses this structure:

# [H1 Section Title] - References

## [H2 Number] [H2 Subsection Title]

### [FirstAuthor] et al. ([Year])
**Title:** [Full title from MCP]
**Authors:** [Author1; Author2; ...]
**Year:** [YYYY] | **Citations:** [N]
**Relevance:** [[H2 number] [H2 subsection title]]
[One-sentence explanation of why this paper is relevant to this subsection]

> [Abstract summary: 1-2 sentences from MCP abstract data. If abstract not available, write "Abstract not available"]

```bibtex
@article{[citationkey], ...}

BibTeX rules (reuse literature-skill patterns):
- Citation key format: `firstAuthorLastnameLowercaseYYYYfirstKeyword` (e.g., `smith2023urban`)
- Entry type: `@article` for journal, `@inproceedings` for conference, `@misc` for preprints (follow MCP paper type)
- All BibTeX fields MUST come from MCP-returned data. If a field is not in the MCP response, OMIT it
- If DOI missing, add comment: `% DOI not available -- verify manually`
- Never fill missing fields from prior knowledge

Duplicate handling: allow same paper to appear in multiple section files. Each file is self-contained.

**Display summary table:**

After all H2 subsections processed, display:

SectionSubsectionRefsTop Reference
1. Introduction1.1 Research Background8Smith et al. (2023) - 142 citations
............

Total: [N] references collected. Confirm to proceed to H3 outline generation.


Wait for user confirmation before proceeding to Step 4.

---

### Step 4: Generate H3 Outline

**Prepare:**
- For each confirmed H2 subsection, read deeper file contents to generate H3 sub-sub-headings
- H3 captures specific technical details: individual model components, specific metrics,
  particular datasets, analysis steps
- Not every H2 needs H3 -- generate only where repo content supports further breakdown
  (typically Methods and Results). Generate 0-3 H3 entries per H2 subsection

**Present:**
- Display full H1 + H2 + H3 hierarchy with source annotations on H3 entries:

1.1 Research Background and Motivation

1.1.1 Urban Heat Island Measurement Challenges <- from: README.md:L15-30

  Current approaches to UHI measurement rely on satellite imagery with limited resolution.
- Bilingual: if ON, add Chinese descriptions in `> **[Chinese]** ...` blockquote format
- Same confirmation loop as Step 2: "Generated N H3 sub-subsections. Please confirm, modify,
or add. This completes the outline structure."

---

### Step 5: Body Generation

Step 5 auto-continues in the same session after H3 confirmation. It uses the H3 outline already in memory -- does not re-read `paper_outline.md`.

**Prepare:**
- Load `references/body-generation-rules.md` and `references/journals/ceus.md`
- Check if `{repo_path}/.paper-refs/` exists. If missing: note that all citation positions will use `[CITATION NEEDED]`
- Create `{repo_path}/.paper-output/` directory if it does not exist

**Section selection:**
- Display all H1 sections via AskUserQuestion (multiSelect):

AskUserQuestion({ question: "Which sections should I generate body text for?", options: [ { label: "1. [H1 title]", description: "[H2 subsection summary]" }, ...one option per H1 section from confirmed outline ] })


- User selects which sections to generate in this session

**Generation loop (for each selected H1 section, sequentially):**

1. Read relevant repo files using the Category to Paper Section Mapping from `references/repo-patterns.md`
2. Read `{repo_path}/.paper-refs/{section}.md` if it exists -- extract `\cite{key}` citation keys
3. Generate full section `.tex` content following ALL rules in `references/body-generation-rules.md`:
 - `\section{}`, `\subsection{}`, `\subsubsection{}` LaTeX heading commands from confirmed H2/H3 structure
 - Academic prose following CEUS writing style from `references/journals/ceus.md`
 - `\cite{key}` inline citations (keys from `.paper-refs/` only; `[CITATION NEEDED]` for unsupported claims)
 - `[SOURCE: file:line]` annotations on all repo-derived claims (specific numbers, configs, model names)
 - `[RESULTS NEEDED]` / `[EXACT VALUE: metric]` for unknown quantitative data
 - Bilingual: `% --- Paragraph N ---` markers + `%` Chinese comment lines before each English paragraph (skip if opt-out detected)
4. Write to `{repo_path}/.paper-output/{section}.tex`
5. Display the generated section content to the user
6. AskUserQuestion for confirmation:

AskUserQuestion({ question: "Section [N]: [Title] generated. Please review above.", options: [ { label: "Confirm", description: "Accept this section and proceed to next" }, { label: "Modify", description: "Describe changes needed (will regenerate entire section)" }, { label: "Skip", description: "Skip this section, move to next" } ] })


- **Confirm:** proceed to next selected section
- **Modify:** user describes changes -> regenerate entire section -> re-display -> loop until confirmed
- **Skip:** move to next section without writing file

**After all selected sections confirmed:**
- Generate `references.bib` following the algorithm in `references/body-generation-rules.md`
- Display completion summary: number of sections generated, files written, references.bib entry count

## Output Contract

| Output | Format | Condition |
|--------|--------|-----------|
| `scan_summary` | Categorized summary table | Always -- Step 1 |
| `paper_outline` | Hierarchical H1/H2/H3 with descriptions and source annotations | After all steps confirmed |
| `literature_refs` | Per-section Markdown files in `{repo_path}/.paper-refs/` with reference cards | After Step 2.5 (skipped if MCP unavailable) |
| `body_text` | Per-H1 `.tex` files in `{repo_path}/.paper-output/` + `references.bib` | After Step 5 sections confirmed |

**Bilingual eligibility:** This Skill produces academic text (one-sentence heading descriptions).
Bilingual mode is ON by default; opt-out via keywords in `references/bilingual-output.md`.

After final H3 confirmation, offer to save the complete outline to a file using Write tool:
- Default filename: `paper_outline.md` in the repo root
- Include all heading levels with descriptions and source annotations
- Bilingual descriptions included if bilingual mode is ON

## Edge Cases

| Situation | Handling |
|-----------|----------|
| Empty repository (no recognized files) | Refuse: "No scannable files found in [path]. Please verify the repository path." |
| No README.md found | Warn in scan summary; proceed with available files; Introduction H2 will have limited source annotations |
| No result files found | Warn in scan summary; Results H2/H3 use placeholder: "[RESULTS NEEDED: add result files to populate this section]" |
| Journal specified but template missing | Refuse: "Journal template for [X] not found. Available: CEUS." |
| Non-Python repo | Warn: "Scan patterns are calibrated for Python ML projects. Non-Python files may be miscategorized." Proceed with best-effort |
| Very large repo (>500 files in top 2 levels) | List only top 10 files per category in scan summary; note total count |
| All files in one category | Proceed -- outline may be unbalanced; user corrects at confirmation step |
| Semantic Scholar MCP unavailable | Skip Step 2.5; insert [CITATION NEEDED] markers in outline; proceed to Step 4 |
| Zero search results for an H2 | Display warning with ⚠ prefix; mark H2 as [CITATION NEEDED]; continue to next H2 |
| MCP call fails mid-batch | Mark that specific H2 as [CITATION NEEDED]; continue with remaining H2 subsections |
| Springer papers with empty abstracts | Call get-paper-abstract; if still empty, display "Abstract not available" in ref card; still include paper |
| .paper-refs/ directory missing | Continue generating; all citation positions use `[CITATION NEEDED]` placeholders; do not block |
| User selects zero sections in Step 5 | Skip body generation entirely; display "No sections selected. Body generation skipped." |
| Modification loop exceeds 3 iterations | Proceed with current version; warn "Multiple revision cycles detected. Consider manual editing for fine adjustments." |

## Fallbacks

| Scenario | Fallback |
|----------|----------|
| Structured Interaction unavailable | Ask repo path and journal as plain-text questions |
| `references/repo-patterns.md` missing | Refuse: "Required reference file references/repo-patterns.md not found. Cannot categorize repo files." |
| `references/bilingual-output.md` missing | Proceed with English-only output; warn user |
| Journal template missing | Refuse with message from Edge Cases |
| Write tool unavailable | Present final outline in conversation; user saves manually |
| Semantic Scholar MCP unavailable | Skip Step 2.5 entirely; add [CITATION NEEDED] after each H2 description; warn user; proceed to H3 generation |
| `references/body-generation-rules.md` missing | Refuse: "Required reference file references/body-generation-rules.md not found. Cannot generate body text." |

## Examples

**Minimal invocation:** User provides repo path `~/projects/uhi-prediction/` and selects CEUS as target journal.

**Step 1 output (scan summary):**
CategoryFiles FoundKey Items
documentation2README.md, docs/data-sources.md
config3config.yaml, params.json, .env.example
results4results/metrics.csv, results/ablation/
code8src/model.py, src/train.py, src/eval.py
figures3figures/heatmap.png, figures/scatter.svg
dependencies1requirements.txt

Scanned 21 files in 6 categories. Proceeding to H1 outline generation...


**Step 2 output (H1 with CEUS template):**

1. Introduction

Establish the urban heat island prediction problem and contribution.
> **[Chinese]** 阐述城市热岛预测问题及本研究贡献。

2. Study Area and Data

Describe the geographic scope and data sources for UHI analysis.
> **[Chinese]** 描述研究区域范围及城市热岛分析的数据来源。

3. Methods

Present the gradient boosting prediction framework and feature engineering.
> **[Chinese]** 介绍梯度提升预测框架与特征工程方法。

4. Results

Report prediction accuracy and spatial pattern analysis.
> **[Chinese]** 报告预测精度与空间格局分析结果。

5. Discussion

Interpret findings in the context of urban planning and prior UHI studies.
> **[Chinese]** 在城市规划和既有热岛研究背景下解读发现。

6. Conclusion

Summarize contributions and identify limitations.
> **[Chinese]** 总结贡献并指出局限性。

Generated 6 H1 sections. Please confirm, modify, or add before proceeding to H2.


User confirms. Steps 3-4 follow the same pattern with increasing detail and source annotations.

---

*Skill: repo-to-paper-skill*
*Conventions: references/skill-conventions.md*

Purpose

This Skill simulates peer review of academic papers, producing a structured bilingual review report. It assesses the paper across five dimensions (Novelty, Methodology, Writing Quality, Presentation, Significance) with 1-10 scoring, identifies major and minor concerns with actionable three-part feedback (problem, why it matters, suggestion), and delivers a verdict recommendation. When a target journal is specified, journal-specific expectations are woven into review comments. The report follows real journal review conventions and includes inline Chinese translations for every concern and the verdict.

Core Prompt

Source: awesome-ai-research-writing — 论文整体以 Reviewer 视角进行审视

# Role
你是一位以严苛、精准著称的资深学术审稿人,熟悉计算机科学领域顶级会议的评审标准。你的职责是作为守门员,确保只有在理论创新、实验严谨性和逻辑自洽性上均达到最高标准的研究才能被接收。

# Task
请深入阅读并分析我上传的【PDF论文文件】。基于我指定的【投稿目标】,撰写一份严厉但具有建设性的审稿报告。

# Constraints
1. 评审基调(严苛模式):
   - 默认态度:请抱着拒稿的预设心态进行审查,除非论文的亮点足以说服你改变主意。
   - 拒绝客套:省略所有无关痛痒的赞美,直接切入核心缺陷。你的目标是帮作者发现可能导致拒稿的致命伤,而不是让作者开心。

2. 审查维度:
   - 原创性:该工作是实质性的突破还是边际增量?如果是后者,直接指出。
   - 严谨性:数学推导是否有跳跃?实验对比是否公平(Baseline 是否齐全)?消融实验是否充分支撑了核心主张?
   - 一致性:引言中声称的贡献在实验部分是否真的得到了验证?

3. 格式要求:
   - 严禁列表化滥用:在陈述复杂逻辑时,请使用连贯段落。
   - 保持 LaTeX 纯净:不要使用无关的格式指令。

4. 输出格式:
   - Part 1 [The Review Report]:模拟真实的顶会审稿意见(使用中文)。包含以下板块:
     * Summary: 一句话总结文章核心。
     * Strengths: 简要列出 1-2 点真正有价值的贡献。
     * Weaknesses (Critical): 必须列出 3-5 个可能导致直接拒稿的致命问题(如:缺乏核心 Baseline,原理存在逻辑漏洞,创新点被过度包装)。
     * Rating: 给出预估评分(1-10分,其中 Top 5% 为 8分以上)。
   - Part 2 [Strategic Advice]:针对作者的中文改稿建议。
     * 直击痛点:用中文解释 Part 1 中的 Critical Weaknesses 到底因何而起。
     * 行动指南:具体建议作者该补什么实验、该重写哪段逻辑、或该如何降低审稿人的攻击欲。
   - 除以上两部分外,不要输出任何多余的对话。

# Execution Protocol
在输出前,请自查:
1. 你的语气是否太温和了?如果是,请重新审视那些模糊的实验结果,并提出尖锐的质疑。
2. 你指出的问题是否具体?不要说"实验不够",要说"缺少在 ImageNet 数据集上的鲁棒性验证"。

Trigger

Activates when the user asks to:

  • Review, peer-review, or simulate reviewer feedback for a paper
  • 审稿、模拟评审、模拟审稿人反馈

Example invocations:

  • "Review this paper" / "审稿这篇论文"
  • "Give me a peer review of my draft" / "模拟评审我的论文"
  • "Simulate a reviewer for my CEUS submission"
  • "帮我做一个模拟审稿"

Modes

ModeDefaultBehavior
directYesSingle-pass read-analyze-report workflow, produces complete review
batchNot supported -- review requires full-paper context

Default mode: direct. User says "review this paper" and gets a complete review report.

Mode inference: Default is always direct. There is no partial or iterative review mode.

References

Required (always loaded)

FilePurpose
references/expression-patterns.mdAcademic expression patterns overview for writing quality assessment

Leaf Hints (loaded based on paper sections)

FileWhen to Load
references/expression-patterns/introduction-and-gap.mdAssessing introduction or background sections
references/expression-patterns/methods-and-data.mdAssessing methods or data sections
references/expression-patterns/results-and-discussion.mdAssessing results or discussion sections
references/expression-patterns/conclusions-and-claims.mdAssessing conclusion sections
references/expression-patterns/geography-domain.mdPaper involves spatial, urban, or planning topics

Journal Template (conditional)

  • When user specifies a target journal, load references/journals/[journal].md.
  • If template missing, refuse: "Journal template for [X] not found. Available: CEUS."
  • Journal preferences inform review comments where relevant, but core dimensions and weights remain unchanged across all journals.

Loading Rules

  • Load expression patterns overview at the start.
  • Load section-specific leaves during analysis based on paper sections encountered.
  • Anti-AI patterns are NOT loaded by default. This is a review skill, not a detection skill.
  • If an expression pattern leaf is missing, proceed with general writing quality assessment and warn the user.

Ask Strategy

Before starting, ask about:

  1. Target journal (if not specified) -- determines whether journal-specific criteria appear in review
  2. Input source: file path or pasted text (if ambiguous from trigger)

Rules:

  • Never ask more than 2 questions before producing the review.
  • In direct mode, skip pre-questions if the user provided enough context in the trigger.
  • Use Structured Interaction when available; fall back to plain-text questions otherwise.

Workflow

Step 0: Workflow Memory Check

  • Read .planning/workflow-memory.json. If file missing or empty, skip to Step 1.
  • Check if the last 1-2 log entries form a recognized pattern with ppw:reviewer-simulation that has appeared >= threshold times in the log. See skill-conventions.md > Workflow Memory > Pattern Detection for the full algorithm.
  • If a pattern is found, present recommendation via AskUserQuestion:
    • Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:reviewer-simulation?"
    • Options: "Yes, proceed" / "No, continue normally"
  • If user accepts: set mode to direct, skip Ask Strategy questions.
  • If user declines or AskUserQuestion unavailable: continue in normal mode.

Step 1: Collect Context

  • Load references/expression-patterns.md overview.
  • If target journal specified, load references/journals/[journal].md. If template missing, refuse with message: "Journal template for [X] not found. Available: CEUS."
  • Read user input: file via Read tool, or pasted text from conversation.
  • Guard -- full paper required: If input is partial (only introduction, only methods, etc.), refuse with message: "This Skill requires the full paper for review. Please provide the complete manuscript."
  • Guard -- minimum length: If input is under ~300 words, warn: "Text appears too short for a full paper review. Provide the complete manuscript."
  • Record workflow: Append {"skill": "ppw:reviewer-simulation", "ts": "<ISO timestamp>"} to .planning/workflow-memory.json. Create file as [] if missing. Drop oldest entry if log length >= 50.

Step 2: Analyze Paper

  • Follow the Core Prompt constraints above as the primary instruction set — especially the 严苛模式 review stance.
  • Read the full paper to understand claims, evidence structure, and writing quality.
  • Load relevant expression pattern leaves based on paper sections encountered (introduction-and-gap.md for intro, methods-and-data.md for methods, etc.) to inform Writing Quality dimension.
  • If journal template loaded, cross-reference journal-specific expectations and note where the paper falls short of journal fit.
  • Assess across all five dimensions:
    1. Novelty -- Is the contribution genuinely new? Incremental or transformative?
    2. Methodology -- Is the experimental design sound? Baselines adequate? Ablation studies present?
    3. Writing Quality -- Expression clarity, academic register, AI-sounding patterns, terminology consistency
    4. Presentation -- Figure/table quality, section organization, flow between sections
    5. Significance -- Does the work matter? Practical or theoretical impact?
  • IMPORTANT: Generate concerns FIRST, then derive dimension scores from the concerns. This prevents score-concern inconsistency.

Step 3: Generate Review Report

  • Opt-out check: Before generating the report, scan the user's original trigger prompt for any of these phrases (case-insensitive, exact phrase match): english only, no bilingual, only english, 不要中文. If any phrase is detected: omit all > **[Chinese]** ... blockquotes from the report -- produce English-only concerns, questions, and verdict. If none detected: include Chinese blockquotes as normal.

Write the review report in the following locked structure:

# Peer Review Report

**Paper:** [title or filename]
**Target Journal:** [journal name or "General"]
**Date:** [date]

## Scoring Overview

| Dimension | Score (1-10) | Justification |
|-----------|:---:|---------------|
| Novelty | X | [one-line justification] |
| Methodology | X | [one-line justification] |
| Writing Quality | X | [one-line justification] |
| Presentation | X | [one-line justification] |
| Significance | X | [one-line justification] |

## Major Concerns

### Major Concern N: [Descriptive Title]

**Section:** [section name, e.g., "Results (Section 4)"]

**Problem:** [description of the issue]

**Why this matters:** [impact on quality or publishability]

**Suggestion:** [one-sentence directional guidance]

> **[Chinese]** [Chinese translation of all three parts]

## Minor Concerns

### Minor Concern N: [Descriptive Title]

[Same three-part structure with inline Chinese translation]

## Questions for Authors

1. [Question with enough context]
   > **[Chinese]** [Chinese translation]

## Verdict

**Recommendation:** [Accept / Minor Revision / Major Revision / Reject]

[One-sentence summary of the overall assessment]

> **[Chinese]** [Chinese translation of recommendation and summary]

Chinese translation rules:

  • Use inline blockquote format (> **[Chinese]** ...) immediately after each concern's English text.
  • Preserve domain terminology precisely in Chinese (e.g., "ablation study" as "消融实验", not a generic paraphrase).
  • Each Chinese blockquote covers all three parts (problem, why, suggestion) in a single block.
  • The Verdict section also receives an inline Chinese translation.

Step 4: Output

  • File input: Write the review report to {input_filename_without_ext}_review.md in the same directory as the input file. If input filename is unclear, use review-report.md.
  • Pasted text input: Present the complete review report directly in conversation.
  • Report the total number of major concerns, minor concerns, and questions identified.

Output Contract

OutputFormatCondition
Review reportMarkdown file or conversation outputAlways
Scoring overview5-dimension table with 1-10 scoresAlways
Concern countSummary line (N major, N minor, N questions)Always reported

Edge Cases

SituationHandling
Input is partial (only one section)Refuse: "This Skill requires the full paper for review."
Input too short (< 300 words)Warn: "Text appears too short for a full paper review."
Input language is ChineseWarn and suggest Translation Skill first; proceed if user confirms
Journal template missing when journal specifiedRefuse: "Journal template for [X] not found. Available: CEUS."
No significant weaknesses foundProduce report with high scores; note strengths rather than fabricating concerns
Paper clearly outside journal scopeFlag as a Major Concern about journal fit

Fallbacks

ScenarioFallback
Structured Interaction unavailableAsk 1-2 plain-text questions (journal + input source)
Expression pattern reference missingProceed with general writing quality assessment; warn user
Journal template missing (no journal specified)Ask once; if declined, review with general academic criteria
Write tool fails for output filePresent report in conversation instead

Skill: reviewer-simulation-skill Conventions: references/skill-conventions.md

Purpose

This Skill orchestrates parallel paper processing by splitting a paper into H1 sections and dispatching eligible Skills to subagents. In Phase 19 (current), it validates the proof-of-concept gate by running a single subagent on one section. Full parallel dispatch across all sections is Phase 20.

Trigger

Activates on: ppw:team [skill] [file] invocations.

Examples:

  • "ppw:team polish paper.tex" / "团队模式润色论文"
  • "ppw:team translation draft.md" / "并行翻译论文各章节"
  • "ppw:team de-ai paper.tex"

Modes

ModeDefaultBehavior
guidedYessplit -> user confirms sections -> user selects PoC section -> run PoC -> user confirms quality
directskip confirmations, auto-select all body sections and first section for PoC

Mode inference: "直接" or "direct" in trigger switches to direct mode.

References

required: [] -- This Skill does not produce academic text itself. It orchestrates other Skills that load their own references at runtime. No reference files are needed by the orchestrator.

Ask Strategy

Guided mode -- three interaction points via AskUserQuestion:

  1. Section selection (multiSelect) after splitting
  2. PoC section selection (single select) from selected sections
  3. PoC quality confirmation (approve/retry/exit)

Direct mode -- skip all three: auto-select all body sections (exclude preamble and bibliography), auto-select first body section for PoC, auto-approve PoC output.

Workflow

Step 0: Workflow Memory (Recording Only)

  • Skip pattern detection -- orchestrator is not suitable for auto-direct-mode recommendation.
  • Recording happens after Step 1 validation (see Step 1).

Step 1: Parse Arguments and Validate

  • Parse $ARGUMENTS to extract: Skill name (first word) and file path (remaining words).
  • Validate Skill name against whitelist: ["translation", "polish", "de-ai"]
  • If Skill is not in whitelist, reject with exact message: "[Skill] requires full-paper context and cannot run in parallel. Please run /ppw:[skill] directly."
  • Validate file exists and is .tex or .md format. If file not found or wrong format, report error and stop.
  • Read the paper file content.
  • Record workflow: Append {"skill": "ppw:team", "ts": "<ISO timestamp>"} to .planning/workflow-memory.json. Create file as [] if missing. Drop oldest entry if log length >= 50.

Step 2: Create Working Directory

  • Create .paper-team/ directory structure: sections/, output/.
  • If .paper-team/ already exists: in guided mode, ask to overwrite or cancel; in direct mode, overwrite silently.
  • Create backup of original paper: .paper-team/{filename}-backup-{YYYYMMDD-HHmm}.{ext} (timestamped to prevent overwrite on re-runs).
  • Initialize .paper-team/manifest.json:
{
  "version": "1.0",
  "created": "<ISO timestamp>",
  "source_file": "<original file path>",
  "source_format": "tex|md",
  "target_skill": "<skill name>",
  "sections": [],
  "poc": { "section_id": null, "status": "pending", "timestamp": null },
  "backup": "<backup filename>"
}

Step 3: Split Paper into Sections

For .tex files:

  • Preamble: everything from start through \begin{document} (inclusive). Label "00 - Preamble".
  • Bibliography: from \bibliography{} or \printbibliography through \end{document}. Label "99 - Bibliography".
  • Section boundaries: each \section command. Match \section followed by optional * and optional [...] then {...}. Ignore lines starting with % (LaTeX comments).
  • Content between \begin{document} and the first \section{} is "00 - Pre-section content" (if non-empty after trimming).
  • Each section: content from its \section{Title} line through the line before the next \section{ or the bibliography boundary.

For .md files:

  • Frontmatter: content before the first # heading. Label "00 - Frontmatter" (if non-empty).
  • Split at lines beginning with # (H1 headings).
  • Each H1 heading and its content until the next # is one section.

Section file naming: {NN}-{sanitized-title}.{ext} where NN = zero-padded sequence number, sanitized-title = title lowercased, spaces to hyphens, special chars removed, max 50 chars. Preamble: 00-preamble.{ext}. Pre-section: 00-presection.{ext}. Bibliography: 99-bibliography.{ext}. Frontmatter: 00-frontmatter.md.

Edge cases:

  • No \section{} commands: treat entire body as "01 - Full Body".
  • Only one section: warn parallel processing has no benefit; proceed with PoC anyway.
  • Empty section (no content between boundaries): skip, do not create file.

Write each section to .paper-team/sections/{filename}. Update manifest.json sections array with { "id": "NN", "title": "...", "file": "sections/filename", "selected": false, "status": "pending" } for each section.

Step 4: Section Selection

Guided mode: Present all detected sections via AskUserQuestion multiSelect:

AskUserQuestion({
  question: "Select sections to process with ppw:{skill}:\n选择要用 ppw:{skill} 处理的章节:",
  multiSelect: true,
  options: [
    { label: "NN - Title", description: "brief description or first line" }
  ]
})

Update manifest.json to set selected: true for chosen sections.

Direct mode: Auto-select all sections EXCEPT those with id "00" (preamble/presection/frontmatter) and "99" (bibliography). Update manifest accordingly. Display selected sections to user.

Step 5: PoC Section Selection

Guided mode: Present selected sections via AskUserQuestion (single select):

AskUserQuestion({
  question: "Select one section for proof-of-concept test:\n选择一个章节进行概念验证测试:",
  options: [
    { label: "NN - Title", description: "will be processed by a subagent" }
  ]
})

Direct mode: Auto-select the first selected section (lowest NN number among selected).

Step 6: PoC Gate Execution

  • Read the target Skill's SKILL.md from .claude/skills/ppw-{skill}/SKILL.md. If not found, report error: "Skill ppw:{skill} not found at .claude/skills/ppw-{skill}/SKILL.md" and stop.
  • Read the selected section file from .paper-team/sections/{file}.
  • Construct the subagent prompt (use this template verbatim, filling in placeholders):
You are executing a paper section processing task in direct mode.

## Skill Instructions

{FULL CONTENT OF TARGET SKILL.MD INSERTED HERE}

## Task

Process the following paper section file using the Skill instructions above.

- Input file: .paper-team/sections/{section-filename}
- Mode: direct (skip all AskUserQuestion calls, skip Workflow Memory Step 0)
- Write output to: .paper-team/output/{section-filename}
- Do NOT ask the user any questions. Proceed with defaults.
- Load all required references as specified in the Skill instructions.
- Produce output as if you were running the Skill directly on this section.
- If the Skill normally edits in-place, instead write the processed output to the output path above.
  • Spawn a single subagent via the Agent tool with this prompt.
  • Wait for subagent completion.
  • Update manifest.json: set poc.section_id, poc.status to "completed", poc.timestamp to current ISO timestamp. Set the section's status to "completed".

Step 7: PoC Quality Confirmation

Guided mode: Read the subagent output from .paper-team/output/{file}. Display a brief excerpt (first 20-30 lines) to the user. Then ask:

AskUserQuestion({
  question: "PoC gate: Is the subagent output quality acceptable?\n概念验证:子代理输出质量是否可接受?",
  options: [
    { label: "Approved - PoC gate passed", description: "Quality is comparable to main-session execution" },
    { label: "Retry", description: "Re-run PoC on the same section" },
    { label: "Exit", description: "Stop orchestration, quality is not acceptable" }
  ]
})
  • Approved: Update manifest.json poc.status to "passed". Display: "PoC gate passed. The ppw:team orchestrator is validated. To process all sections in parallel, use Phase 20's parallel dispatch (coming soon)."
  • Retry: Go back to Step 6. Loop at most 3 times, then suggest Exit.
  • Exit: Update manifest.json poc.status to "failed". Display message and suggest running the Skill directly: "/ppw:{skill} {file}"

Direct mode: Auto-approve (set poc.status to "passed"), display the first 10 lines of output and the success message.

Output Contract

OutputFormatCondition
section_filesIndividual files in .paper-team/sections/Always produced after Step 3
manifest.paper-team/manifest.jsonAlways produced, updated throughout workflow
poc_outputSingle file in .paper-team/output/Produced after Step 6

Edge Cases

SituationHandling
Paper has no \section{} commandsTreat entire body as one section "01 - Full Body"
Paper has only one sectionWarn parallel processing has no benefit; proceed with PoC
File path has spacesQuote file paths in all Read/Write operations
.paper-team/ already existsAsk to overwrite or cancel (guided) / overwrite silently (direct)
Subagent fails or times outReport error, suggest retry or exit
\section*{} (unnumbered)Match as section boundary (pattern includes optional *)
\section[short]{long} (optional arg)Match as section boundary (pattern includes optional [...])
Empty section (no content between boundaries)Skip empty sections, do not create files

Fallbacks

ScenarioFallback
Structured Interaction unavailableAsk plain-text questions for section selection
Agent tool failsReport error; suggest running Skill directly on the section
Target Skill SKILL.md not foundReport: "Skill ppw:{skill} not found at .claude/skills/ppw-{skill}/SKILL.md"
.planning/workflow-memory.json missingCreate as [] before appending

Skill: ppw-team Conventions: references/skill-conventions.md

Purpose

This Skill translates Chinese academic drafts into polished English text ready for journal submission. It produces LaTeX-formatted output that preserves technical terminology, follows the target journal's style preferences, and supports user-provided glossary files for domain-specific term mappings. Every invocation generates two output files: an English-only version and a bilingual paragraph-by-paragraph comparison version with Chinese text in LaTeX comments.

Core Prompt

Source: awesome-ai-research-writing — 中转英

# Role
你是一位兼具顶尖科研写作专家与资深会议审稿人(ICML/ICLR 等)双重身份的助手。你的学术品味极高,对逻辑漏洞和语言瑕疵零容忍。

# Task
请处理我提供的【中文草稿】,将其翻译并润色为【英文学术论文片段】。

# Constraints
1. 视觉与排版:
   - 尽量不要使用加粗、斜体或引号,这会影响论文观感。
   - 保持 LaTeX 源码的纯净,不要添加无意义的格式修饰。

2. 风格与逻辑:
   - 要求逻辑严谨,用词准确,表达凝练连贯,尽量使用常见的单词,避免生僻词。
   - 尽量不要使用破折号(—),推荐使用从句或同位语替代。
   - 拒绝使用\item列表,必须使用连贯的段落表达。
   - 去除"AI味",行文自然流畅,避免机械的连接词堆砌。

3. 时态规范:
   - 统一使用一般现在时描述方法、架构和实验结论。
   - 仅在明确提及特定历史事件时使用过去时。

4. 输出格式:
   - Part 1 [LaTeX]:只输出翻译成英文后的内容本身(LaTeX 格式)。
     * 语言要求:必须是全英文。
     * 特别注意:必须对特殊字符进行转义(例如:将 `95%` 转义为 `95\%`,`model_v1` 转义为 `model\_v1`,`R&D` 转义为 `R\&D`)。
     * 保持数学公式原样(保留 $ 符号)。
   - Part 2 [Translation]:对应的中文直译(用于核对逻辑是否符合原意)。
   - 除以上两部分外,不要输出任何多余的对话或解释。

# Execution Protocol
在输出最终结果前,请务必在后台进行自我审查:
1. 审稿人视角:假设你是最挑剔的 Reviewer,检查是否存在过度排版、逻辑跳跃或未翻译的中文。
2. 立即纠正:针对发现的问题进行修改,确保最终输出的内容严谨、纯净且完全英文化。

Trigger

Activates when the user asks to:

  • Translate Chinese academic text (draft, paragraph, or section) to English
  • Produce English LaTeX output from Chinese input
  • 将中文学术内容翻译为英文

Example invocations:

  • "Translate this Chinese draft to English for CEUS"
  • "翻译这段中文为英文"
  • "Help me translate my methods section"
  • "把 intro.md 翻译成学术英文,目标期刊是 CEUS"

Modes

ModeDefaultBehavior
interactiveConfirm section detection and glossary application before translating
guidedMulti-pass with confirmation at key checkpoints
directYesSingle-pass translation, minimal interaction
batchProcess multiple sections with same settings

Default mode: direct (single-pass, no multi-round pipeline).

Mode inference: "step by step" or "confirm before translating" switches to interactive. "Translate all sections" or "batch" switches to batch.

References

Required (always loaded)

FilePurpose
references/expression-patterns.mdAcademic expression patterns overview and module index

Leaf Hints (loaded when needed)

FileWhen to Load
references/expression-patterns/introduction-and-gap.mdInput is introduction or background content
references/expression-patterns/methods-and-data.mdInput is methods, data, or study area content
references/expression-patterns/results-and-discussion.mdInput is results or discussion content
references/expression-patterns/conclusions-and-claims.mdInput is conclusion content
references/expression-patterns/geography-domain.mdInput involves spatial, urban, or planning content
references/anti-ai-patterns.mdVocabulary screening during translation

Loading Rules

  • Load the expression patterns overview at the start to orient module selection.
  • Load leaf files only when the current input matches their scope.
  • When a target journal is specified, also load references/journals/[journal].md.
  • If a reference file is missing, warn the user and proceed with reduced capability (except journal templates; see Fallbacks).

Reference Selection Logic

  1. Scan the input for Chinese section keywords: 引言, 背景, 研究方法, 方法, 数据, 结果, 讨论, 结论.
  2. If a clear match is found, load the corresponding leaf module directly.
  3. If the input spans multiple sections or is ambiguous, load the overview and use Quick Picks.
  4. Always load geography-domain.md when the input mentions spatial concepts, cities, districts, or planning-related terms.
  5. When a target journal is specified, load its template alongside the expression patterns.

Ask Strategy

Before starting, ask about:

  1. Target journal (if not specified in trigger) -- determines style loading
  2. Custom glossary file path (if the user has domain-specific term mappings)
  3. Which section this text belongs to (only if not obvious from content or headers)

Rules:

  • In direct mode, skip pre-questions when the user provides enough context in the trigger.
  • If the user specifies a journal with no template at references/journals/[journal].md, refuse and explain: "No template found for [journal]. Please add a template at references/journals/[journal].md following the CEUS template format before proceeding."
  • Never ask more than 3 questions before producing output.
  • Use Structured Interaction when available; fall back to plain-text questions otherwise.

Workflow

Step 0: Workflow Memory Check

  • Read .planning/workflow-memory.json. If file missing or empty, skip to Step 1.
  • Check if the last 1-2 log entries form a recognized pattern with ppw:translation that has appeared >= threshold times in the log. See skill-conventions.md > Workflow Memory > Pattern Detection for the full algorithm.
  • If a pattern is found, present recommendation via AskUserQuestion:
    • Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:translation?"
    • Options: "Yes, proceed" / "No, continue normally"
  • If user accepts: set mode to direct, skip Ask Strategy questions.
  • If user declines or AskUserQuestion unavailable: continue in normal mode.

Step 1: Collect Context

  • Ask pre-questions per Ask Strategy (target journal, glossary, section type).
  • Load required references: expression patterns overview.
  • If target journal specified: Read references/journals/[journal].md. If file missing, stop and refuse -- instruct user to add the template first.
  • If glossary file specified: Read glossary and build term mapping. If file not found, warn and proceed without glossary.
  • Detect section type from input content and load the appropriate expression pattern leaf module.
  • If content involves geography/urban/spatial topics: also load geography-domain.md.
  • Load references/anti-ai-patterns.md for vocabulary screening.
  • Record workflow: Append {"skill": "ppw:translation", "ts": "<ISO timestamp>"} to .planning/workflow-memory.json. Create file as [] if missing. Drop oldest entry if log length >= 50.

Step 2: Translate

  • Follow the Core Prompt constraints above as the primary instruction set for this step.
  • Single-pass translation of Chinese input to English.
  • Apply journal style preferences (tone, vocabulary, claim calibration) from loaded journal template.
  • Use loaded expression patterns to guide phrasing choices.
  • Prioritize glossary terms when a match is found.
  • Re-translate all text uniformly, including any inline English fragments, for stylistic consistency.
  • Preserve all LaTeX commands verbatim: $...$, $$...$$, \begin{...}...\end{...}, \cite{...}, \ref{...}, \label{...}, and custom commands.
  • Avoid high-risk anti-AI vocabulary patterns (e.g., "groundbreaking", "novel", "Moreover, it is worth noting").

Step 3: Generate Output Files

  • Opt-out check: Before generating output, scan the user's original trigger prompt for any of these phrases (case-insensitive, exact phrase match): english only, no bilingual, only english, 不要中文. If any phrase is detected: skip the bilingual file entirely -- produce only [name]_en.tex. If none detected: produce both files as normal.
  • Write English-only version to [name]_en.tex with a header comment:
    % Translated from: [source file]
    % Target journal: [journal or "General"]
    % Generated: [date]
    
  • Write bilingual comparison to [name]_bilingual.tex:
    • Each paragraph: Chinese text as % comment lines, English as body text.
    • Number paragraphs with % --- Paragraph N --- markers.
  • For pasted text input (no source file): use translation_en.tex and translation_bilingual.tex in the current working directory.
  • Preserve the original input file unchanged.

Step 4: Self-Check

  • Report terminology decisions (especially glossary applications and key term choices).
  • Flag uncertain translations with explanation of alternatives considered.
  • Note any structural changes (sentence splitting, reordering) and why.
  • Warn about potential issues: very long sentences, missing references, ambiguous terms.
  • Present self-check in session output (not appended to the .tex files).

Output Contract

OutputFormatCondition
english_texLaTeX file ([name]_en.tex)Always produced
bilingual_texLaTeX file ([name]_bilingual.tex)Always produced unless opt-out keyword detected
self_check_summaryMarkdown in sessionAlways produced

Edge Cases

SituationHandling
Input too short (single sentence)Translate but warn that limited context may affect expression pattern matching
No section headers in inputAsk user which section, or default to overview expression patterns
Mixed Chinese-English textRe-translate everything uniformly for stylistic consistency
LaTeX-heavy input (mostly formulas)Preserve all formulas; translate only surrounding natural language text
Pasted text with no filenameUse fallback names: translation_en.tex / translation_bilingual.tex
Journal specified but no templateRefuse translation; instruct user to add template at references/journals/[journal].md
Glossary file not found at pathWarn user and proceed without glossary
Input contains tables or figuresPreserve LaTeX table/figure environments; translate captions and surrounding text

Fallbacks

ScenarioFallback
Structured Interaction unavailableAsk 1-3 plain-text questions covering highest-impact gaps
Expression pattern leaf missingUse overview entrypoint and Quick Picks
Journal template missing for specified journalRefuse translation -- instruct user to add the template first
Anti-AI patterns file missingProceed without; rely on journal style preferences for tone guidance
Glossary file unreadableWarn user; proceed with standard terminology choices

Examples

User: "Translate sections/intro.md to English for CEUS submission. Glossary at glossary.txt."

Skill workflow:

  1. Load references/expression-patterns.md, then references/expression-patterns/introduction-and-gap.md (detected from filename and content keywords).
  2. Load references/journals/ceus.md for CEUS style rules.
  3. Load glossary.txt and build term mapping.
  4. Load references/anti-ai-patterns.md for vocabulary screening.
  5. Read sections/intro.md and translate in a single pass, applying CEUS tone, glossary terms, and introduction expression patterns.
  6. Write sections/intro_en.tex (English-only with header comment).
  7. Write sections/intro_bilingual.tex (Chinese in % comments, English as body).
  8. Present self-check summary in session:
    • Terminology: "城市热岛" -> "urban heat island" (glossary), "建成环境" -> "built environment" (glossary).
    • Uncertain: "宜居性" translated as "livability" -- verify American vs. British spelling for CEUS.
    • Structure: Paragraph 3 split into two sentences for readability.

Skill: translation-skill Conventions: references/skill-conventions.md

Purpose

This Skill syncs local .claude/skills/ and references/ from the upstream GitHub repository Lylll9436/Paper-Polish-Workflow-skill. It downloads the latest SKILL.md files and reference documents, compares them with local versions, and updates any changed files.

Trigger

Activates when the user asks to:

  • Update or sync skills from the remote repo
  • 更新或同步技能包

Example invocations:

  • "update skills"
  • "sync skills from GitHub"
  • "更新技能"

Modes

ModeDefaultBehavior
directYesFetch, compare, update, report — no intermediate confirmation
interactiveShow diff summary before applying each update

Default mode: direct

Workflow

Step 0: Workflow Memory Check

  • Read .planning/workflow-memory.json. If file missing or empty, skip to Step 1.
  • Check if the last 1-2 log entries form a recognized pattern with ppw:update that has appeared >= threshold times in the log. See skill-conventions.md > Workflow Memory > Pattern Detection for the full algorithm.
  • If a pattern is found, present recommendation via AskUserQuestion:
    • Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:update?"
    • Options: "Yes, proceed" / "No, continue normally"
  • If user accepts: set mode to direct, skip Ask Strategy questions.
  • If user declines or AskUserQuestion unavailable: continue in normal mode.

Step 1: Pre-flight Check

  • Verify gh CLI is available and authenticated: gh auth status
  • Verify the upstream repo is accessible: gh api repos/Lylll9436/Paper-Polish-Workflow-skill --jq '.full_name'
  • If either check fails, report the error and stop.
  • Record workflow: Append {"skill": "ppw:update", "ts": "<ISO timestamp>"} to .planning/workflow-memory.json. Create file as [] if missing. Drop oldest entry if log length >= 50.

Step 2: Fetch Remote File Index

  • List all skill directories from the remote repo:
    gh api repos/Lylll9436/Paper-Polish-Workflow-skill/contents/.claude/skills --jq '.[].name'
    
  • List all reference files from the remote repo:
    gh api repos/Lylll9436/Paper-Polish-Workflow-skill/contents/references --jq '.[] | .name + " " + .type'
    
  • For reference subdirectories (type=dir), also list their contents recursively.

Step 3: Compare and Update Skills

For each remote skill directory:

  1. Fetch the remote SKILL.md content:
    gh api repos/Lylll9436/Paper-Polish-Workflow-skill/contents/.claude/skills/{skill-name}/SKILL.md --jq '.content' | base64 -d
    
  2. Read the local .claude/skills/{skill-name}/SKILL.md if it exists.
  3. Compare the two:
    • If local file does not exist → NEW skill, create directory and write file.
    • If content differs → UPDATED, overwrite local file.
    • If content is identical → UNCHANGED, skip.
  4. Track results for the final report.

In interactive mode: Before applying each update, show a summary of changes and ask for confirmation.

Step 4: Compare and Update References

For each remote reference file:

  1. Fetch the remote file content via gh api with base64 decode.
  2. Read the local references/{filename} if it exists.
  3. Compare and apply the same NEW/UPDATED/UNCHANGED logic as Step 3.
  4. For subdirectories (e.g., references/journals/, references/expression-patterns/), recurse into each file.

Step 5: Output Report

Present a summary table:

## Skills Update Report

| Skill | Status |
|-------|--------|
| polish-skill | ✓ Updated |
| de-ai-skill | - Unchanged |
| new-skill | + New |

## References Update Report

| File | Status |
|------|--------|
| expression-patterns.md | ✓ Updated |
| skill-conventions.md | - Unchanged |

**Summary:** {updated_count} updated, {new_count} new, {unchanged_count} unchanged

Output Contract

OutputFormatCondition
Update reportMarkdown tableAlways produced
File count summaryTextAlways reported

Edge Cases

SituationHandling
gh CLI not installed or not authenticatedReport error, suggest gh auth login
Remote repo not accessibleReport network/permission error
Local skill has modifications not in remoteOverwrite with remote (remote is source of truth)
New skill in remote not present locallyCreate directory and write SKILL.md
Remote skill deleted but exists locallyKeep local (do not delete; report as "local-only")
Reference subdirectory doesn't exist locallyCreate it

Fallbacks

ScenarioFallback
gh api rate limitedWait and retry once, then report error
Base64 decode failsTry gh api with Accept: application/vnd.github.raw header
Single file fetch failsSkip file, continue with remaining, report in summary

Conventions: references/skill-conventions.md

Purpose

This Skill accepts a plain-language description of experimental data (data type, key variables, sample size) and a research question (what the figure must communicate), then recommends 2–3 chart types ordered by fit. Each recommendation includes the chart type name, a 1–2 sentence rationale referencing the user's specific data and question, and Python/R library hints (names only, no code blocks). The Skill is geography-aware: if the data description contains spatial signals (coordinates, regions, administrative boundaries, GIS data), it proactively includes choropleth maps, spatial scatter plots, or kernel density maps as candidates alongside general types. When no spatial signals are present, only general chart types are recommended — geography charts are never forced onto non-spatial data. The Skill accepts text descriptions only; it does not read or process actual data files.

Core Prompt

Source: awesome-ai-research-writing — 实验绘图推荐

# Role
你是一位就职于顶级科学期刊(如 Nature, Science)或计算机顶级会议(如 CVPR, NeurIPS)的资深数据可视化专家。你拥有极高的学术审美,严谨且专业。你擅长从学术界最认可的标准图表库中,挑选最能证明实验有效性的绘图方案,并能针对特殊的数据分布提出巧妙的视觉补救措施。

# 标准学术图表库
在推荐前,请优先参考以下图表类型,选择最精确的一个或多个:

一、数值与性能对比类
1. 纵向分组柱状图:最标准的 SOTA 对比。适用于对比项数量适中且标签较短的情况。
2. 横向条形图:当对比的方法名称较长,或者对比项非常多时强烈推荐,可避免 X 轴文字倾斜或重叠。
3. 帕累托前沿图:用于展示两个相互制约指标的权衡关系。位于右上角或边界上的点代表最优模型。
4. 雷达图:用于多维度的综合能力评估。证明模型在速度、精度、显存、鲁棒性等方面全面发展无短板。
5. 堆叠柱状图:用于展示整体指标的细分构成,如将总时间拆解为加载、推理和后处理时间。

二、趋势与收敛类
6. 带置信区域的折线图:展示训练过程中的 Loss 或 Accuracy。通常使用半透明阴影区域包裹折线,以表示多次实验的标准差或置信区间。
7. 局部放大折线图:当多个模型在训练后期收敛结果非常接近时,在大图中嵌入一个放大的子图,专门展示最后阶段的微小精度优势。
8. 散点拟合图:用于展示离散数据的整体趋势。通过添加拟合曲线揭示潜在的线性或非线性规律。

三、模型评估与分类类
9. ROC 曲线:二分类任务的标准图表。适用于正负样本比例较为平衡的数据集,展示 TPR 与 FPR 的权衡。
10. Precision-Recall 曲线:适用于类别不平衡的数据集。在正样本极少的情况下,PR 曲线比 ROC 曲线更能真实反映模型性能。

四、数据关系与矩阵可视化类
11. 热力图:特别适用于呈现大规模的矩阵形式数据。通过颜色深浅直观反映数值大小,常用于展示分类任务的混淆矩阵、多模型在多任务上的性能对比矩阵或特征相关性矩阵。
12. 散点图:展示两个连续变量之间的相关性,如预测值与真实值。建议配合对角参考线使用。
13. 气泡图:散点图的扩展,引入第三个维度即气泡大小,来表示参数量或计算成本。

五、统计分布与构成类
14. 小提琴图:优于箱线图的进阶选择。能直观展示数据的概率密度分布形状,如双峰分布,体现统计严谨性。
15. 箱线图:用于展示多组数据的分布范围、中位数以及离群点。
16. 环形图或扇形图:用于展示分类数据的占比,如错误类型分布。建议优先使用环形图。

六、复合布局类
17. 双Y轴图:当需要在一张图中同时展示两个量纲完全不同的变量时,如左轴是精度,右轴是显存占用。
18. 柱折组合图:用于背景与前景的结合。例如柱状图表示样本数量作为背景,折线图表示模型精度作为前景,常用于长尾分布分析。
19. 分面网格图:当对比变量过多,一张大图显得拥挤时,将其拆分为矩阵排列的一组小图,共享坐标轴。

# Task
请分析我提供的实验数据或实验目的,基于上述图表库,推荐 1 到 2 种最佳绘图方案。

# Constraints
1. 来源优先:请优先从上述列表中选择。若有更适合当前数据且符合顶会标准的其他学术图表,也可以推荐,但杜绝非学术的商业图表。
2. 统计严谨:若数据包含多次实验结果或方差信息,强烈建议添加误差线或置信区间;若为单次实验数据,则无需强行添加。
3. 尺度适应性:若数据组间差异巨大(如 0-10 vs 70-80),请根据数据特性建议一种最佳补救方案:
   - 保留原始数值直观感,推荐断裂坐标轴。
   - 跨越数量级或指数变化,推荐对数坐标。
   - 关注相对提升幅度,推荐归一化。
4. 视觉逻辑:根据标签长度选择横向或纵向柱状图;根据数据维度选择单轴或双轴。
5. 语言风格:输出内容需保持学术、客观。

# Output Format
请严格按照以下结构输出:

1. 推荐方案:图表名称
2. 核心理由:结合数据逻辑,解释为什么这张图最符合当前的学术叙事需求。
3. 视觉设计规范:
   - 坐标轴:说明 X 轴和 Y 轴的物理含义及单位。
   - 尺度处理:若涉及数据差异巨大,请在此处给出断裂轴、对数坐标或归一化的具体建议。
   - 统计要素:若适用,说明误差线、拟合曲线或显著性标记的要求。
   - 配色与样式:提供具体的配色策略及线型建议。

Trigger

Activates when the user asks to:

  • Choose a chart type or recommend a visualization for their data
  • Decide how to display experimental results
  • 帮我选择可视化方式、我应该用什么图、帮我推荐图表类型

Example invocations:

  • "What chart should I use for this data?" / "帮我选择合适的可视化方式"
  • "Recommend a visualization for my spatial analysis results" / "帮我推荐一个展示时空数据的图表"
  • "Which plot type fits my regression results?" / "我应该用什么图展示这个结果"

Modes

ModeDefaultBehavior
directYesSingle-pass recommendation after Ask Strategy; 2–3 cards delivered in one response
batchNot supported — each recommendation requires specific data description and research question

Default mode: direct. User provides data description and research question; Skill delivers recommendation cards in one response.

References

Required (always loaded)

None. No reference files loaded. Recommendations derived from the data description and research question provided by the user.

Leaf Hints

None.

Ask Strategy

Two inputs required before generating recommendations:

  1. Data description: What is the data? (data type, key variables, spatial or non-spatial, sample size if relevant) — ask if not included in the trigger.
  2. Research question for this figure: What should the chart communicate? (e.g., distribution, comparison, trend, spatial pattern, correlation) — ask if not included in the trigger.

Rules:

  • If both inputs are present in the trigger, proceed without asking.
  • If only one input is provided, ask for the missing one before proceeding.
  • Do not generate recommendations without both inputs.
  • Use Structured Interaction when available; fall back to two plain-text questions otherwise.

Workflow

Step 0: Workflow Memory Check

  • Read .planning/workflow-memory.json. If file missing or empty, skip to Step 1.
  • Check if the last 1-2 log entries form a recognized pattern with ppw:visualization that has appeared >= threshold times in the log. See skill-conventions.md > Workflow Memory > Pattern Detection for the full algorithm.
  • If a pattern is found, present recommendation via AskUserQuestion:
    • Question: "检测到常用流程:[pattern](已出现 N 次)。是否直接以 direct 模式运行 ppw:visualization?"
    • Options: "Yes, proceed" / "No, continue normally"
  • If user accepts: set mode to direct, skip Ask Strategy questions.
  • If user declines or AskUserQuestion unavailable: continue in normal mode.

Step 1 — Collect Context

  • Extract data description and research question from the trigger if present.
  • Ask for any missing inputs per Ask Strategy above.
  • Record workflow: Append {"skill": "ppw:visualization", "ts": "<ISO timestamp>"} to .planning/workflow-memory.json. Create file as [] if missing. Drop oldest entry if log length >= 50.

Step 2 — Detect Spatial Signals and Select Chart Candidates

  • Follow the Core Prompt constraints above — use the 标准学术图表库 as the primary reference for chart selection.
  • Scan the data description for spatial signal keywords: "coordinates", "latitude", "longitude", "spatial", "region", "district", "administrative", "polygon", "GIS", "map", "geospatial", "study area", "choropleth", "raster", "urban" (see Edge Cases for "urban" boundary handling).
  • Spatial signals present: include geography chart types as candidates (choropleth map, spatial scatter plot, kernel density map, hexbin map) alongside general types (bar chart, line chart, scatter plot, box plot, violin plot, heatmap).
  • No spatial signals: use only general chart types — never recommend choropleth or spatial scatter for non-spatial data.
  • Select 2–3 chart types ordered by fit. Best fit first.
  • Use the research question to break ties: "distribution" → histogram/box; "comparison" → bar; "trend" → line; "correlation" → scatter; "spatial pattern" → choropleth/spatial scatter.

Step 3 — Generate Recommendation Cards

  • Write 2–3 cards using the locked format below.
  • The reason must reference the user's specific data and question — not generic descriptions.
  • Tool hints: when spatial data detected, include geopandas/contextily/tmap; when non-spatial, include matplotlib/seaborn/ggplot2.
  • No code blocks — library and function names only (e.g., geopandas.plot(), seaborn.boxplot()).

Locked card format:

**Recommendation N: [Chart Type Name]**
- Why it fits: [1–2 sentences directly referencing the user's data type and research question]
- Tool hints: Python: [library.function()]; R: [package + geom/function]

Output Contract

OutputFormatCondition
recommendation_list2–3 numbered recommendation cards displayed in conversationAlways — conversation only

Spatial data example (3 cards):

Recommendation 1: Choropleth Map

  • Why it fits: Your district-level green space coverage data maps directly to administrative polygon units — choropleth encodes the continuous coverage variable as color fill across spatial units.
  • Tool hints: Python: geopandas.plot(), matplotlib; R: ggplot2 + sf + tmap

Recommendation 2: Spatial Scatter Plot

  • Why it fits: If point-level measurements exist within districts, scatter placement shows within-district variation and spatial clustering.
  • Tool hints: Python: geopandas.plot(), contextily for basemap; R: ggplot2 + geom_sf()

Recommendation 3: Kernel Density Map

  • Why it fits: When point density matters more than precise values, kernel density smoothing reveals spatial hotspots and avoids overplotting.
  • Tool hints: Python: scipy.stats.gaussian_kde, seaborn.kdeplot(); R: ggplot2 + stat_density_2d()

Non-spatial data example (2 cards):

Recommendation 1: Grouped Bar Chart

  • Why it fits: Three neighborhoods with satisfaction score means are directly comparable side-by-side; grouped bars make between-group differences immediately readable.
  • Tool hints: Python: seaborn.barplot(), matplotlib; R: ggplot2 + geom_bar()

Recommendation 2: Violin Plot

  • Why it fits: Satisfaction score distributions (1–5 scale, 500 respondents) benefit from showing full shape rather than just means — violin reveals whether distributions are bimodal or skewed.
  • Tool hints: Python: seaborn.violinplot(); R: ggplot2 + geom_violin()

Edge Cases

SituationHandling
No spatial signals in data description but user explicitly requests a mapExplain why a map may not be appropriate for non-spatial data; offer to include spatial chart types if user confirms data has a spatial dimension
Data description mentions "urban" or "city" without explicit spatial coordinatesTreat as boundary case: ask "Does your data include spatial coordinates or administrative unit boundaries?" before including spatial chart types
Only one variable mentioned in data descriptionAcknowledge limited dimensionality; recommend univariate charts (histogram, bar chart) suited to the constraint
User provides a file path instead of a data descriptionAsk user to describe the data instead: "Please describe your data (type, variables, sample size) — I cannot read data files directly"
User asks for "best" chart without any contextRun Ask Strategy; do not guess from insufficient information
Research question is ambiguous (e.g., "show the results")Ask for clarification: "What aspect of the results should the figure communicate — distribution, comparison, trend, or spatial pattern?"

Fallbacks

ScenarioFallback
Structured Interaction unavailableAsk data description and research question as two sequential plain-text questions; proceed with same recommendation logic
Data description too vague to determine spatial vs. non-spatialDefault to non-spatial chart types; note: "If your data has a spatial dimension, include that in the description for geography-aware recommendations"
Research question not answerable by a single chart typeAcknowledge and recommend the chart type that covers the primary question; note the secondary question as a candidate for a separate figure

Examples

Example 1 — Spatial data:

User: "I have district-level urban green space coverage data for 50 districts in Shenzhen. Research question: how does green space vary spatially across districts?"

Spatial signals detected: "district", "Shenzhen" (urban + administrative unit context confirmed). Three recommendations generated using geopandas (Python) and tmap (R) tool hints. Cards: Choropleth Map (best fit for polygon-unit continuous variable), Spatial Scatter Plot (if point data exists), Kernel Density Map (if density pattern is the focus).

Example 2 — Non-spatial data:

User: "I have survey responses from 500 residents on satisfaction scores (1–5) for three neighborhoods. Research question: how do satisfaction scores compare across neighborhoods?"

No spatial signals detected. Two recommendations generated using seaborn and ggplot2 tool hints. Cards: Grouped Bar Chart (comparison across three groups), Violin Plot (shows full score distribution shape). No geography chart types included.


Skill: visualization-skill Conventions: references/skill-conventions.md

Sponsors

Details

Marketplace
Lylll9436/Paper-Polish-Workflow-skill
Source
https://github.com/Lylll9436/Paper-Polish-Workflow-skill.git
Category
Community