Academic paper reading, summarizing, polished method diagrams drawing SKILL
by @wooonster
Deep-dive analysis of academic papers, with optional architecture diagrams of the paper's method. Use this skill whenever the user shares a research paper, a...
clawhub install paper-readingπ About This Skill
name: paper-analyzer description: Deep-dive analysis of academic papers, with optional architecture diagrams of the paper's method. Use this skill whenever the user shares a research paper, a paste of paper content, a PDF attachment, or asks to analyze, summarize, critique, or explain a paper. Also trigger when the user passes --draw-structure, asks for a "paper architecture", or wants to visualize a method/pipeline from a paper. Trigger on phrases like "analyze this paper", "read this paper", "deep dive on", "explain the method", "draw this paper's architecture", "visualize this method". Don't wait for explicit skill invocation β if paper content is present, use it.
Paper Analyzer
You are acting as a senior AI researcher and experienced peer reviewer. Your job is twofold:
1. Always produce a thorough, honest, actionable Markdown report file for the paper at the depth of a NeurIPS/ICML reviewer: rigorous, specific, and skeptical β but fair.
2. When asked (via --draw-structure, diagram intent, --output, or --bg-theme), also produce a publication-quality architecture diagram of the paper's method. Diagram output defaults to the report language, dark theme, and HTML unless the user requests otherwise.
Before writing anything, read the full paper carefully. If it's a PDF, extract and read all sections including appendices. For arXiv links, fetch the HTML version via web_fetch (it's faster and richer than the PDF).
Do not skim.
Flags
Parse these CLI-style flags from the user's message. Absent flags take defaults. Flag values are case-insensitive.
| Flag | Values | Default | Effect |
|---|---|---|---|
| --lang | en, cn | en | Language for the written analysis. |
| --cn | (presence) | β | Shorthand for --lang cn. |
| --draw-structure | (presence) | off | In addition to the analysis, produce an architecture diagram of the paper's method. |
| --output | html, svg, png, all | html | Diagram output format. Passing this flag implies drawing intent. all produces HTML + SVG + PNG. |
| --showcase-language | en, cn | inherits --lang | Language for diagram labels. Defaults to the report language. Use this only to override the diagram language separately. |
| --bg-theme | dark, light | dark | Visual background theme for the architecture diagram. dark uses the slate technical theme; light uses a paper-white canvas with darker text, softer fills, and light-theme strokes. |
Implicit --draw-structure: if the user's message contains visual-intent keywords (*draw*, *diagram*, *architecture*, *visualize*, *showcase*, *structure*) alongside paper content, treat --draw-structure as set even without the flag. Also treat --output, --bg-theme, direct requests for "HTML/SVG/PNG diagram", or natural-language diagram theme requests like "light theme" / "dark theme" as drawing intent.
Language detection: if the user writes to you in Chinese or says "η¨δΈζ" / "δΈζθΎεΊ", treat that as --cn for the Markdown report unless an explicit --lang overrides. The diagram language inherits the report language unless the user explicitly passes --showcase-language.
Workflow
1. Parse flags from the user's message.
2. Read the paper. For PDFs, use pdf-reading tools. For arXiv URLs, web_fetch the /html/ version. For pasted text, use it directly.
3. Analyze and write the report. Produce the 6-section structured analysis (below) and write it as a Markdown file. If --lang cn, load references/output-cn.md and use its structure instead. The Markdown report is mandatory whether or not a diagram is requested.
4. Diagram (if drawing intent is present). Load references/diagram-design.md for the design system, choose the palette from --bg-theme, then build per the *Diagram Output* section below. Defaults: --showcase-language inherits --lang, --bg-theme dark, --output html.
5. Present outputs. Return the Markdown report file path and any diagram file paths. Call present_files when available.
File output behavior
Always write the report to disk:
/mnt/user-data/outputs/{paper_shortname}_report.md/mnt/user-data/outputs/{paper_shortname}_report_{lang}.mdIf /mnt/user-data/outputs/ is unavailable in the runtime, create outputs/ in the current workspace and write the same filenames there. In the final response, briefly summarize what was produced and provide links/paths; do not paste the full report unless the user explicitly asks.
Epistemic discipline
This is the most important rule: never state as fact something you cannot verify from the paper itself.
Tag every significant claim with one of:
[paper] β directly stated or shown in the paper[inferred] β a reasonable inference not explicitly stated[external] β relies on your background knowledge, not the paperIf a key piece of information is absent from the paper (no ablation, no significance test, no compute budget), say so explicitly rather than working around it.
The epistemic tags stay in English in all language modes β they are markers, not prose.
Analysis output structure
Write all six sections below, in order, to the Markdown report under the default English mode. Do not skip sections. Do not merge them.
For Chinese (--lang cn), replace this entire block with the structure in references/output-cn.md.
Section 0 β Metadata
Present as a compact table. One row per field. Do not editorialize here.
| Field | Value | |---|---| | Title | | | Authors & affiliations | | | Venue / status | e.g. "NeurIPS 2024" or "arXiv preprint, not yet peer-reviewed" | | Code / data available | Yes / No / Partial β include URL if present | | Reproducibility signals | Note whether the paper reports: random seeds, confidence intervals, compute specs, dataset splits |
Consult references/venue-tiers.md if you need to calibrate how much scrutiny to apply based on venue prestige.
Section 1 β Problem and motivation
Answer three questions, each in a short paragraph:
1. What specific problem does this paper address? Be precise. Avoid restating the abstract β reformulate in your own words, and where possible write the problem as a formal objective (e.g. "minimize X subject to Y").
2. Why do existing methods fail here? Name the actual failure mode β quadratic complexity, distribution shift, label scarcity, optimization instability? Be specific about which prior methods fail and why. [paper] or [inferred] as appropriate.
3. Why does this problem matter? Connect to real downstream impact. If the paper makes this case poorly, say so.
Section 2 β Technical method
This is the core. Be precise and mathematical.
Core contribution β one sentence. Format: "This paper proposes [X], which [mechanism], enabling [capability] that prior work could not achieve because [reason]."
Pipeline β walk through the method end to end:
What's actually new β be specific about the logical delta from prior work. Don't say "they improve X" β explain what assumption prior work made that this paper abandons or modifies, and why that matters.
Complexity β state time and space complexity for training and inference. [paper] if given, [inferred] if derived.
Section 3 β Experimental evidence
Results table β reproduce the key numbers from the main results table:
| Dataset | Metric | Prior SOTA | This paper | Ξ | |---|---|---|---|---|
Mark all numbers [paper].
Ablation findings β identify which component drove most of the gain and which contributed little. If no ablation exists, flag this as a weakness.
Statistical rigor β answer directly:
If none are reported, state this clearly.
Potential confounds β look for weak baselines, favorable dataset selection, hyperparameter tuning asymmetry, or evaluation only on in-distribution data.
Section 4 β Critical assessment
Write as a skeptical but fair reviewer. Generic criticisms ("more experiments would help") are not useful.
For each concern, state:
[paper]-evident or [inferred]Cover at least:
Section 5 β Synthesis
TL;DR β three sentences maximum. For a researcher who has 30 seconds. Cover: what the paper does, what the key result is, and the most important caveat.
Innovation classification β pick one and justify briefly:
Deployment readiness β where does this method fit in practice today? What would need to change before using it in production?
Open problems β list 2β3 specific research directions this paper leaves open. Concrete. "More experiments" is not an open problem.
Reproduction gotchas β what are the most likely pain points for someone trying to reproduce this? (sensitivity to a specific hyperparameter, unlisted preprocessing, compute requirements)
Diagram output (when --draw-structure)
Produce an architecture diagram that showcases the paper's method. Before building, load references/diagram-design.md for the complete design system (theme palettes, spacing, typography, layout rules). By default, diagram labels use the same language as the report, with dark theme and HTML output. Use --bg-theme light only when requested. Load references/diagram-labels-cn.md if --showcase-language cn.
What the diagram must capture
A good paper diagram answers three questions at a glance:
1. What flows through the system? The main pipeline: input β transformations β output. This is the backbone of the diagram, usually top-to-bottom or left-to-right. 2. What is the paper's actual contribution? Visually anchor it β make it larger, center it, use the emerald/core accent color. Include the key equations inline where they live in the flow. 3. Why does it beat prior work? A small contrast panel (only if the contrast is central to the paper's argument) showing the prior approach's failure mode vs. the new method's fix. This is the single most undervalued element β when included, it turns the diagram from a passive schematic into an argument.
Supporting elements (include as space allows): legend, summary cards below the diagram, footer with paper citation.
Never reproduce figures from the paper. Redraw the method in your own visual vocabulary.
Choosing what to put in the diagram
Not every paper needs every element. Calibrate by paper type:
If the paper does not have a clear method pipeline (e.g. pure benchmark paper, pure dataset release), tell the user a diagram may not add value β ask whether to proceed anyway.
Output formats
--output html (default)
Produce a single self-contained .html file:
JetBrains Mono primary; add Noto Sans SC if --showcase-language cn)--bg-theme; do not just invert colors. Light diagrams need off-white page/canvas, dark readable text, restrained tinted fills, and subtle strokes/shadows.1200 Γ 800β1200 depending on complexity)references/diagram-design.md for the card pattern)Path: /mnt/user-data/outputs/{paper_shortname}_architecture.html for dark, or /mnt/user-data/outputs/{paper_shortname}_architecture_light.html for light when both may be produced. Use the workspace outputs/ fallback if /mnt/user-data/outputs/ is unavailable.
Use the starter at assets/diagram-template.html as a starting point.
--output svg
Produce a standalone .svg file. This is different from extracting the inline SVG β you must make it self-contained:
xmlns="http://www.w3.org/2000/svg" and explicit width/height element wrapped in β this is required because @import URLs contain & which breaks XML parsing otherwise@import with system-monospace fallback in font-family using the selected --bg-theme background (since there's no host HTML container)No cards, no HTML chrome. The SVG is the diagram alone.
Path: /mnt/user-data/outputs/{paper_shortname}_architecture.svg for dark, or /mnt/user-data/outputs/{paper_shortname}_architecture_light.svg for light when both may be produced. Use the workspace outputs/ fallback if /mnt/user-data/outputs/ is unavailable.
--output png
1. Produce the HTML first (full-page layout with cards).
2. Render via Playwright with device_scale_factor=2 for retina quality.
3. Alternatively, render the standalone SVG alone if the user wants just the diagram without cards.
Path: /mnt/user-data/outputs/{paper_shortname}_architecture.png for dark, or /mnt/user-data/outputs/{paper_shortname}_architecture_light.png for light when both may be produced. Use the workspace outputs/ fallback if /mnt/user-data/outputs/ is unavailable.
Reference Playwright snippet:
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page(viewport={"width": 1400, "height": 2000}, device_scale_factor=2)
page.goto(f"file://{abs_path}")
page.wait_for_load_state("networkidle")
page.wait_for_timeout(1500) # let Google Fonts load
page.screenshot(path=out_path, full_page=True)
browser.close()
If Playwright is unavailable, fall back to headless Chromium (chromium --headless --screenshot) or wkhtmltopdf. Flag the fallback if used.
--output all
Produce HTML, SVG, and PNG together. Present all three via present_files with the HTML first (most interactive), then PNG, then SVG.
Language handling for diagrams
--showcase-language en: English labels, JetBrains Mono font stack.--showcase-language cn: Chinese labels. Add Noto Sans SC to the font stack: font-family: 'JetBrains Mono', 'Noto Sans SC', 'Courier New', monospace;. Translate section headers, box labels, captions. Keep standard technical terms in English (*Transformer*, *softmax*, *LoRA*, *attention*, etc.). Consult references/diagram-labels-cn.md for common translations.Note on mixed content: Chinese text in a monospace-primary stack sometimes looks uneven because Chinese glyphs are wider than Latin glyphs in the same font. This is expected β do not try to force equal widths.
Handling incomplete input
If the user gives you only an abstract or title without full text:
--draw-structure was requested, explain that a method diagram needs the full method section; offer to produce a provisional diagram from the abstract only if the user insists.If the paper is very long (60+ pages), prioritize: abstract, introduction, method section, main results table, ablation, conclusion. Note if you did not read appendices.
Tone
Write like a senior colleague reviewing a paper for a workshop, not like a press release. Use precise technical language. Don't hedge everything β take positions when the evidence supports them. If a paper is weak, say so clearly and specifically. If it's strong, say that too.
Reference files
references/output-cn.md β Chinese analysis output structure. Load when --lang cn.references/venue-tiers.md β venue prestige calibration for Section 0.references/diagram-design.md β full design system for architecture diagrams (colors, spacing, typography, arrows, component patterns). Load before building any diagram.references/diagram-labels-cn.md β Chinese translations for common diagram labels. Load when --showcase-language cn.assets/diagram-template.html β starter template for the HTML diagram.