[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74MP9DZZGK1ER758JBVTYSF":3,"skill-same:01M74MP9DZZGK1ER758JBVTYSF":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M74MP9DZZGK1ER758JBVTYSF","drawio-paper",null,"Generate publication-quality academic paper diagrams (.drawio) and statistical plots (.png via Python\u002Fmatplotlib) using a PaperBanana-inspired multi-agent pipeline. Reads methodology sections, figure captions, and raw data to produce structured, aesthetically refined visualizations with reference-driven design.","pengqianhan\u002FAI-Human-Research-OS","pengqianhan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4286531?v=4","01M74M3DT9HNZ6HPAK8TX69EX9","PengqianHan","01M74M3DTVSN2GXW0JH2W396FK",3,"MIT","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fopen-paper-skills\u002Fdrawio-paper\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: drawio-paper\ndescription: Generate publication-quality academic paper diagrams (.drawio) and statistical plots (.png via Python\u002Fmatplotlib) using a PaperBanana-inspired multi-agent pipeline. Reads methodology sections, figure captions, and raw data to produce structured, aesthetically refined visualizations with reference-driven design.\nallowed-tools: Bash, Write, Read, Glob\n---\n\n# Academic Paper Visualization Skill (Diagrams + Plots)\n\nGenerate publication-quality academic paper visualizations using a structured multi-agent pipeline inspired by PaperBanana. This skill supports two output modes:\n\n- **Diagram mode**: Transforms methodology sections and figure captions into polished `.drawio` diagrams through retrieval, planning, styling, visualization (XML generation), and critique stages.\n- **Plot mode**: Transforms raw data (tabular\u002FJSON) and visual intent into publication-ready statistical plots via Python\u002Fmatplotlib code generation, following the same retrieval, planning, styling, visualization (code generation + execution), and critique pipeline.\n\n## Setup (run once before first use)\n\nBefore generating diagrams or plots, ensure the PaperBananaBench reference dataset is available locally. **Check if `{skill_dir}\u002FPaperBananaBench\u002Fdiagram\u002Fref.json` and `{skill_dir}\u002FPaperBananaBench\u002Fplot\u002Fref.json` both exist.** If either is missing, run the following setup steps:\n\n```bash\n# 1. Download PaperBananaBench.zip directly from Hugging Face\ncurl -L -o \"{skill_dir}\u002FPaperBananaBench.zip\" https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fdwzhu\u002FPaperBananaBench\u002Fresolve\u002Fmain\u002FPaperBananaBench.zip\n\n# 2. Run the bundled extraction script (works on Windows, macOS, Linux)\npython \"{skill_dir}\u002Fscripts\u002Fextract_bench.py\"\n```\n\n### Python environment for plots\n\nPlots are generated using Python + matplotlib. Ensure the following packages are available:\n\n```bash\npip install matplotlib numpy pillow\n```\n\n**Important notes:**\n- `{skill_dir}` refers to the directory containing this SKILL.md file (`.claude\u002Fskills\u002Fdrawio-paper\u002F`)\n- Only requires `curl` and Python (stdlib `zipfile`), no git or git-lfs needed\n- Python extraction is used instead of `unzip` to reliably handle long paths on Windows\n- If the download fails due to network issues, retry or ask the user to manually download from https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fdwzhu\u002FPaperBananaBench\u002Fresolve\u002Fmain\u002FPaperBananaBench.zip and place it at `{skill_dir}\u002FPaperBananaBench.zip`, then run the Python extraction step\n- After setup, `{skill_dir}\u002FPaperBananaBench\u002Fdiagram\u002F` and `{skill_dir}\u002FPaperBananaBench\u002Fplot\u002F` should each contain `ref.json`, `test.json`, and an `images\u002F` folder with reference images\n\n## When to use this skill\n\n### Diagram mode\nUse when the user wants to create academic paper diagrams, such as:\n- Framework\u002Farchitecture overview diagrams\n- Pipeline\u002Fworkflow diagrams\n- Method illustration diagrams\n- Module detail diagrams\n- System design diagrams for research papers\n\nTrigger keywords: \"paper diagram\", \"academic diagram\", \"method diagram\", \"framework diagram\", \"pipeline diagram\", \"research figure\", \"paper figure\", \"drawio paper\", \"academic illustration\"\n\n### Plot mode\nUse when the user wants to create publication-quality statistical plots, such as:\n- Bar charts, grouped bar charts, stacked bar charts\n- Line charts with confidence intervals\n- Scatter plots with shape\u002Fcolor coding\n- Heatmaps and confusion matrices\n- Radar\u002Fspider charts\n- Pie\u002Fdonut charts\n- Box plots, violin plots\n- Any statistical visualization for academic papers\n\nTrigger keywords: \"paper plot\", \"academic plot\", \"research plot\", \"statistical plot\", \"bar chart\", \"line chart\", \"scatter plot\", \"heatmap\", \"paper chart\", \"matplotlib plot\", \"publication plot\", \"results plot\", \"comparison plot\"\n\n### Mode detection\n- If the user provides **methodology text + figure caption** → Diagram mode\n- If the user provides **raw data (table\u002FJSON\u002FCSV) + visual intent** → Plot mode\n- If ambiguous, ask the user which mode they want\n\n## Pipeline overview\n\nFollow this 5-stage pipeline to generate each visualization (diagram or plot). Stages 1-3 and 5 share the same structure for both modes; Stage 4 differs based on the output type.\n\n### Stage 1: Reference Retrieval\n\nBefore generating, **always** look at reference images from the benchmark dataset to understand the visual style expected.\n\n**For Diagram mode:**\n1. Read the reference metadata from `{skill_dir}\u002FPaperBananaBench\u002Fdiagram\u002Fref.json` and `{skill_dir}\u002FPaperBananaBench\u002Fdiagram\u002Ftest.json`\n2. Based on the user's topic (domain) and visual intent (diagram type), select 3-5 relevant reference images to study\n3. Use the Read tool to view the selected reference images from `{skill_dir}\u002FPaperBananaBench\u002Fdiagram\u002Fimages\u002F`\n4. Note the visual patterns: layout structure, color schemes, grouping strategies, icon usage, arrow styles\n\n**For Plot mode:**\n1. Read the reference metadata from `{skill_dir}\u002FPaperBananaBench\u002Fplot\u002Fref.json` and `{skill_dir}\u002FPaperBananaBench\u002Fplot\u002Ftest.json`\n2. Based on the user's data type and desired plot type, select 3-5 relevant reference plot images to study\n3. Use the Read tool to view the selected reference images from `{skill_dir}\u002FPaperBananaBench\u002Fplot\u002Fimages\u002F`\n4. Note the visual patterns: color palette, axis styling, legend placement, annotation style, chart type conventions\n\n**Selection logic (from PaperBanana Retriever Agent):**\n- **Match Research Topic:** Find references in the same domain (e.g., Agent\u002FReasoning, Vision\u002FPerception, Generative\u002FLearning, Science\u002FApplications)\n- **Match Visual Intent:** Find references with similar visualization types (e.g., Framework diagram, Bar chart, Line chart, Heatmap)\n- **Priority:** Same Topic + Same Visual Intent > Same Visual Intent > Same Topic\n\n### Stage 2: Planning\n\nBased on the user's input and the reference images studied, create a detailed textual description.\n\n**For Diagram mode** (input: methodology section + figure caption):\n\n1. Create a detailed textual description of the diagram to generate, including:\n   - All components and their relationships\n   - Data flow direction (typically left-to-right or top-to-bottom)\n   - Grouping\u002Fcontainment hierarchy\n   - Labels for every element\n   - Mathematical notation where appropriate\n\n2. The description should be **as detailed as possible**:\n   - Clearly describe each element and their connections\n   - Include background style, colors, line thickness, icon styles\n   - Specify layout structure (horizontal pipeline, vertical stack, grid, etc.)\n\n**For Plot mode** (input: raw data + visual intent):\n\n1. Create a detailed textual description of the plot to generate, including:\n   - Precise mapping of variables to visual channels (x-axis, y-axis, hue\u002Fcolor, size, shape)\n   - Explicitly enumerate **every raw data point's coordinate** to ensure accuracy\n   - Chart type selection and justification\n   - All axis labels, tick values, and units\n   - Legend content and placement\n\n2. The description should specify **exact aesthetic parameters**:\n   - Specific HEX color codes for each data series\n   - Font sizes for all labels (title, axes, ticks, legend, annotations)\n   - Line widths, marker dimensions, bar widths\n   - Grid style (dashed\u002Fdotted, color, alpha)\n   - Legend placement (inside plot, top horizontal, etc.)\n\n### Stage 3: Style Refinement\n\n**For Diagram mode:**\n\nApply the NeurIPS 2025 academic diagram style guide (stored at `{skill_dir}\u002Fneurips2025_diagram_style_guide.md`) to refine the planned description:\n\n**Key style principles:**\n- **Color:** \"Soft Tech & Scientific Pastels\" - use light pastel backgrounds (#E6F3FF, #F3E5F5, #E0F2F1, #F5F5DC) for zones, medium saturation for active modules\n- **Shapes:** \"Softened Geometry\" - rounded rectangles for processes, 3D cuboids for tensors, cylinders for databases\n- **Lines:** Orthogonal edges for architectures, curved for data flow; solid for forward pass, dashed for auxiliary\u002Fgradient flow\n- **Typography:** Sans-serif (Arial) for labels, serif (Times New Roman) for math variables\n- **Icons:** Use semantic icons (snowflake=frozen, fire=trainable, gear=processing)\n- **Background:** Pure white or very light pastels; avoid saturated backgrounds\n- **No figure caption text** inside the diagram itself\n\n**Domain-specific styles:**\n- **Agent\u002FLLM papers:** Illustrative, friendly, chat bubbles, robot avatars\n- **Computer Vision\u002F3D:** Spatial, dense, geometric, RGB color coding, heatmaps\n- **Theoretical\u002FOptimization:** Minimalist, abstract, graph nodes, mostly grayscale\n\n**For Plot mode:**\n\nApply the NeurIPS 2025 statistical plot aesthetics guide (stored at `{skill_dir}\u002Fneurips2025_plot_style_guide.md`) to refine the planned description. Focus on specifying visual attributes without altering data content.\n\n**Key style principles:**\n- **Color palettes:** Soft pastels for categorical data; Viridis\u002FMagma for sequential; avoid Jet\u002FRainbow\n- **Axes & grids:** Fine dashed or dotted grid lines in light gray, behind data; either \"boxed\" (4 spines) or \"open\" (no top\u002Fright)\n- **Typography:** Sans-serif fonts (Arial, Helvetica, DejaVu Sans); rotate x-labels 45° only when necessary\n- **Legends:** Float inside plot area or place as horizontal row above plot\n- **Annotations:** Prefer direct labeling over forcing legend references\n- **Background:** White or very light gray (Seaborn-style)\n- **Accessibility:** Combine color with shape\u002Fpattern (hatches, markers) for colorblind support\n- **No figure caption** inside the plot itself\n\n**Chart-type-specific guidelines:**\n- **Bar charts:** Black outlines or borderless fills; tight grouping; error bars with black flat caps\n- **Line charts:** Always include geometric markers at data points; dashed lines for baselines; shaded confidence bands\n- **Scatter plots:** Different marker shapes for categories; solid opaque fills\n- **Heatmaps:** Square cells; annotate exact values inside cells; use perceptually uniform colormaps\n- **Pie\u002FDonut:** Thick donut preferred; white borders between slices; explode key slices\n- **Radar charts:** Translucent polygon fills (alpha ~0.2); solid outer perimeter\n\n### Stage 4: Visualization Generation\n\n**Choose the appropriate sub-stage based on mode:**\n\n### Stage 4A: Draw.io XML Generation (Diagram mode)\n\nTransform the styled description into draw.io XML. Follow ALL rules from the base drawio skill:\n\n#### Basic XML structure\n\n```xml\n\u003CmxGraphModel>\n  \u003Croot>\n    \u003CmxCell id=\"0\"\u002F>\n    \u003CmxCell id=\"1\" parent=\"0\"\u002F>\n    \u003C!-- Diagram cells go here with parent=\"1\" -->\n  \u003C\u002Froot>\n\u003C\u002FmxGraphModel>\n```\n\n#### Academic diagram design patterns\n\n**Pattern 1: Horizontal Pipeline (most common)**\n- Left-to-right flow with major stages as titled swimlane containers\n- Internal components as rounded rectangles within each stage\n- Arrows connecting stages with orthogonal edges\n\n**Pattern 2: Vertical Architecture Stack**\n- Top-to-bottom layer stack (input at top, output at bottom)\n- Each layer as a rounded rectangle with fill color indicating type\n- Skip connections shown as curved dashed lines\n\n**Pattern 3: Multi-module Detail**\n- Central overview with breakout detail boxes connected by lines\n- \"Macro-Micro\" pattern: overview container + zoomed-in module details\n\n#### Color palette for academic diagrams\n\n| Purpose | Color | Hex |\n|---------|-------|-----|\n| Background zone - blue | Pale Ice Blue | #E6F3FF |\n| Background zone - green | Pale Mint | #E0F2F1 |\n| Background zone - purple | Pale Lavender | #F3E5F5 |\n| Background zone - warm | Cream\u002FBeige | #FFF8E1 |\n| Active module - blue | Soft Blue | #DAE8FC |\n| Active module - green | Soft Green | #D5E8D4 |\n| Active module - orange | Soft Orange | #FFE6CC |\n| Active module - pink | Soft Pink | #F8CECC |\n| Frozen\u002Fstatic element | Light Grey | #F5F5F5 |\n| Highlight\u002Foutput | Gold accent | #FFF2CC |\n| Trainable element | Warm tone | #FFE0B2 |\n| Frozen element | Cool grey | #E0E0E0 |\n| Border - blue | Medium Blue | #6C8EBF |\n| Border - green | Medium Green | #82B366 |\n| Border - orange | Medium Orange | #D6B656 |\n| Border - red | Medium Red | #B85450 |\n\n#### Layout rules\n\n- **Generous spacing:** At least 200px horizontal gap, 120px vertical gap between major groups\n- **Grid alignment:** Align all nodes to multiples of 10\n- **Container padding:** At least 20px padding inside containers; startSize=30 for swimlane headers\n- **Font sizes:** 14-16px for major labels, 11-12px for detail labels, 10px for annotations\n- **Edge routing:** Use orthogonalEdgeStyle with rounded=1 for clean bends\n- **Leave room for arrowheads:** At least 20px straight segment before targets\n\n#### Container usage for grouping\n\nUse draw.io containers for logical grouping (stages, modules):\n\n```xml\n\u003C!-- Stage container using swimlane -->\n\u003CmxCell id=\"stage1\" value=\"Stage 1: Encoding\" style=\"swimlane;startSize=30;fillColor=#E6F3FF;strokeColor=#6C8EBF;rounded=1;arcSize=8;fontStyle=1;fontSize=14;fontFamily=Arial;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"40\" y=\"80\" width=\"300\" height=\"400\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Components inside the stage (note parent=\"stage1\" and relative coords) -->\n\u003CmxCell id=\"enc1\" value=\"Encoder\" style=\"rounded=1;whiteSpace=wrap;fillColor=#DAE8FC;strokeColor=#6C8EBF;fontSize=12;fontFamily=Arial;\" vertex=\"1\" parent=\"stage1\">\n  \u003CmxGeometry x=\"20\" y=\"50\" width=\"120\" height=\"50\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n```\n\n#### Math notation in labels\n\nUse HTML formatting for mathematical symbols:\n```xml\n\u003CmxCell id=\"loss\" value=\"&lt;i&gt;L&lt;\u002Fi&gt; = &amp;sum; &lt;i&gt;L&lt;\u002Fi&gt;&lt;sub&gt;i&lt;\u002Fsub&gt;\" style=\"text;html=1;align=center;fontFamily=Times New Roman;fontSize=12;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"200\" y=\"500\" width=\"100\" height=\"30\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n```\n\n#### Semantic icons as text labels\n\nUse Unicode\u002Femoji characters in `value` attributes for semantic icons. Place them as standalone text cells or inline with labels.\n\n```xml\n\u003CmxCell id=\"icon_example\" value=\"&#10052;\" style=\"text;fontSize=16;align=center;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"150\" y=\"90\" width=\"24\" height=\"24\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n```\n\n**Complete emoji reference for academic diagrams:**\n\n**Model State**\n\n| Icon | Emoji | HTML Entity | Meaning | Usage |\n|------|-------|-------------|---------|-------|\n| Snowflake | ❄ | `&#10052;` | Frozen \u002F Non-trainable | Frozen encoder, fixed weights |\n| Fire | 🔥 | `&#128293;` | Trainable \u002F Active learning | Fine-tuning layers, trainable heads |\n| Lightning | ⚡ | `&#9889;` | Fast \u002F Accelerated | Efficient inference, speedup |\n| Lock | 🔒 | `&#128274;` | Locked \u002F Protected | Frozen parameters, access control |\n| Unlock | 🔓 | `&#128275;` | Unlocked \u002F Released | Unfrozen for training |\n| Stop sign | 🛑 | `&#128721;` | Stopped \u002F Blocked | Non-trainable, gradient stop |\n\n**Agents & Roles**\n\n| Icon | Emoji | HTML Entity | Meaning | Usage |\n|------|-------|-------------|---------|-------|\n| Robot | 🤖 | `&#129302;` | AI Agent \u002F Model | LLM agent, autonomous module |\n| Person | 👤 | `&#128100;` | User \u002F Human | Human input, user query |\n| People | 👥 | `&#128101;` | Multi-user \u002F Crowd | Collaborative systems, multi-user |\n| Brain | 🧠 | `&#129504;` | Reasoning \u002F Intelligence | LLM core, reasoning module |\n| Thinking | 🤔 | `&#129488;` | Evaluation \u002F Critique | Critic agent, reviewer |\n| Detective | 🕵 | `&#128373;` | Investigation \u002F Analysis | Anomaly detection, inspection |\n| Teacher | 👨‍🏫 | `&#128104;&#8205;&#127979;` | Teaching \u002F Supervision | Teacher model, supervisor |\n| Student | 👨‍🎓 | `&#128104;&#8205;&#127891;` | Learning \u002F Student | Student model, distillation target |\n\n**Data & Content**\n\n| Icon | Emoji | HTML Entity | Meaning | Usage |\n|------|-------|-------------|---------|-------|\n| Document | 📄 | `&#128196;` | Text \u002F Document | Input text, paper, prompt |\n| Clipboard | 📋 | `&#128203;` | Plan \u002F List | Structured plan, task list |\n| Folder | 📁 | `&#128193;` | Dataset \u002F Collection | Data directory, file collection |\n| File cabinet | 🗃 | `&#128451;` | Storage \u002F Archive | Knowledge base, data store |\n| Database | 🗄 | `&#128452;` | Database \u002F Repository | Vector DB, model repository |\n| Image | 🖼 | `&#128444;` | Image \u002F Visual data | Image input, visual features |\n| Speech | 💬 | `&#128172;` | Chat \u002F Dialogue | Prompt, conversation, chat bubble |\n| Label | 🏷 | `&#127991;` | Tag \u002F Annotation | Class label, metadata tag |\n| Book | 📚 | `&#128218;` | Knowledge \u002F Corpus | Training corpus, reference library |\n| Newspaper | 📰 | `&#128240;` | Article \u002F Report | Paper, news, generated report |\n\n**Operations & Processing**\n\n| Icon | Emoji | HTML Entity | Meaning | Usage |\n|------|-------|-------------|---------|-------|\n| Gear | ⚙ | `&#9881;` | Processing \u002F Computation | Model inference, computation |\n| Magnifier | 🔍 | `&#128269;` | Search \u002F Retrieval | Retrieval, attention, inspection |\n| Wrench | 🔧 | `&#128295;` | Configuration \u002F Tuning | Hyperparameter tuning, adjustment |\n| Scissors | ✂ | `&#9986;` | Pruning \u002F Cutting | Model pruning, token trimming |\n| Filter | 🔽 | `&#128317;` | Filtering \u002F Selection | Feature selection, data filtering |\n| Shuffle | 🔀 | `&#128256;` | Random \u002F Shuffle | Data augmentation, random sampling |\n| Cycle | 🔄 | `&#128260;` | Loop \u002F Iteration | Iterative refinement, feedback loop |\n| Link | 🔗 | `&#128279;` | Connection \u002F Linking | Cross-attention, entity linking |\n| Merge | 🔀 | `&#128256;` | Merge \u002F Combine | Feature fusion, model merging |\n\n**Evaluation & Results**\n\n| Icon | Emoji | HTML Entity | Meaning | Usage |\n|------|-------|-------------|---------|-------|\n| Checkmark | ✅ | `&#9989;` | Pass \u002F Correct | Correct prediction, quality pass |\n| Cross | ❌ | `&#10060;` | Fail \u002F Incorrect | Wrong prediction, rejected |\n| Trophy | 🏆 | `&#127942;` | Best \u002F Winner | Best model, SOTA result |\n| Chart up | 📈 | `&#128200;` | Improvement \u002F Growth | Performance gain, metric increase |\n| Chart down | 📉 | `&#128201;` | Decline \u002F Degradation | Performance drop, quality loss |\n| Target | 🎯 | `&#127919;` | Goal \u002F Objective | Target task, loss objective |\n| Star | ⭐ | `&#11088;` | Highlight \u002F Key result | Key contribution, important |\n| Warning | ⚠ | `&#9888;` | Caution \u002F Issue | Potential problem, limitation |\n\n**Domain-Specific**\n\n| Icon | Emoji | HTML Entity | Meaning | Usage |\n|------|-------|-------------|---------|-------|\n| Eye | 👁 | `&#128065;` | Vision \u002F Observation | Visual encoder, image perception |\n| Ear | 👂 | `&#128066;` | Audio \u002F Listening | Speech recognition, audio input |\n| Pen | ✍ | `&#9997;` | Writing \u002F Generation | Text generation, authoring |\n| Globe | 🌐 | `&#127760;` | Web \u002F Global | Internet retrieval, world knowledge |\n| DNA | 🧬 | `&#129516;` | Biology \u002F Sequence | Protein, genomics, molecular |\n| Atom | ⚛ | `&#9883;` | Physics \u002F Science | Scientific computing, simulation |\n| Microscope | 🔬 | `&#128300;` | Research \u002F Analysis | Detailed analysis, micro-level |\n| Telescope | 🔭 | `&#128301;` | Far-sighted \u002F Overview | Macro-level, global view |\n| Pill | 💊 | `&#128138;` | Medical \u002F Drug | Drug discovery, medical AI |\n| Tree | 🌳 | `&#127795;` | Tree structure \u002F Hierarchy | Decision tree, parse tree |\n| Network | 🕸 | `&#128376;` | Graph \u002F Network | Neural network, knowledge graph |\n| Dice | 🎲 | `&#127922;` | Random \u002F Stochastic | Sampling, probability, noise |\n| Thermometer | 🌡 | `&#127777;` | Temperature | Softmax temperature, scaling |\n| Hourglass | ⏳ | `&#9203;` | Time \u002F Temporal | Time series, sequence, latency |\n| Layer | 📊 | `&#128202;` | Layers \u002F Stack | Model layers, feature maps |\n| Key | 🔑 | `&#128273;` | Key \u002F Authentication | Attention key, API key, decryption |\n| Light bulb | 💡 | `&#128161;` | Idea \u002F Insight | Innovation, key finding |\n| Rocket | 🚀 | `&#128640;` | Launch \u002F Deploy | Model deployment, fast execution |\n| Shield | 🛡 | `&#128737;` | Defense \u002F Protection | Adversarial defense, safety |\n| Sword | ⚔ | `&#9876;` | Attack \u002F Adversarial | Adversarial attack, red-teaming |\n\n**Mathematical Operators** (use with `fontFamily=Times New Roman`)\n\n| Symbol | Name | HTML Entity | Usage |\n|--------|------|-------------|-------|\n| ⊕ | Circled plus | `&#8853;` | Element-wise addition, concatenation |\n| ⊗ | Circled times | `&#8855;` | Element-wise multiplication, outer product |\n| ⊙ | Circled dot | `&#8857;` | Hadamard product, dot product |\n| ∑ | Summation | `&#8721;` | Sum, aggregation |\n| ∏ | Product | `&#8719;` | Product operation |\n| → | Right arrow | `&#8594;` | Mapping, transformation |\n| ↔ | Left-right arrow | `&#8596;` | Bidirectional, mutual |\n| σ | Sigma | `&#963;` | Sigmoid, activation |\n| ∇ | Nabla | `&#8711;` | Gradient |\n| ∞ | Infinity | `&#8734;` | Unbounded, continuous |\n| ∈ | Element of | `&#8712;` | Membership, belongs to |\n| ≈ | Approximately | `&#8776;` | Approximation |\n| ∥ | Parallel | `&#8741;` | Norm, parallel |\n\n#### Dashed lines for auxiliary flow\n\n```xml\n\u003CmxCell id=\"grad_flow\" value=\"Gradient\" style=\"edgeStyle=orthogonalEdgeStyle;dashed=1;strokeColor=#999999;fontColor=#999999;fontSize=10;\" edge=\"1\" source=\"loss_node\" target=\"encoder\" parent=\"1\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n```\n\n#### Mathematical operators on edges\n\n```xml\n\u003C!-- Addition operator on connection -->\n\u003CmxCell id=\"add_op\" value=\"&#8853;\" style=\"ellipse;whiteSpace=wrap;fillColor=#FFFFFF;strokeColor=#666666;fontSize=14;fontFamily=Times New Roman;aspect=fixed;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"295\" y=\"195\" width=\"30\" height=\"30\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n```\n\n### Stage 4B: Python\u002FMatplotlib Code Generation (Plot mode)\n\nTransform the styled description into a complete, self-contained Python script using matplotlib. The script must generate and save a publication-quality plot.\n\n#### Code generation rules\n\n1. **Self-contained script:** The generated Python code must be a single, complete script that can run independently. All data must be embedded directly in the code (no external file reads).\n\n2. **Required imports:** Always include these at the top:\n```python\nimport matplotlib\nmatplotlib.use('Agg')  # Headless backend - MUST be before pyplot import\nimport matplotlib.pyplot as plt\nimport numpy as np\n```\n\n3. **Reset defaults:** Always call `plt.rcdefaults()` before setting custom styles to avoid inheriting stale state.\n\n4. **Output format:** Save the plot as PNG at 300 DPI with tight bounding box:\n```python\nplt.savefig('output_filename.png', format='png', dpi=300, bbox_inches='tight', facecolor='white')\nplt.close('all')\n```\n\n5. **No interactive elements:** Never use `plt.show()`. Always use `plt.savefig()` only.\n\n#### Matplotlib style template\n\nApply these NeurIPS 2025 style settings programmatically:\n\n```python\n# Font settings\nplt.rcParams.update({\n    'font.family': 'sans-serif',\n    'font.sans-serif': ['Arial', 'Helvetica', 'DejaVu Sans'],\n    'font.size': 12,\n    'axes.titlesize': 14,\n    'axes.labelsize': 13,\n    'xtick.labelsize': 11,\n    'ytick.labelsize': 11,\n    'legend.fontsize': 11,\n})\n\n# Grid and spine settings\nplt.rcParams.update({\n    'axes.grid': True,\n    'grid.alpha': 0.3,\n    'grid.linestyle': '--',\n    'grid.color': '#cccccc',\n    'axes.spines.top': True,     # or False for \"open\" look\n    'axes.spines.right': True,   # or False for \"open\" look\n})\n\n# Figure settings\nplt.rcParams.update({\n    'figure.facecolor': 'white',\n    'axes.facecolor': 'white',\n    'savefig.facecolor': 'white',\n    'figure.figsize': (8, 6),    # Adjust per chart type\n})\n```\n\n#### Recommended color palettes\n\n**Categorical (soft pastels for academic look):**\n```python\n# Soft academic palette\nCOLORS_PASTEL = ['#7EB6D9', '#F4A582', '#92C5A9', '#D4A5D0', '#F7DC6F', '#B0B0B0', '#E8927C', '#A8D8EA']\n\n# Muted earth tones\nCOLORS_EARTH = ['#4E79A7', '#F28E2B', '#E15759', '#76B7B2', '#59A14F', '#EDC948', '#B07AA1', '#FF9DA7']\n\n# High-contrast (use sparingly)\nCOLORS_CONTRAST = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f']\n```\n\n**Sequential\u002FHeatmap:** Use `'viridis'`, `'magma'`, `'plasma'`. Never use `'jet'` or `'rainbow'`.\n\n**Diverging:** Use `'coolwarm'` or `'RdBu_r'` for positive\u002Fnegative splits.\n\n#### Chart-type code patterns\n\n**Grouped bar chart:**\n```python\nx = np.arange(len(categories))\nwidth = 0.25\nfig, ax = plt.subplots(figsize=(10, 6))\nfor i, (label, values) in enumerate(data_series.items()):\n    bars = ax.bar(x + i * width, values, width, label=label,\n                  color=COLORS_PASTEL[i], edgecolor='black', linewidth=0.8)\nax.set_xticks(x + width * (len(data_series) - 1) \u002F 2)\nax.set_xticklabels(categories)\nax.legend(loc='upper left', framealpha=0.9)\n```\n\n**Line chart with markers and confidence bands:**\n```python\nfig, ax = plt.subplots(figsize=(10, 6))\nfor i, (label, y_vals) in enumerate(data_series.items()):\n    ax.plot(x_vals, y_vals, marker='o', markersize=6, linewidth=2,\n            color=COLORS_EARTH[i], label=label)\n    # Optional: confidence band\n    # ax.fill_between(x_vals, y_lower, y_upper, alpha=0.15, color=COLORS_EARTH[i])\nax.legend(loc='best', framealpha=0.9)\n```\n\n**Heatmap with annotations:**\n```python\nfig, ax = plt.subplots(figsize=(8, 8))\nim = ax.imshow(data_matrix, cmap='viridis', aspect='equal')\n# Annotate cells\nfor i in range(data_matrix.shape[0]):\n    for j in range(data_matrix.shape[1]):\n        text_color = 'white' if data_matrix[i, j] > threshold else 'black'\n        ax.text(j, i, f'{data_matrix[i, j]:.2f}', ha='center', va='center',\n                color=text_color, fontsize=10)\nplt.colorbar(im, ax=ax, shrink=0.8)\n```\n\n**Radar\u002FSpider chart:**\n```python\nangles = np.linspace(0, 2 * np.pi, len(categories), endpoint=False).tolist()\nangles += angles[:1]  # Close the polygon\nfig, ax = plt.subplots(figsize=(8, 8), subplot_kw=dict(polar=True))\nfor i, (label, values) in enumerate(data_series.items()):\n    vals = values + values[:1]\n    ax.plot(angles, vals, linewidth=2, color=COLORS_EARTH[i], label=label)\n    ax.fill(angles, vals, alpha=0.15, color=COLORS_EARTH[i])\nax.set_xticks(angles[:-1])\nax.set_xticklabels(categories)\nax.legend(loc='upper right', bbox_to_anchor=(1.3, 1.1))\n```\n\n#### Code execution workflow\n\n1. **Write** the generated Python script to a `.py` file using the Write tool\n2. **Execute** the script using `python \u003Cscript.py>` via Bash\n3. **Check** that the output `.png` file was created successfully\n4. If execution fails, read the error, fix the code, and re-execute (up to 3 attempts)\n5. **Open** the result image\n\n#### Common pitfalls to avoid\n\n- **Never use `plt.show()`** — it blocks in headless mode\n- **Always set `matplotlib.use('Agg')` before importing pyplot**\n- **Always embed all data** directly in the script; do not read external files unless the user explicitly provides a file path\n- **Avoid default matplotlib styling** — always customize colors, fonts, and grid to avoid the \"Veto Rule\" of looking like unmodified default output\n- **Do not include figure titles\u002Fcaptions** inside the plot (e.g., no `fig.suptitle(\"Figure 3: ...\")`) — captions belong in the paper, not the image\n- **Handle tight layout** — use `plt.tight_layout()` before `savefig` to prevent label clipping\n- **Use `bbox_inches='tight'`** in `savefig` to avoid whitespace\n- **For bar charts with many categories**, rotate x-labels 45° with `ha='right'`\n\n### Stage 5: Critique and Refinement\n\nAfter generating the initial output (XML for diagrams, or executing the Python script for plots), perform a self-critique:\n\n**For Diagram mode:**\n1. **Content fidelity:** Does the diagram accurately reflect the methodology? Are all key components present?\n2. **Text QA:** Check for typos, unclear labels, nonsensical text\n3. **Layout clarity:** Is the flow clear? Is there visual clutter?\n4. **Style compliance:** Does it follow the academic style guide?\n5. **Caption exclusion:** Ensure no figure caption text appears inside the diagram\n6. **Legend management:** Remove redundant color legends if present\n\nIf issues are found, revise the XML and regenerate.\n\n**For Plot mode (4 evaluation dimensions from PaperBanana Critic Agent):**\n1. **Faithfulness:** Does the plot correctly represent all data values? Are axis labels, legend entries, and annotations accurate? No fabricated data points or wrong chart types?\n2. **Conciseness:** No redundant labeling (e.g., both bar height AND text labels on many bars)? No unnecessary subplots? No text overload?\n3. **Readability:** Are axes labeled with units? Is text legible (no overlapping, sufficient contrast)? Are data series distinguishable? Legend present when needed? No data elements hidden behind legend?\n4. **Aesthetics:** Professional color scheme (not default matplotlib)? Consistent styling? No pixelation? No black background? No excessive 3D effects?\n\nIf issues are found, revise the Python code and re-execute.\n\n## Output workflow\n\n### Diagram mode\n1. **Generate draw.io XML** following the full pipeline above\n2. **Write the XML** to a `.drawio` file using the Write tool\n3. **If the user requested an export format** (png, svg, pdf), export using the draw.io CLI with `--embed-diagram`, then delete the source `.drawio` file\n4. **Open the result**\n\n### Plot mode\n1. **Generate Python script** following the full pipeline above\n2. **Write the script** to a `.py` file using the Write tool\n3. **Execute the script** via Bash: `python \u003Cscript.py>`\n4. **Verify** the output `.png` file exists\n5. **Open the result** image\n6. Optionally, keep the `.py` file for the user to modify later (do not delete by default)\n\n## Choosing the output format\n\n### Diagram format\n- `\u002Fdrawio-paper create a framework diagram` -> `framework.drawio`\n- `\u002Fdrawio-paper png pipeline for my method` -> `method-pipeline.drawio.png`\n- `\u002Fdrawio-paper svg: architecture overview` -> `architecture-overview.drawio.svg`\n\nIf no format is mentioned, write the `.drawio` file and open it.\n\n### Plot format\n- `\u002Fdrawio-paper plot a bar chart of model accuracy` -> `model-accuracy.png` + `model-accuracy.py`\n- `\u002Fdrawio-paper plot pdf: training curve comparison` -> `training-curve.pdf` + `training-curve.py`\n- `\u002Fdrawio-paper plot svg: ablation results` -> `ablation-results.svg` + `ablation-results.py`\n\nDefault output is `.png` at 300 DPI. For PDF\u002FSVG, change the `format` parameter in `plt.savefig()`.\n\n### Supported export formats\n\n| Format | Embed XML | Notes |\n|--------|-----------|-------|\n| `png` | Yes (`-e`) | Viewable everywhere, editable in draw.io |\n| `svg` | Yes (`-e`) | Scalable, editable in draw.io |\n| `pdf` | Yes (`-e`) | Printable, editable in draw.io |\n\n## draw.io CLI\n\nTry `drawio` first, then fall back to platform-specific path:\n- **macOS**: `\u002FApplications\u002Fdraw.io.app\u002FContents\u002FMacOS\u002Fdraw.io`\n- **Linux**: `drawio`\n- **Windows**: `\"C:\\Program Files\\draw.io\\draw.io.exe\"`\n\n### Export command\n\n```bash\ndrawio -x -f \u003Cformat> -e -b 10 -o \u003Coutput> \u003Cinput.drawio>\n```\n\nKey flags:\n- `-x` \u002F `--export`: export mode\n- `-f` \u002F `--format`: output format (png, svg, pdf)\n- `-e` \u002F `--embed-diagram`: embed diagram XML in output\n- `-o` \u002F `--output`: output file path\n- `-b` \u002F `--border`: border width (default: 0)\n- `-s` \u002F `--scale`: scale diagram size\n\n### Opening the result\n\n- **macOS**: `open \u003Cfile>`\n- **Linux**: `xdg-open \u003Cfile>`\n- **Windows**: `start \u003Cfile>`\n\n## File naming\n\n- Use descriptive filenames based on content\n- Lowercase with hyphens for multi-word names\n- **Diagrams:** For export: double extensions (`name.drawio.png`, `name.drawio.svg`). After successful export, delete the intermediate `.drawio` file\n- **Plots:** Output `name.png` (or `.pdf`\u002F`.svg`) alongside `name.py` (the source script). Keep both files\n\n## CRITICAL: XML well-formedness\n\n- **NEVER use double hyphens (`--`) inside XML comments.** Use single hyphens or rephrase.\n- Escape special characters in attribute values: `&amp;`, `&lt;`, `&gt;`, `&quot;`\n- Always use unique `id` values for each `mxCell`\n- Always set `html=1` in style when using HTML formatting in `value`\n\n## Common styles reference\n\n| Property | Values | Use for |\n|----------|--------|---------|\n| `rounded=1` | 0 or 1 | Rounded corners |\n| `whiteSpace=wrap` | wrap | Text wrapping |\n| `fillColor=#dae8fc` | Hex color | Background color |\n| `strokeColor=#6c8ebf` | Hex color | Border color |\n| `fontColor=#333333` | Hex color | Text color |\n| `shape=cylinder3` | shape name | Database cylinders |\n| `ellipse` | style keyword | Circles\u002Fovals |\n| `rhombus` | style keyword | Diamonds |\n| `edgeStyle=orthogonalEdgeStyle` | style keyword | Right-angle connectors |\n| `dashed=1` | 0 or 1 | Dashed lines |\n| `swimlane` | style keyword | Titled containers |\n| `group` | style keyword | Invisible containers |\n| `container=1` | 0 or 1 | Enable container behavior |\n| `pointerEvents=0` | 0 or 1 | Prevent container from capturing connections |\n\n## Edge routing\n\n- Use `edgeStyle=orthogonalEdgeStyle` for right-angle connectors\n- Space nodes generously (200px horizontal, 120px vertical gaps)\n- Use `exitX`\u002F`exitY` and `entryX`\u002F`entryY` (0-1) to control connection points\n- Add explicit waypoints when edges would overlap\n- Use `rounded=1` on edges for cleaner bends\n- Use `jettySize=auto` for better port spacing\n\n## Containers and groups\n\nSet `parent=\"containerId\"` on child cells. Children use relative coordinates.\n\n| Type | Style | When to use |\n|------|-------|-------------|\n| **Group** (invisible) | `group;` | No visual border needed |\n| **Swimlane** (titled) | `swimlane;startSize=30;` | Needs visible title bar |\n| **Custom container** | Add `container=1;pointerEvents=0;` | Any shape as container |\n\nAlways add `pointerEvents=0;` to container styles unless the container itself needs connections.\n","# Academic Paper Visualization Skill (Diagrams + Plots)\n\nGenerate publication-quality academic paper visualizations using a structured multi-agent pipeline inspired by PaperBanana. This skill supports two output modes:\n\n- **Diagram mode**: Transforms methodology sections and figure captions into polished `.drawio` diagrams through retrieval, planning, styling, visualization (XML generation), and critique stages.\n- **Plot mode**: Transforms raw data (tabular\u002FJSON) and visual intent into publication-ready statistical plots via Python\u002Fmatplotlib code generation, following the same retrieval, planning, styling, visualization (code generation + execution), and critique pipeline.\n\n## Setup (run once before first use)\n\nBefore generating diagrams or plots, ensure the PaperBananaBench reference dataset is available locally. **Check if `{skill_dir}\u002FPaperBananaBench\u002Fdiagram\u002Fref.json` and `{skill_dir}\u002FPaperBananaBench\u002Fplot\u002Fref.json` both exist.** If either is missing, run the following setup steps:\n\n```bash\n# 1. Download PaperBananaBench.zip directly from Hugging Face\ncurl -L -o \"{skill_dir}\u002FPaperBananaBench.zip\" https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fdwzhu\u002FPaperBananaBench\u002Fresolve\u002Fmain\u002FPaperBananaBench.zip\n\n# 2. Run the bundled extraction script (works on Windows, macOS, Linux)\npython \"{skill_dir}\u002Fscripts\u002Fextract_bench.py\"\n```\n\n### Python environment for plots\n\nPlots are generated using Python + matplotlib. Ensure the following packages are available:\n\n```bash\npip install matplotlib numpy pillow\n```\n\n**Important notes:**\n- `{skill_dir}` refers to the directory containing this SKILL.md file (`.claude\u002Fskills\u002Fdrawio-paper\u002F`)\n- Only requires `curl` and Python (stdlib `zipfile`), no git or git-lfs needed\n- Python extraction is used instead of `unzip` to reliably handle long paths on Windows\n- If the download fails due to network issues, retry or ask the user to manually download from https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fdwzhu\u002FPaperBananaBench\u002Fresolve\u002Fmain\u002FPaperBananaBench.zip and place it at `{skill_dir}\u002FPaperBananaBench.zip`, then run the Python extraction step\n- After setup, `{skill_dir}\u002FPaperBananaBench\u002Fdiagram\u002F` and `{skill_dir}\u002FPaperBananaBench\u002Fplot\u002F` should each contain `ref.json`, `test.json`, and an `images\u002F` folder with reference images\n\n## When to use this skill\n\n### Diagram mode\nUse when the user wants to create academic paper diagrams, such as:\n- Framework\u002Farchitecture overview diagrams\n- Pipeline\u002Fworkflow diagrams\n- Method illustration diagrams\n- Module detail diagrams\n- System design diagrams for research papers\n\nTrigger keywords: \"paper diagram\", \"academic diagram\", \"method diagram\", \"framework diagram\", \"pipeline diagram\", \"research figure\", \"paper figure\", \"drawio paper\", \"academic illustration\"\n\n### Plot mode\nUse when the user wants to create publication-quality statistical plots, such as:\n- Bar charts, grouped bar charts, stacked bar charts\n- Line charts with confidence intervals\n- Scatter plots with shape\u002Fcolor coding\n- Heatmaps and confusion matrices\n- Radar\u002Fspider charts\n- Pie\u002Fdonut charts\n- Box plots, violin plots\n- Any statistical visualization for academic papers\n\nTrigger keywords: \"paper plot\", \"academic plot\", \"research plot\", \"statistical plot\", \"bar chart\", \"line chart\", \"scatter plot\", \"heatmap\", \"paper chart\", \"matplotlib plot\", \"publication plot\", \"results plot\", \"comparison plot\"\n\n### Mode detection\n- If the user provides **methodology text + figure caption** → Diagram mode\n- If the user provides **raw data (table\u002FJSON\u002FCSV) + visual intent** → Plot mode\n- If ambiguous, ask the user which mode they want\n\n## Pipeline overview\n\nFollow this 5-stage pipeline to generate each visualization (diagram or plot). Stages 1-3 and 5 share the same structure for both modes; Stage 4 differs based on the output type.\n\n### Stage 1: Reference Retrieval\n\nBefore generating, **always** look at reference images from the benchmark dataset to understand the visual style expected.\n\n**For Diagram mode:**\n1. Read the reference metadata from `{skill_dir}\u002FPaperBananaBench\u002Fdiagram\u002Fref.json` and `{skill_dir}\u002FPaperBananaBench\u002Fdiagram\u002Ftest.json`\n2. Based on the user's topic (domain) and visual intent (diagram type), select 3-5 relevant reference images to study\n3. Use the Read tool to view the selected reference images from `{skill_dir}\u002FPaperBananaBench\u002Fdiagram\u002Fimages\u002F`\n4. Note the visual patterns: layout structure, color schemes, grouping strategies, icon usage, arrow styles\n\n**For Plot mode:**\n1. Read the reference metadata from `{skill_dir}\u002FPaperBananaBench\u002Fplot\u002Fref.json` and `{skill_dir}\u002FPaperBananaBench\u002Fplot\u002Ftest.json`\n2. Based on the user's data type and desired plot type, select 3-5 relevant reference plot images to study\n3. Use the Read tool to view the selected reference images from `{skill_dir}\u002FPaperBananaBench\u002Fplot\u002Fimages\u002F`\n4. Note the visual patterns: color palette, axis styling, legend placement, annotation style, chart type conventions\n\n**Selection logic (from PaperBanana Retriever Agent):**\n- **Match Research Topic:** Find references in the same domain (e.g., Agent\u002FReasoning, Vision\u002FPerception, Generative\u002FLearning, Science\u002FApplications)\n- **Match Visual Intent:** Find references with similar visualization types (e.g., Framework diagram, Bar chart, Line chart, Heatmap)\n- **Priority:** Same Topic + Same Visual Intent > Same Visual Intent > Same Topic\n\n### Stage 2: Planning\n\nBased on the user's input and the reference images studied, create a detailed textual description.\n\n**For Diagram mode** (input: methodology section + figure caption):\n\n1. Create a detailed textual description of the diagram to generate, including:\n   - All components and their relationships\n   - Data flow direction (typically left-to-right or top-to-bottom)\n   - Grouping\u002Fcontainment hierarchy\n   - Labels for every element\n   - Mathematical notation where appropriate\n\n2. The description should be **as detailed as possible**:\n   - Clearly describe each element and their connections\n   - Include background style, colors, line thickness, icon styles\n   - Specify layout structure (horizontal pipeline, vertical stack, grid, etc.)\n\n**For Plot mode** (input: raw data + visual intent):\n\n1. Create a detailed textual description of the plot to generate, including:\n   - Precise mapping of variables to visual channels (x-axis, y-axis, hue\u002Fcolor, size, shape)\n   - Explicitly enumerate **every raw data point's coordinate** to ensure accuracy\n   - Chart type selection and justification\n   - All axis labels, tick values, and units\n   - Legend content and placement\n\n2. The description should specify **exact aesthetic parameters**:\n   - Specific HEX color codes for each data series\n   - Font sizes for all labels (title, axes, ticks, legend, annotations)\n   - Line widths, marker dimensions, bar widths\n   - Grid style (dashed\u002Fdotted, color, alpha)\n   - Legend placement (inside plot, top horizontal, etc.)\n\n### Stage 3: Style Refinement\n\n**For Diagram mode:**\n\nApply the NeurIPS 2025 academic diagram style guide (stored at `{skill_dir}\u002Fneurips2025_diagram_style_guide.md`) to refine the planned description:\n\n**Key style principles:**\n- **Color:** \"Soft Tech & Scientific Pastels\" - use light pastel backgrounds (#E6F3FF, #F3E5F5, #E0F2F1, #F5F5DC) for zones, medium saturation for active modules\n- **Shapes:** \"Softened Geometry\" - rounded rectangles for processes, 3D cuboids for tensors, cylinders for databases\n- **Lines:** Orthogonal edges for architectures, curved for data flow; solid for forward pass, dashed for auxiliary\u002Fgradient flow\n- **Typography:** Sans-serif (Arial) for labels, serif (Times New Roman) for math variables\n- **Icons:** Use semantic icons (snowflake=frozen, fire=trainable, gear=processing)\n- **Background:** Pure white or very light pastels; avoid saturated backgrounds\n- **No figure caption text** inside the diagram itself\n\n**Domain-specific styles:**\n- **Agent\u002FLLM papers:** Illustrative, friendly, chat bubbles, robot avatars\n- **Computer Vision\u002F3D:** Spatial, dense, geometric, RGB color coding, heatmaps\n- **Theoretical\u002FOptimization:** Minimalist, abstract, graph nodes, mostly grayscale\n\n**For Plot mode:**\n\nApply the NeurIPS 2025 statistical plot aesthetics guide (stored at `{skill_dir}\u002Fneurips2025_plot_style_guide.md`) to refine the planned description. Focus on specifying visual attributes without altering data content.\n\n**Key style principles:**\n- **Color palettes:** Soft pastels for categorical data; Viridis\u002FMagma for sequential; avoid Jet\u002FRainbow\n- **Axes & grids:** Fine dashed or dotted grid lines in light gray, behind data; either \"boxed\" (4 spines) or \"open\" (no top\u002Fright)\n- **Typography:** Sans-serif fonts (Arial, Helvetica, DejaVu Sans); rotate x-labels 45° only when necessary\n- **Legends:** Float inside plot area or place as horizontal row above plot\n- **Annotations:** Prefer direct labeling over forcing legend references\n- **Background:** White or very light gray (Seaborn-style)\n- **Accessibility:** Combine color with shape\u002Fpattern (hatches, markers) for colorblind support\n- **No figure caption** inside the plot itself\n\n**Chart-type-specific guidelines:**\n- **Bar charts:** Black outlines or borderless fills; tight grouping; error bars with black flat caps\n- **Line charts:** Always include geometric markers at data points; dashed lines for baselines; shaded confidence bands\n- **Scatter plots:** Different marker shapes for categories; solid opaque fills\n- **Heatmaps:** Square cells; annotate exact values inside cells; use perceptually uniform colormaps\n- **Pie\u002FDonut:** Thick donut preferred; white borders between slices; explode key slices\n- **Radar charts:** Translucent polygon fills (alpha ~0.2); solid outer perimeter\n\n### Stage 4: Visualization Generation\n\n**Choose the appropriate sub-stage based on mode:**\n\n### Stage 4A: Draw.io XML Generation (Diagram mode)\n\nTransform the styled description into draw.io XML. Follow ALL rules from the base drawio skill:\n\n#### Basic XML structure\n\n```xml\n\u003CmxGraphModel>\n  \u003Croot>\n    \u003CmxCell id=\"0\"\u002F>\n    \u003CmxCell id=\"1\" parent=\"0\"\u002F>\n    \u003C!-- Diagram cells go here with parent=\"1\" -->\n  \u003C\u002Froot>\n\u003C\u002FmxGraphModel>\n```\n\n#### Academic diagram design patterns\n\n**Pattern 1: Horizontal Pipeline (most common)**\n- Left-to-right flow with major stages as titled swimlane containers\n- Internal components as rounded rectangles within each stage\n- Arrows connecting stages with orthogonal edges\n\n**Pattern 2: Vertical Architecture Stack**\n- Top-to-bottom layer stack (input at top, output at bottom)\n- Each layer as a rounded rectangle with fill color indicating type\n- Skip connections shown as curved dashed lines\n\n**Pattern 3: Multi-module Detail**\n- Central overview with breakout detail boxes connected by lines\n- \"Macro-Micro\" pattern: overview container + zoomed-in module details\n\n#### Color palette for academic diagrams\n\n| Purpose | Color | Hex |\n|---------|-------|-----|\n| Background zone - blue | Pale Ice Blue | #E6F3FF |\n| Background zone - green | Pale Mint | #E0F2F1 |\n| Background zone - purple | Pale Lavender | #F3E5F5 |\n| Background zone - warm | Cream\u002FBeige | #FFF8E1 |\n| Active module - blue | Soft Blue | #DAE8FC |\n| Active module - green | Soft Green | #D5E8D4 |\n| Active module - orange | Soft Orange | #FFE6CC |\n| Active module - pink | Soft Pink | #F8CECC |\n| Frozen\u002Fstatic element | Light Grey | #F5F5F5 |\n| Highlight\u002Foutput | Gold accent | #FFF2CC |\n| Trainable element | Warm tone | #FFE0B2 |\n| Frozen element | Cool grey | #E0E0E0 |\n| Border - blue | Medium Blue | #6C8EBF |\n| Border - green | Medium Green | #82B366 |\n| Border - orange | Medium Orange | #D6B656 |\n| Border - red | Medium Red | #B85450 |\n\n#### Layout rules\n\n- **Generous spacing:** At least 200px horizontal gap, 120px vertical gap between major groups\n- **Grid alignment:** Align all nodes to multiples of 10\n- **Container padding:** At least 20px padding inside containers; startSize=30 for swimlane headers\n- **Font sizes:** 14-16px for major labels, 11-12px for detail labels, 10px for annotations\n- **Edge routing:** Use orthogonalEdgeStyle with rounded=1 for clean bends\n- **Leave room for arrowheads:** At least 20px straight segment before targets\n\n#### Container usage for grouping\n\nUse draw.io containers for logical grouping (stages, modules):\n\n```xml\n\u003C!-- Stage container using swimlane -->\n\u003CmxCell id=\"stage1\" value=\"Stage 1: Encoding\" style=\"swimlane;startSize=30;fillColor=#E6F3FF;strokeColor=#6C8EBF;rounded=1;arcSize=8;fontStyle=1;fontSize=14;fontFamily=Arial;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"40\" y=\"80\" width=\"300\" height=\"400\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n\n\u003C!-- Components inside the stage (note parent=\"stage1\" and relative coords) -->\n\u003CmxCell id=\"enc1\" value=\"Encoder\" style=\"rounded=1;whiteSpace=wrap;fillColor=#DAE8FC;strokeColor=#6C8EBF;fontSize=12;fontFamily=Arial;\" vertex=\"1\" parent=\"stage1\">\n  \u003CmxGeometry x=\"20\" y=\"50\" width=\"120\" height=\"50\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n```\n\n#### Math notation in labels\n\nUse HTML formatting for mathematical symbols:\n```xml\n\u003CmxCell id=\"loss\" value=\"&lt;i&gt;L&lt;\u002Fi&gt; = &amp;sum; &lt;i&gt;L&lt;\u002Fi&gt;&lt;sub&gt;i&lt;\u002Fsub&gt;\" style=\"text;html=1;align=center;fontFamily=Times New Roman;fontSize=12;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"200\" y=\"500\" width=\"100\" height=\"30\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n```\n\n#### Semantic icons as text labels\n\nUse Unicode\u002Femoji characters in `value` attributes for semantic icons. Place them as standalone text cells or inline with labels.\n\n```xml\n\u003CmxCell id=\"icon_example\" value=\"&#10052;\" style=\"text;fontSize=16;align=center;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"150\" y=\"90\" width=\"24\" height=\"24\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n```\n\n**Complete emoji reference for academic diagrams:**\n\n**Model State**\n\n| Icon | Emoji | HTML Entity | Meaning | Usage |\n|------|-------|-------------|---------|-------|\n| Snowflake | ❄ | `&#10052;` | Frozen \u002F Non-trainable | Frozen encoder, fixed weights |\n| Fire | 🔥 | `&#128293;` | Trainable \u002F Active learning | Fine-tuning layers, trainable heads |\n| Lightning | ⚡ | `&#9889;` | Fast \u002F Accelerated | Efficient inference, speedup |\n| Lock | 🔒 | `&#128274;` | Locked \u002F Protected | Frozen parameters, access control |\n| Unlock | 🔓 | `&#128275;` | Unlocked \u002F Released | Unfrozen for training |\n| Stop sign | 🛑 | `&#128721;` | Stopped \u002F Blocked | Non-trainable, gradient stop |\n\n**Agents & Roles**\n\n| Icon | Emoji | HTML Entity | Meaning | Usage |\n|------|-------|-------------|---------|-------|\n| Robot | 🤖 | `&#129302;` | AI Agent \u002F Model | LLM agent, autonomous module |\n| Person | 👤 | `&#128100;` | User \u002F Human | Human input, user query |\n| People | 👥 | `&#128101;` | Multi-user \u002F Crowd | Collaborative systems, multi-user |\n| Brain | 🧠 | `&#129504;` | Reasoning \u002F Intelligence | LLM core, reasoning module |\n| Thinking | 🤔 | `&#129488;` | Evaluation \u002F Critique | Critic agent, reviewer |\n| Detective | 🕵 | `&#128373;` | Investigation \u002F Analysis | Anomaly detection, inspection |\n| Teacher | 👨‍🏫 | `&#128104;&#8205;&#127979;` | Teaching \u002F Supervision | Teacher model, supervisor |\n| Student | 👨‍🎓 | `&#128104;&#8205;&#127891;` | Learning \u002F Student | Student model, distillation target |\n\n**Data & Content**\n\n| Icon | Emoji | HTML Entity | Meaning | Usage |\n|------|-------|-------------|---------|-------|\n| Document | 📄 | `&#128196;` | Text \u002F Document | Input text, paper, prompt |\n| Clipboard | 📋 | `&#128203;` | Plan \u002F List | Structured plan, task list |\n| Folder | 📁 | `&#128193;` | Dataset \u002F Collection | Data directory, file collection |\n| File cabinet | 🗃 | `&#128451;` | Storage \u002F Archive | Knowledge base, data store |\n| Database | 🗄 | `&#128452;` | Database \u002F Repository | Vector DB, model repository |\n| Image | 🖼 | `&#128444;` | Image \u002F Visual data | Image input, visual features |\n| Speech | 💬 | `&#128172;` | Chat \u002F Dialogue | Prompt, conversation, chat bubble |\n| Label | 🏷 | `&#127991;` | Tag \u002F Annotation | Class label, metadata tag |\n| Book | 📚 | `&#128218;` | Knowledge \u002F Corpus | Training corpus, reference library |\n| Newspaper | 📰 | `&#128240;` | Article \u002F Report | Paper, news, generated report |\n\n**Operations & Processing**\n\n| Icon | Emoji | HTML Entity | Meaning | Usage |\n|------|-------|-------------|---------|-------|\n| Gear | ⚙ | `&#9881;` | Processing \u002F Computation | Model inference, computation |\n| Magnifier | 🔍 | `&#128269;` | Search \u002F Retrieval | Retrieval, attention, inspection |\n| Wrench | 🔧 | `&#128295;` | Configuration \u002F Tuning | Hyperparameter tuning, adjustment |\n| Scissors | ✂ | `&#9986;` | Pruning \u002F Cutting | Model pruning, token trimming |\n| Filter | 🔽 | `&#128317;` | Filtering \u002F Selection | Feature selection, data filtering |\n| Shuffle | 🔀 | `&#128256;` | Random \u002F Shuffle | Data augmentation, random sampling |\n| Cycle | 🔄 | `&#128260;` | Loop \u002F Iteration | Iterative refinement, feedback loop |\n| Link | 🔗 | `&#128279;` | Connection \u002F Linking | Cross-attention, entity linking |\n| Merge | 🔀 | `&#128256;` | Merge \u002F Combine | Feature fusion, model merging |\n\n**Evaluation & Results**\n\n| Icon | Emoji | HTML Entity | Meaning | Usage |\n|------|-------|-------------|---------|-------|\n| Checkmark | ✅ | `&#9989;` | Pass \u002F Correct | Correct prediction, quality pass |\n| Cross | ❌ | `&#10060;` | Fail \u002F Incorrect | Wrong prediction, rejected |\n| Trophy | 🏆 | `&#127942;` | Best \u002F Winner | Best model, SOTA result |\n| Chart up | 📈 | `&#128200;` | Improvement \u002F Growth | Performance gain, metric increase |\n| Chart down | 📉 | `&#128201;` | Decline \u002F Degradation | Performance drop, quality loss |\n| Target | 🎯 | `&#127919;` | Goal \u002F Objective | Target task, loss objective |\n| Star | ⭐ | `&#11088;` | Highlight \u002F Key result | Key contribution, important |\n| Warning | ⚠ | `&#9888;` | Caution \u002F Issue | Potential problem, limitation |\n\n**Domain-Specific**\n\n| Icon | Emoji | HTML Entity | Meaning | Usage |\n|------|-------|-------------|---------|-------|\n| Eye | 👁 | `&#128065;` | Vision \u002F Observation | Visual encoder, image perception |\n| Ear | 👂 | `&#128066;` | Audio \u002F Listening | Speech recognition, audio input |\n| Pen | ✍ | `&#9997;` | Writing \u002F Generation | Text generation, authoring |\n| Globe | 🌐 | `&#127760;` | Web \u002F Global | Internet retrieval, world knowledge |\n| DNA | 🧬 | `&#129516;` | Biology \u002F Sequence | Protein, genomics, molecular |\n| Atom | ⚛ | `&#9883;` | Physics \u002F Science | Scientific computing, simulation |\n| Microscope | 🔬 | `&#128300;` | Research \u002F Analysis | Detailed analysis, micro-level |\n| Telescope | 🔭 | `&#128301;` | Far-sighted \u002F Overview | Macro-level, global view |\n| Pill | 💊 | `&#128138;` | Medical \u002F Drug | Drug discovery, medical AI |\n| Tree | 🌳 | `&#127795;` | Tree structure \u002F Hierarchy | Decision tree, parse tree |\n| Network | 🕸 | `&#128376;` | Graph \u002F Network | Neural network, knowledge graph |\n| Dice | 🎲 | `&#127922;` | Random \u002F Stochastic | Sampling, probability, noise |\n| Thermometer | 🌡 | `&#127777;` | Temperature | Softmax temperature, scaling |\n| Hourglass | ⏳ | `&#9203;` | Time \u002F Temporal | Time series, sequence, latency |\n| Layer | 📊 | `&#128202;` | Layers \u002F Stack | Model layers, feature maps |\n| Key | 🔑 | `&#128273;` | Key \u002F Authentication | Attention key, API key, decryption |\n| Light bulb | 💡 | `&#128161;` | Idea \u002F Insight | Innovation, key finding |\n| Rocket | 🚀 | `&#128640;` | Launch \u002F Deploy | Model deployment, fast execution |\n| Shield | 🛡 | `&#128737;` | Defense \u002F Protection | Adversarial defense, safety |\n| Sword | ⚔ | `&#9876;` | Attack \u002F Adversarial | Adversarial attack, red-teaming |\n\n**Mathematical Operators** (use with `fontFamily=Times New Roman`)\n\n| Symbol | Name | HTML Entity | Usage |\n|--------|------|-------------|-------|\n| ⊕ | Circled plus | `&#8853;` | Element-wise addition, concatenation |\n| ⊗ | Circled times | `&#8855;` | Element-wise multiplication, outer product |\n| ⊙ | Circled dot | `&#8857;` | Hadamard product, dot product |\n| ∑ | Summation | `&#8721;` | Sum, aggregation |\n| ∏ | Product | `&#8719;` | Product operation |\n| → | Right arrow | `&#8594;` | Mapping, transformation |\n| ↔ | Left-right arrow | `&#8596;` | Bidirectional, mutual |\n| σ | Sigma | `&#963;` | Sigmoid, activation |\n| ∇ | Nabla | `&#8711;` | Gradient |\n| ∞ | Infinity | `&#8734;` | Unbounded, continuous |\n| ∈ | Element of | `&#8712;` | Membership, belongs to |\n| ≈ | Approximately | `&#8776;` | Approximation |\n| ∥ | Parallel | `&#8741;` | Norm, parallel |\n\n#### Dashed lines for auxiliary flow\n\n```xml\n\u003CmxCell id=\"grad_flow\" value=\"Gradient\" style=\"edgeStyle=orthogonalEdgeStyle;dashed=1;strokeColor=#999999;fontColor=#999999;fontSize=10;\" edge=\"1\" source=\"loss_node\" target=\"encoder\" parent=\"1\">\n  \u003CmxGeometry relative=\"1\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n```\n\n#### Mathematical operators on edges\n\n```xml\n\u003C!-- Addition operator on connection -->\n\u003CmxCell id=\"add_op\" value=\"&#8853;\" style=\"ellipse;whiteSpace=wrap;fillColor=#FFFFFF;strokeColor=#666666;fontSize=14;fontFamily=Times New Roman;aspect=fixed;\" vertex=\"1\" parent=\"1\">\n  \u003CmxGeometry x=\"295\" y=\"195\" width=\"30\" height=\"30\" as=\"geometry\"\u002F>\n\u003C\u002FmxCell>\n```\n\n### Stage 4B: Python\u002FMatplotlib Code Generation (Plot mode)\n\nTransform the styled description into a complete, self-contained Python script using matplotlib. The script must generate and save a publication-quality plot.\n\n#### Code generation rules\n\n1. **Self-contained script:** The generated Python code must be a single, complete script that can run independently. All data must be embedded directly in the code (no external file reads).\n\n2. **Required imports:** Always include these at the top:\n```python\nimport matplotlib\nmatplotlib.use('Agg')  # Headless backend - MUST be before pyplot import\nimport matplotlib.pyplot as plt\nimport numpy as np\n```\n\n3. **Reset defaults:** Always call `plt.rcdefaults()` before setting custom styles to avoid inheriting stale state.\n\n4. **Output format:** Save the plot as PNG at 300 DPI with tight bounding box:\n```python\nplt.savefig('output_filename.png', format='png', dpi=300, bbox_inches='tight', facecolor='white')\nplt.close('all')\n```\n\n5. **No interactive elements:** Never use `plt.show()`. Always use `plt.savefig()` only.\n\n#### Matplotlib style template\n\nApply these NeurIPS 2025 style settings programmatically:\n\n```python\n# Font settings\nplt.rcParams.update({\n    'font.family': 'sans-serif',\n    'font.sans-serif': ['Arial', 'Helvetica', 'DejaVu Sans'],\n    'font.size': 12,\n    'axes.titlesize': 14,\n    'axes.labelsize': 13,\n    'xtick.labelsize': 11,\n    'ytick.labelsize': 11,\n    'legend.fontsize': 11,\n})\n\n# Grid and spine settings\nplt.rcParams.update({\n    'axes.grid': True,\n    'grid.alpha': 0.3,\n    'grid.linestyle': '--',\n    'grid.color': '#cccccc',\n    'axes.spines.top': True,     # or False for \"open\" look\n    'axes.spines.right': True,   # or False for \"open\" look\n})\n\n# Figure settings\nplt.rcParams.update({\n    'figure.facecolor': 'white',\n    'axes.facecolor': 'white',\n    'savefig.facecolor': 'white',\n    'figure.figsize': (8, 6),    # Adjust per chart type\n})\n```\n\n#### Recommended color palettes\n\n**Categorical (soft pastels for academic look):**\n```python\n# Soft academic palette\nCOLORS_PASTEL = ['#7EB6D9', '#F4A582', '#92C5A9', '#D4A5D0', '#F7DC6F', '#B0B0B0', '#E8927C', '#A8D8EA']\n\n# Muted earth tones\nCOLORS_EARTH = ['#4E79A7', '#F28E2B', '#E15759', '#76B7B2', '#59A14F', '#EDC948', '#B07AA1', '#FF9DA7']\n\n# High-contrast (use sparingly)\nCOLORS_CONTRAST = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f']\n```\n\n**Sequential\u002FHeatmap:** Use `'viridis'`, `'magma'`, `'plasma'`. Never use `'jet'` or `'rainbow'`.\n\n**Diverging:** Use `'coolwarm'` or `'RdBu_r'` for positive\u002Fnegative splits.\n\n#### Chart-type code patterns\n\n**Grouped bar chart:**\n```python\nx = np.arange(len(categories))\nwidth = 0.25\nfig, ax = plt.subplots(figsize=(10, 6))\nfor i, (label, values) in enumerate(data_series.items()):\n    bars = ax.bar(x + i * width, values, width, label=label,\n                  color=COLORS_PASTEL[i], edgecolor='black', linewidth=0.8)\nax.set_xticks(x + width * (len(data_series) - 1) \u002F 2)\nax.set_xticklabels(categories)\nax.legend(loc='upper left', framealpha=0.9)\n```\n\n**Line chart with markers and confidence bands:**\n```python\nfig, ax = plt.subplots(figsize=(10, 6))\nfor i, (label, y_vals) in enumerate(data_series.items()):\n    ax.plot(x_vals, y_vals, marker='o', markersize=6, linewidth=2,\n            color=COLORS_EARTH[i], label=label)\n    # Optional: confidence band\n    # ax.fill_between(x_vals, y_lower, y_upper, alpha=0.15, color=COLORS_EARTH[i])\nax.legend(loc='best', framealpha=0.9)\n```\n\n**Heatmap with annotations:**\n```python\nfig, ax = plt.subplots(figsize=(8, 8))\nim = ax.imshow(data_matrix, cmap='viridis', aspect='equal')\n# Annotate cells\nfor i in range(data_matrix.shape[0]):\n    for j in range(data_matrix.shape[1]):\n        text_color = 'white' if data_matrix[i, j] > threshold else 'black'\n        ax.text(j, i, f'{data_matrix[i, j]:.2f}', ha='center', va='center',\n                color=text_color, fontsize=10)\nplt.colorbar(im, ax=ax, shrink=0.8)\n```\n\n**Radar\u002FSpider chart:**\n```python\nangles = np.linspace(0, 2 * np.pi, len(categories), endpoint=False).tolist()\nangles += angles[:1]  # Close the polygon\nfig, ax = plt.subplots(figsize=(8, 8), subplot_kw=dict(polar=True))\nfor i, (label, values) in enumerate(data_series.items()):\n    vals = values + values[:1]\n    ax.plot(angles, vals, linewidth=2, color=COLORS_EARTH[i], label=label)\n    ax.fill(angles, vals, alpha=0.15, color=COLORS_EARTH[i])\nax.set_xticks(angles[:-1])\nax.set_xticklabels(categories)\nax.legend(loc='upper right', bbox_to_anchor=(1.3, 1.1))\n```\n\n#### Code execution workflow\n\n1. **Write** the generated Python script to a `.py` file using the Write tool\n2. **Execute** the script using `python \u003Cscript.py>` via Bash\n3. **Check** that the output `.png` file was created successfully\n4. If execution fails, read the error, fix the code, and re-execute (up to 3 attempts)\n5. **Open** the result image\n\n#### Common pitfalls to avoid\n\n- **Never use `plt.show()`** — it blocks in headless mode\n- **Always set `matplotlib.use('Agg')` before importing pyplot**\n- **Always embed all data** directly in the script; do not read external files unless the user explicitly provides a file path\n- **Avoid default matplotlib styling** — always customize colors, fonts, and grid to avoid the \"Veto Rule\" of looking like unmodified default output\n- **Do not include figure titles\u002Fcaptions** inside the plot (e.g., no `fig.suptitle(\"Figure 3: ...\")`) — captions belong in the paper, not the image\n- **Handle tight layout** — use `plt.tight_layout()` before `savefig` to prevent label clipping\n- **Use `bbox_inches='tight'`** in `savefig` to avoid whitespace\n- **For bar charts with many categories**, rotate x-labels 45° with `ha='right'`\n\n### Stage 5: Critique and Refinement\n\nAfter generating the initial output (XML for diagrams, or executing the Python script for plots), perform a self-critique:\n\n**For Diagram mode:**\n1. **Content fidelity:** Does the diagram accurately reflect the methodology? Are all key components present?\n2. **Text QA:** Check for typos, unclear labels, nonsensical text\n3. **Layout clarity:** Is the flow clear? Is there visual clutter?\n4. **Style compliance:** Does it follow the academic style guide?\n5. **Caption exclusion:** Ensure no figure caption text appears inside the diagram\n6. **Legend management:** Remove redundant color legends if present\n\nIf issues are found, revise the XML and regenerate.\n\n**For Plot mode (4 evaluation dimensions from PaperBanana Critic Agent):**\n1. **Faithfulness:** Does the plot correctly represent all data values? Are axis labels, legend entries, and annotations accurate? No fabricated data points or wrong chart types?\n2. **Conciseness:** No redundant labeling (e.g., both bar height AND text labels on many bars)? No unnecessary subplots? No text overload?\n3. **Readability:** Are axes labeled with units? Is text legible (no overlapping, sufficient contrast)? Are data series distinguishable? Legend present when needed? No data elements hidden behind legend?\n4. **Aesthetics:** Professional color scheme (not default matplotlib)? Consistent styling? No pixelation? No black background? No excessive 3D effects?\n\nIf issues are found, revise the Python code and re-execute.\n\n## Output workflow\n\n### Diagram mode\n1. **Generate draw.io XML** following the full pipeline above\n2. **Write the XML** to a `.drawio` file using the Write tool\n3. **If the user requested an export format** (png, svg, pdf), export using the draw.io CLI with `--embed-diagram`, then delete the source `.drawio` file\n4. **Open the result**\n\n### Plot mode\n1. **Generate Python script** following the full pipeline above\n2. **Write the script** to a `.py` file using the Write tool\n3. **Execute the script** via Bash: `python \u003Cscript.py>`\n4. **Verify** the output `.png` file exists\n5. **Open the result** image\n6. Optionally, keep the `.py` file for the user to modify later (do not delete by default)\n\n## Choosing the output format\n\n### Diagram format\n- `\u002Fdrawio-paper create a framework diagram` -> `framework.drawio`\n- `\u002Fdrawio-paper png pipeline for my method` -> `method-pipeline.drawio.png`\n- `\u002Fdrawio-paper svg: architecture overview` -> `architecture-overview.drawio.svg`\n\nIf no format is mentioned, write the `.drawio` file and open it.\n\n### Plot format\n- `\u002Fdrawio-paper plot a bar chart of model accuracy` -> `model-accuracy.png` + `model-accuracy.py`\n- `\u002Fdrawio-paper plot pdf: training curve comparison` -> `training-curve.pdf` + `training-curve.py`\n- `\u002Fdrawio-paper plot svg: ablation results` -> `ablation-results.svg` + `ablation-results.py`\n\nDefault output is `.png` at 300 DPI. For PDF\u002FSVG, change the `format` parameter in `plt.savefig()`.\n\n### Supported export formats\n\n| Format | Embed XML | Notes |\n|--------|-----------|-------|\n| `png` | Yes (`-e`) | Viewable everywhere, editable in draw.io |\n| `svg` | Yes (`-e`) | Scalable, editable in draw.io |\n| `pdf` | Yes (`-e`) | Printable, editable in draw.io |\n\n## draw.io CLI\n\nTry `drawio` first, then fall back to platform-specific path:\n- **macOS**: `\u002FApplications\u002Fdraw.io.app\u002FContents\u002FMacOS\u002Fdraw.io`\n- **Linux**: `drawio`\n- **Windows**: `\"C:\\Program Files\\draw.io\\draw.io.exe\"`\n\n### Export command\n\n```bash\ndrawio -x -f \u003Cformat> -e -b 10 -o \u003Coutput> \u003Cinput.drawio>\n```\n\nKey flags:\n- `-x` \u002F `--export`: export mode\n- `-f` \u002F `--format`: output format (png, svg, pdf)\n- `-e` \u002F `--embed-diagram`: embed diagram XML in output\n- `-o` \u002F `--output`: output file path\n- `-b` \u002F `--border`: border width (default: 0)\n- `-s` \u002F `--scale`: scale diagram size\n\n### Opening the result\n\n- **macOS**: `open \u003Cfile>`\n- **Linux**: `xdg-open \u003Cfile>`\n- **Windows**: `start \u003Cfile>`\n\n## File naming\n\n- Use descriptive filenames based on content\n- Lowercase with hyphens for multi-word names\n- **Diagrams:** For export: double extensions (`name.drawio.png`, `name.drawio.svg`). After successful export, delete the intermediate `.drawio` file\n- **Plots:** Output `name.png` (or `.pdf`\u002F`.svg`) alongside `name.py` (the source script). Keep both files\n\n## CRITICAL: XML well-formedness\n\n- **NEVER use double hyphens (`--`) inside XML comments.** Use single hyphens or rephrase.\n- Escape special characters in attribute values: `&amp;`, `&lt;`, `&gt;`, `&quot;`\n- Always use unique `id` values for each `mxCell`\n- Always set `html=1` in style when using HTML formatting in `value`\n\n## Common styles reference\n\n| Property | Values | Use for |\n|----------|--------|---------|\n| `rounded=1` | 0 or 1 | Rounded corners |\n| `whiteSpace=wrap` | wrap | Text wrapping |\n| `fillColor=#dae8fc` | Hex color | Background color |\n| `strokeColor=#6c8ebf` | Hex color | Border color |\n| `fontColor=#333333` | Hex color | Text color |\n| `shape=cylinder3` | shape name | Database cylinders |\n| `ellipse` | style keyword | Circles\u002Fovals |\n| `rhombus` | style keyword | Diamonds |\n| `edgeStyle=orthogonalEdgeStyle` | style keyword | Right-angle connectors |\n| `dashed=1` | 0 or 1 | Dashed lines |\n| `swimlane` | style keyword | Titled containers |\n| `group` | style keyword | Invisible containers |\n| `container=1` | 0 or 1 | Enable container behavior |\n| `pointerEvents=0` | 0 or 1 | Prevent container from capturing connections |\n\n## Edge routing\n\n- Use `edgeStyle=orthogonalEdgeStyle` for right-angle connectors\n- Space nodes generously (200px horizontal, 120px vertical gaps)\n- Use `exitX`\u002F`exitY` and `entryX`\u002F`entryY` (0-1) to control connection points\n- Add explicit waypoints when edges would overlap\n- Use `rounded=1` on edges for cleaner bends\n- Use `jettySize=auto` for better port spacing\n\n## Containers and groups\n\nSet `parent=\"containerId\"` on child cells. Children use relative coordinates.\n\n| Type | Style | When to use |\n|------|-------|-------------|\n| **Group** (invisible) | `group;` | No visual border needed |\n| **Swimlane** (titled) | `swimlane;startSize=30;` | Needs visible title bar |\n| **Custom container** | Add `container=1;pointerEvents=0;` | Any shape as container |\n\nAlways add `pointerEvents=0;` to container styles unless the container itself needs connections.\n",{"name":5,"description":7,"allowed-tools":24},"Bash, Write, Read, Glob","main","e71245365df78e06cd166602744bf2491f79910e","research-skills-hub\u002Fopen-paper-skills\u002Fdrawio-paper",0,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS","https:\u002F\u002Fpengqianhan.github.io\u002FAI-Human-Research-OS\u002F","https:\u002F\u002Fgithub.com\u002Fpengqianhan","Ph.D. candidate of The University of Auckland, New Zealand","2026-11-14 18:08:16",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add pengqianhan\u002FAI-Human-Research-OS --skill drawio-paper",{"tool":40,"command":41},"bunx","bunx skills add pengqianhan\u002FAI-Human-Research-OS --skill drawio-paper",{"tool":43,"command":44},"pnpm","pnpm dlx skills add pengqianhan\u002FAI-Human-Research-OS --skill drawio-paper","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fopen-paper-skills\u002Fdrawio-paper\u002FSKILL.md",true,[48,54,58,62],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"evals\u002Fevals.json","REFERENCE","参考文档",2707,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fopen-paper-skills\u002Fdrawio-paper\u002Fevals\u002Fevals.json",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"neurips2025_diagram_style_guide.md",6270,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fopen-paper-skills\u002Fdrawio-paper\u002Fneurips2025_diagram_style_guide.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"neurips2025_plot_style_guide.md",6034,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fopen-paper-skills\u002Fdrawio-paper\u002Fneurips2025_plot_style_guide.md",{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"scripts\u002Fextract_bench.py","SCRIPT","脚本",3172,"https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fopen-paper-skills\u002Fdrawio-paper\u002Fscripts\u002Fextract_bench.py",[69,76,83,90,97,104],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M74MWYTHT498SVMN823896T7","workflow-skill-creator","Distills a completed user workflow or interaction into a reusable agent skill. Use when the user asks to turn their workflow, interaction, or multi-step process into a skill, or when they say \"make this a skill\", \"create a skill from what we just did\", \"package this workflow\" or similar. Do not use for creating skills from scratch without an existing workflow (use a generic skill-creator for that).","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Fworkflow_skill_creator\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M74MWWVCFZ8HQS8840F1V1FT","uv","Checks whether the uv Python package manager is installed and installs it if missing. Ensures uv is on PATH. Use when another skill requires uv as a prerequisite.","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Fuv\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M74MWRH5BTSWZ2C5PCTD5FV9","uniprot-database","Access protein metadata, function, taxonomy, and sequences across UniProtKB, UniParc, and UniRef. Use when searching for proteins, mapping identifiers, or retrieving functional annotations and publications. Don't use for sequence alignment, protein folding, or sequence similarity search (use specialized skills for those tasks).","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Funiprot_database\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M74MWN1D3ER9F1FZPWH8HQC1","unibind-database","Queries the UniBind database for experimentally validated transcription factor (TF) binding sites. Use when retrieving direct TF-DNA interaction datasets, downloading binding site coordinates (BED\u002FFASTA) for local analysis, or listing available datasets by species, cell line, or TF name. Don't use to query specific intervals, locations, genes, motif models or expression data.","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Funibind_database\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M74MWHHB5QZY3NR2FYA1EK4N","ucsc-conservation-and-tfbs","Fetch Evolutionary Conservation scores (phyloP, phastCons) and Transcription Factor Binding Sites (TFBS) from the UCSC Genome Browser. Use when analyzing whether genomic variants or regions are evolutionarily conserved, functionally important, or bounded by TF regulators across major projects (ENCODE, JASPAR, ReMap).","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Fucsc_conservation_and_tfbs\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M74MWERYHSY87P21FDMVE6BA","string-database","Query the STRING database for protein-protein interactions (PPIs), functional enrichment, and homology. Use when the user asks about interactions between specific proteins, interaction evidence, confidence scores, protein interaction partners, or pathway enrichments.","https:\u002F\u002Fgithub.com\u002Fpengqianhan\u002FAI-Human-Research-OS\u002Fblob\u002Fmain\u002Fresearch-skills-hub\u002Fscience-skills\u002Fstring_database\u002FSKILL.md",[],[]]