复制安装命令
用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。
复制前请先查看来源、License 和安全提示。
Security audit: baseline 52/52 CLEAN
用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。
复制前请先查看来源、License 和安全提示。
来源文件:README.md
📌 文档结构(2026-07-22 起): 本文件是中文默认入口 —— banner + badges + 信任面 + 9 阶段流水线速览 + 76 行合集总表。 每个合集的完整描述、按用途分组、精确数字、验证方法在
docs/CONTENT_ZH.md(扩展正文,总表行内的→直接跳转到对应锚点)。English version:
README-en.md· 中文扩展正文:docs/CONTENT_ZH.md·README-zh-CN.md已弃用(重定向占位)
🌐 语言: English | 简体中文(默认) | 繁體中文 | 日本語 | 한국어
|
|
Stanford REAP × CoPaper.AI · 实证研究 AI 工具的学术工业级产品
由斯坦福实证研究方法论团队打造,覆盖从数据清洗到顶刊投稿的完整工作流
🚀 New here? Open the Skill Search → to filter all 1,096 skills by method, stage, language, and license. The 5-minute tour (
make quickstart) prints the same picture in your terminal.🇨🇳 中文用户从本文件开始(流水线速览 + 76 行总表),每个合集的完整描述见
docs/CONTENT_ZH.md。📖 English readers: seeREADME-en.md.
| Rigor lane | Count | Where |
|---|---|---|
| Numeric benchmark tasks — gold values recomputed from real data each run | 18 | benchmark/ |
| Behavioral eval scenarios / rubric items | 41 / 210 | eval-harness/ |
Full trust overview:
docs/TRUST.md·docs/RIGOR_COVERAGE.md🏁 带上你自己的 agent 来考同一份卷子:
pip install -e .后用aers-score给自己打分,成绩发布在docs/EXTERNAL_SCOREBOARD.md(规则见docs/SCOREBOARD_RULES.md)。榜上的数字是我们用同一套评分器重算出来的,不是提交者自报的。
把项目 URL 地址 https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills 丢给 Claude Code / Codex,并指定是目录 / 项目 / 全局安装 —— 剩下的让它自己做。例如:
帮我安装 https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills
装到「全局」(~/.claude/skills/),我想在所有项目里都能用
把最后一行换成你要的作用域即可:
| 作用域 | 说给 Agent 的话 | 落到哪里 |
|---|---|---|
| 目录(当前会话临时用) | "只在当前目录用,不要全局安装" | 当前工作目录下的 .claude/skills/ |
| 项目(团队共享,可提交进 git) | "装到本项目" | 项目根目录 .claude/skills/ |
| 全局(所有项目可用) | "装到全局" | ~/.claude/skills/(Codex 为 ~/.codex/skills/) |
A. 插件市场(Claude Code v2.1+,推荐,可升级)
claude plugin marketplace add brycewang-stanford/Auto-Empirical-Research-Skills
claude plugin install aer-skills@auto-empirical-research-skills # 顶刊投稿全流程(9 skills)
claude plugin install empirical-analysis-python@auto-empirical-research-skills # Python 计量流水线
claude plugin install empirical-analysis-stata@auto-empirical-research-skills # Stata 计量流水线
claude plugin install empirical-analysis-r@auto-empirical-research-skills # R + Quarto 流水线
B. 只要某一个 skill —— 直接拷文件夹
git clone --recurse-submodules https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills.git
cd Auto-Empirical-Research-Skills
cp -R skills/00.1-Full-empirical-analysis-skill_Python .claude/skills/ # 项目级
cp -R skills/00.1-Full-empirical-analysis-skill_Python ~/.claude/skills/ # 全局
拷进去的文件夹必须自带 SKILL.md(部分合集的 SKILL.md 在下一层,拷那一层)。
新开一个会话,直接用自然语言说要做什么,Agent 会按 description 自动挑 skill;说不动就点名方法或 skill:
用面板数据跑一个 Callaway–Sant'Anna 事件研究,并出 HonestDiD 稳健性和期刊级表格
完整安装说明(Codex / CodeBuddy 整库导入、
--plugin-dir单次加载、常见故障排查)见INSTALL.md。
中文内容分两级维护,各司其职:
docs/CONTENT_ZH.md(扩展正文):每个合集的完整描述(#skill-NN 锚点)、按用途分组、精确数字、2 分钟验证、三层信任、旗舰流水线详解、贡献与引用。总表行内的 → 直接跳到对应锚点。README-en.md · README-zh-TW.md · README-ja.md · README-ko.md[!NOTE] 维护规则: 改合集总表 → 本文件与 CONTENT_ZH.md 的锚点表两处同步;改合集详情 / 分组 / 数字 → 只改
docs/CONTENT_ZH.md。统计数字(合集数 / skill 数)以catalog/skills.json为准,由make validate的 readme-stats 检查器守护。贡献者(Contributors): 提交前请在本地跑通完整门禁
make check(catalog 校验 + 链接 + 单元测试 + eval-harness + benchmark)。详见CONTRIBUTING.md。旧版归档:
README-zh-CN.md已弃用,仅作向后兼容的重定向占位。
AERS 不只是 76 个散装 skill —— 它能陪你走完一篇论文。 从模糊 idea → 选题精炼 → 文献综述 → 数据获取 → 识别策略 → 估计建模 → 稳健性审计 → 出版级表格 / 图形 → 写作与同行评审 → 降 AIGC → 投稿。端到端、全自动、每一步都可被人介入(中间任何一步你都可以接过去手工改方法、补变量、加稳健性,再让流水线自动接上跑)。
Paper-WorkFlow 是 AERS 的"指挥棒",它把上面 9 个阶段的 skill 串成 一条按键即运行的端到端流水线。
你在 IDE 入口给它一句自然语言:
"开一个新论文项目:空气污染与中国劳动力市场,CS 设计 + 省级面板"
它会自动按顺序调:
sp.csdid(...) 给出 CS-DID 估计草案 + 写出估计方程与识别假设sp.feols(...) + sp.honest_did(...)任何阶段你都可以手动介入 —— 上一阶段的产物全部落盘(产物-幂等 pipeline),你接过去改方法、补控制、加稳健性,再让流水线自动接下去跑。这就是"全自动 + 可介入"。
| ⭐ Skill | 在流水线里的角色 |
|---|---|
| 00 StatsPAI 🔥 | 因果引擎:900+ 函数,sp.causal(...) 一行跑闭环(DID / RD / IV / SCM / DML / matching) |
| 00.1 Full Empirical · Python 📘 | 显式 Python 栈(pandas / statsmodels / linearmodels / pyfixest) |
| 00.2 Full Empirical · Stata 📊 | 显式 Stata 栈(reghdfe / ivreg2 / csdid / sdid / rdrobust) |
| 00.3 Full Empirical · R 📗 | 显式 R 栈(tidyverse / fixest / did / HonestDiD)+ Quarto 渲染 |
| 48 de-AIGC-skills 🇨🇳🇬🇧 | 中英双语学术降 AIGC(Turnitin AI / GPTZero / 知网 / 万方) |
| 50 AER-skills 📕 | Top-5 经济学投稿套件:识别 → 稳健性 → R&R |
| 69 Paper-WorkFlow 🧭 | 元编排器,把上面 9 个阶段串成一键流水线 |
为什么挑这 7 个?因为它们的行为都被基准钉死了 —— 不是营销口径,是对着已知答案反复跑过验证过的(17 项数值 benchmark + 37 项行为评测 ↗)。
↴ 直跳到下方 76 行总表(每个合集带 #skill-NN 锚点)。如果你更关心"这些 skill 怎么用"而不是"有哪些 skill",看 📘 中文唯一权威正文 里的「按用途分组」与「旗舰流水线」两节。
00 → 72,编号连续无空缺)打开仓库 → 看见整座库。 全部 76 个合集 · 1,096 个 skill,每一个都已 vendor 进本仓库,由
catalog/skills.json跟踪。⭐ = Stanford REAP × CoPaper.AI 团队自研的 skill;其余为精选、经安全审计的社区作品。主题图例 — 🚀 全流程与编排器 · 🎯 因果推断与计量经济学 · 📚 文献与研究设计 · ✍️ 写作 / 编辑 / 去 AIGC · 📑 引用 / 复现 / 同行评审 · 🛠️ 数据 / 工具 / 基础设施
点击【→】 跳转到
docs/CONTENT_ZH.md中该合集的完整描述;点击合集名 直接打开其目录。🙏 尊重原作者 — 「来源」列直接链回上游原始仓库(
owner/repo)。本仓库里的社区合集都是上游快照:请去原仓库点 star、提 issue、看 LICENSE。完整的许可证与来源置信度审计见docs/LICENSE_AUDIT.md,机器可读版本在catalog/provenance.json。
| # | 合集 | 一句话 | 详情 | 来源 |
|---|---|---|---|---|
| ⭐ 00 | StatsPAI 🔥 | 因果引擎 · Agent-native Python DSL:sp.causal(...) 一行跑闭环(DID/RD/IV/SCM/DML,900+ 函数) | → | brycewang-stanford/StatsPAI |
| ⭐ 00.1 | Full Empirical · Python 📘 | 显式栈:pandas · statsmodels · linearmodels · pyfixest | → | ⭐ 本仓库 |
| ⭐ 00.2 | Full Empirical · Stata 📊 | reghdfe · ivreg2 · csdid · sdid · rdrobust 复现包 | → | ⭐ 本仓库 |
| ⭐ 00.3 | Full Empirical · R 📗 | tidyverse · fixest · did · HonestDiD + Quarto 渲染 | → | ⭐ 本仓库 |
| 01 | academic-paper-skills | 大纲 → 手稿写作 + 7 维审稿人模拟 | → | lishix520/academic-paper-skills |
| 02 | research-skills | 医学影像综述、提案、论文转幻灯片 | → | luwill/research-skills |
| 03 | scientific-skills | 假设生成 + 28 个科学数据库 | → | K-Dense-AI/claude-scientific-skills |
| 04 | scientific-writer | 引用管理 + 科学写作 | → | K-Dense-AI/claude-scientific-writer |
| 05 | research-superpower | 系统化检索、筛选与引文溯源 | → | kthorn/research-superpower |
| 06 | stats-paper-writing | 端到端 LaTeX 统计论文写作 | → | fuhaoda/stats-paper-writing-agent-skills |
| 07 | AI-Research-SKILLs | 发表级 ML 图表、LaTeX、引文核验 | → | Orchestra-Research/AI-Research-SKILLs |
| 08 | latex-document-skill | 创建 / 编译任意 LaTeX 文档为 PDF | → | ndpvt-web/latex-document-skill |
| 09 | awesome-econ-ai | Python 面板数据分析(linearmodels) | → | meleantonio/awesome-econ-ai-stuff |
| 10 | causal-inference-mixtape | DID / IV / RDD / SCM 模板(Cunningham) | → | Jill0099/causal-inference-mixtape |
| 11 | compound-science | 面向定量社会科学的贝叶斯估计 | → | James-Traina/compound-science |
| 12 | claude-code-my-workflow | 提交 → PR → 合并的研究工作流(Emory) | → | pedrohcgs/claude-code-my-workflow |
| 13 | MixtapeTools | Cunningham 的因果推断工具集与讲义 | → | scunning1975/MixtapeTools |
| 14 | research-starter | R 中的 IV / DiD / RDD,含完整诊断 | → | luischanci/claude-code-research-starter |
| 15 | social-science-research | R 或 Python 端到端数据分析 | → | Felpix-Studios/social-science-research |
| 16 | clo-author | 多代理数据分析(R / Stata / Python) | → | hsantanna88/clo-author |
| 17 | DAAF | 安全意识代理框架(32 条 deny rule) | → | DAAF-Contribution-Community/daaf |
| 18 | stata-accounting | 来自 126 篇 JAR 论文的实测 Stata 范式 | → | jusi-aalto/stata-accounting-research |
| 19 | vera-economic-intelligence | 经济情报 / 政策研究情报工作流 | → | CuellarC05/vera-economic-intelligence |
| 20 | python-econ-skill | DSGE / HANK 与定量经济计算 | → | wenddymacro/python-econ-skill |
| 21 | AI-research-feedback | 用 AI 同行评审生成结构化反馈 | → | claesbackman/AI-research-feedback |
| 22 | christopherkenny-skills | 面向 Quarto(.qmd)的 APSA 风格检查器 | → | christopherkenny/skills |
| 23 | baygent | 带护栏的 PyMC / Arviz 贝叶斯工作流 | → | Learning-Bayesian-Statistics/baygent-skills |
| 24 | academic-research-skills | 5 审稿人多视角论文评审 | → | Imbad0202/academic-research-skills |
| 25 | Diverga | 研究问题精炼器(抗模式坍缩) | → | HosungYou/Diverga |
| 26 | scholar | 统计算法设计与文档 | → | Data-Wise/claude-plugins |
| 27 | my_claude_skills | 经济学摘要写作指南 | → | dariia-m/my_claude_skills |
| 28 | paper-replicate-agent | 论文复现代理演示 | → | maxwell2732/paper-replicate-agent-demo |
| 29 | project20XXy | 可复现手稿 + notebook 项目 | → | quarcs-lab/project20XXy |
| 30 | zirui-song-claude-skills | Zirui Song 的研究辅助 Claude 技能集 | → | zirui-song/claude-skills |
| 31 | claude-code-skills | Python 面板数据分析 | → | thalysandratos/claude-code-skills |
| 32 | stata-skill | 高性能 Stata C/C++ 插件 | → | dylantmoore/stata-skill |
| 33 | claude-scholar | 研究全生命周期:选题 → 综述 → 实验 → 审稿回复 | → | Galaxy-Dawn/claude-scholar |
| 34 | research-companion | 头脑风暴、评估并决策研究方向 | → | andrehuang/research-companion |
| 35 | academic-writing-skills | 面向投稿场所的工业 AI 文献研究 | → | bahayonghang/academic-writing-skills |
| 36 | literature-review-skill | 完整文献综述工作流(中文) | → | taoyunudt/literature-review-skill |
| 37 | IlanStrauss-ai-skills | Ilan Strauss 经济学研究 AI 工作流 | → | IlanStrauss/ai-skills |
| 38 | academic-proofreader | 学术校对 | → | peternka/academic_proofreader |
| 39 | marginaleffects | 预测、斜率与比较(R / Python) | → | vincentarelbundock/marginaleffects |
| 40 | pyfixest | Python 中的快速固定效应估计 | → | py-econometrics/pyfixest |
| 41 | sewage-econometrics-check | 10 项复现包审计 | → | sticerd-eee/sewage |
| 42 | ARIS | 自主「research-in-sleep」代理,端到端 | → | wanshuiyin/Auto-claude-code-research-in-sleep |
| 43 | research-plugins | 478 个研究插件:数据可视化、领域、基础设施 | → | wentorai/research-plugins |
| 44 | humanizer_academic | 为医学/学术手稿去 AI 味(23 类模式) | → | matsuikentaro1/humanizer_academic |
| 45 | deslop | 去除 AI 写作痕迹(5 维评分) | → | stephenturner/skill-deslop |
| 46 | stop-slop | 三层 AI 痕迹检测与改写 | → | hardikpandya/stop-slop |
| 47 | avoid-ai-writing | 审计 → 改写 → 二次审计 AI 味(留痕) | → | conorbronsdon/avoid-ai-writing |
| ⭐ 48 | de-AIGC-skills 🇨🇳🇬🇧 | 中英双语学术降 AIGC(Turnitin AI / GPTZero / 知网 / 万方) | → | ⭐ 本仓库 |
| 49 | humanize-chinese | 检测并人性化 AI 生成的中文文本 | → | swaylq/humanize-chinese |
| ⭐ 50 | AER-skills 📕 | Top-5 经济学投稿套件:识别 → 稳健性 → R&R | → | brycewang-stanford/AER-skills |
| 51 | CausalPy | 贝叶斯准实验(PyMC Labs) | → | pymc-labs/CausalPy |
| 52 | slr-prisma | 系统文献综述,PRISMA 2020 | → | keemanxp/slr-prisma |
| 53 | thematic-analysis | Braun & Clarke 六阶段定性主题分析 | → | keemanxp/thematic-analysis-skill |
| 54 | open-science-skills | 引用一致性、DOI 与论据支撑审计 | → | scdenney/open-science-skills |
| 55 | r-skills | R 中用 brms 做贝叶斯推断 | → | ab604/claude-code-r-skills |
| 56 | econ-writing-skill | 综合 50+ 顶级指南的经济学写作 | → | hanlulong/econ-writing-skill |
| 57 | edgartools | 查询与分析 SEC 文件 | → | dgunning/edgartools |
| 58 | econstack | 政策简报(UK GES / AU Treasury) | → | charlescoverdale/econstack |
| 59 | openalex-skill | 通过 OpenAlex 查询 2.4 亿+ 学术作品 | → | shiquda/openalex-skill |
| 60 | superpapers | 综合性实证研究支持套件 | → | regisely/superpapers |
| 61 | research-methods | 与预注册匹配的验证性检验 | → | phdemotions/research-methods |
| 62 | citation-checker | 对照 CrossRef / S2 / OpenAlex 核验引用 | → | PHY041/claude-skill-citation-checker |
| 63 | scientific-agent-skills | DoWhy 识别–估计–反驳框架 | → | tondevrel/scientific-agent-skills |
| 64 | mcp-stata | 20 个 Stata 因果推断与复现 skill | → | tmonk/mcp-stata |
| 65 | game-theory-paper-writer | 生成并压力测试博弈论论文 | → | 本仓库 PR #17 |
| 66 | empirical-research-skills | 面向大型面板的 R 性能优化 | → | SiyaoZheng/ai4ss-skills |
| 67 | econfin-workflow-toolkit | 中国公司金融实证工作流,从提案到论文 | → | 本仓库 PR #22 |
| 68 | research-productivity-skills | 论文检索、SSRN、DOI 查询、下载 | → | 本仓库 PR #21 |
| ⭐ 69 | Paper-WorkFlow 🧭 | 元编排器,串起整个社会科学论文流水线 | → | brycewang-stanford/Paper-WorkFlow |
| 70 | ssci-polish ✍️ | SSCI / SCI 英文论文语言润色(语法、可读性、学术语气) | → | ⭐ 本仓库 |
| ⭐ 71 | lit-review-agent-tools 🔍 | 文献综述工具选型 + 一键安装运行(MinerU / PaperQA2 / ASReview / STORM / MCP 服务器) | → | brycewang-stanford/lit-review-agent-tools |
| ⭐ 72 | Kaggle Research 🧪 | 通过官方 CLI 安全检索 Kaggle 资源、限界下载公开数据并保留审计证据 | → | ⭐ 本仓库 |
想看更详细的描述(主题分类、字段、统计)? 见
docs/CONTENT_ZH.md中标注#skill-NN锚点的同一张表 —— 它是每个合集的完整描述所在的扩展正文。
自 2026-04 首次发布以来的主干里程碑(完整提交记录见 Commits 与 CHANGELOG.md):
---
config:
gitGraph:
rotateCommitLabel: false
---
gitGraph TB:
commit id: "2026-04 首次发布"
branch community
commit id: "2026-05 首个社区 PR"
checkout main
merge community
commit id: "2026-05 更名 AERS"
commit id: "2026-06 插件市场"
commit id: "2026-06 全库路由器"
commit id: "2026-07 首个 tag" tag: "v2026.07"
branch kaggle
commit id: "2026-07 Kaggle 集成"
checkout main
merge kaggle
commit id: "2026-08 de-AIGC 双语"
commit id: "2026-08 来源链接全覆盖"
branch evidence
commit id: "2026-08 aers-score CLI"
commit id: "2026-08 外部成绩单"
checkout main
merge evidence
commit id: "2026-08 结构估计 = 方法族 18"
commit id: "2026-08 NSW 基准从引用变推导"
Star 增长曲线(非提交数)· 由 scripts/build-star-history.py 从 GitHub API 生成并提交入库
如果 AERS 对你的工作有帮助,请引用它(CITATION.cff)并点个 Star,让更多研究者看到。
AI 是放大器,不是替代品。它替你做最耗时的"搬砖",你保留最核心的"判断"。
|
|
Stanford REAP × CoPaper.AI · 实证研究 AI 工具的学术工业级产品
![]() 扫码访问 copaper.ai |
![]() 关注公众号「CoPaper.AI」 |
内置 20 个方法论 skill · 20 分钟完成实证论文 · 自研 StatsPAI(900+ 函数 / MIT 开源)
name: academic-plotting
description: Generates publication-quality figures for ML papers from research context. Given a paper section or description, extracts system components and relationships to generate architecture diagrams via Gemini. Given experiment results or data, auto-selects chart type and generates data-driven figures via matplotlib/seaborn. Use when creating any figure for a conference paper.
version: 1.0.0
author: Orchestra Research
license: MIT
tags: [Academic Writing, Visualization, Matplotlib, Seaborn, Plotting, Figures, Diagrams, NeurIPS, ICML, ICLR, LaTeX]
dependencies: [matplotlib>=3.8.0, seaborn>=0.13.0, numpy, google-genai>=1.0.0]Generate publication-quality figures for ML/AI conference papers. Two distinct workflows:
| Figure Type | Tool | Why |
|---|---|---|
| Architecture / system diagram | Gemini (Workflow 1) | Complex spatial layouts with boxes, arrows, labels |
| Workflow / pipeline / lifecycle | Gemini (Workflow 1) | Multi-step processes with connections |
| Bar chart, line plot, scatter | matplotlib (Workflow 2) | Precise numerical data, reproducible |
| Heatmap, confusion matrix | matplotlib/seaborn (Workflow 2) | Structured grid data |
| Ablation table as chart | matplotlib (Workflow 2) | Grouped bars or line comparisons |
| Pie / donut chart | matplotlib (Workflow 2) | Proportional data (use sparingly in ML papers) |
| Training curves | matplotlib (Workflow 2) | Loss/accuracy over steps/epochs |
Rule of thumb: If the figure has numerical axes, use matplotlib. If the figure has boxes and arrows, use Gemini.
The user will typically provide one of these inputs — not a ready-made specification:
| Input Type | Example | What to Extract |
|---|---|---|
| Full paper / section draft | "Here's our method section..." | System components, their relationships, data flow |
| Description paragraph | "Our system has three layers that..." | Key entities, hierarchy, connections |
| Raw results / data table | "MMLU: 85.2, HumanEval: 72.1..." | Metrics, methods, comparison structure |
| CSV / JSON data | Experiment log files | Variables, trends, grouping dimensions |
| Vague request | "Make a figure for the overview" | Read surrounding paper context to infer content |
For diagrams (research context → architecture figure):
For data charts (results → figure):
Context → Diagram: "Our system has a Planner, Executor, and Verifier. Planner sends plans to Executor, Executor returns results to Verifier, Verifier feeds back to Planner on failure." → 3 entities, cycle layout, dashed feedback arrow → Workflow 1 (Gemini)
Data → Chart: "GPT-4: MMLU 86.4, HumanEval 67.0. Ours: 88.1, 71.2. Llama-3: 79.3, 62.1." → 3 methods × 2 benchmarks → Workflow 2 (grouped bar), highlight "Ours" in coral
Use Gemini 3 Pro Image Preview to generate diagrams. Choose a visual style first — this is the single biggest factor in whether the figure looks professional or generic.
Pick one style per paper (all figures should be consistent):
Warm, approachable, memorable. Ideal for overview figures and system introductions. Looks like a whiteboard sketch refined by a designer.
VISUAL STYLE — HAND-DRAWN SKETCH:
- Slightly irregular, hand-drawn line quality — lines wobble gently, not perfectly straight
- Rounded, soft shapes with visible pen strokes (like drawn with a thick felt-tip marker)
- Warm off-white background (#FAFAF7), NOT pure white
- Fill colors are soft watercolor-like washes: muted blue (#D6E4F0), soft peach (#F5DEB3),
light sage (#D4E6D4), pale lavender (#E6DFF0)
- Borders are dark charcoal (#2C2C2C) with 2-3px line weight, slightly uneven
- Arrows are hand-drawn with slight curves, ending in simple open arrowheads (not filled triangles)
- Text uses a rounded sans-serif font (like Comic Neue or Architects Daughter feel)
- Small doodle-style icons inside boxes: a tiny gear ⚙ for processing, a lightbulb 💡 for ideas,
a magnifying glass 🔍 for search — rendered as simple line drawings, NOT emoji
- Overall feel: a carefully drawn whiteboard diagram, clean but with personality
- NO clip art, NO stock icons, NO photorealistic elements
Confident, authoritative. Best for method figures where precision matters.
VISUAL STYLE — MODERN MINIMAL:
- Ultra-clean geometric shapes with crisp edges
- Bold color blocks as backgrounds for sections — NOT just accent bars, but full section fills
using desaturated tones: slate blue (#E8EDF2), warm sand (#F5F0E8), cool mint (#E8F2EE)
- Component boxes have ROUNDED CORNERS (12px radius), NO visible border — they float on
the section background using subtle shadow (1px, 4px blur, rgba(0,0,0,0.06))
- ONE accent color per section used sparingly on key elements: Deep blue (#2563EB),
Emerald (#059669), Amber (#D97706), Rose (#E11D48)
- Arrows are thin (1.5px), dark gray (#6B7280), with small filled circle at source
and clean arrowhead at target — NOT thick colored arrows
- Typography: Inter or system sans-serif, title 600 weight, body 400 weight
- Labels INSIDE boxes, not beside them
- Generous whitespace — at least 24px between elements
- NO decorative elements, NO icons — let the structure speak
Engaging, explanatory. Good for tutorial-style papers and figures that need to be self-explanatory.
VISUAL STYLE — ILLUSTRATED TECHNICAL:
- Each major component has a small MEANINGFUL ICON drawn in a consistent line-art style
(single color, 2px stroke, ~24x24px): brain icon for reasoning, database cylinder for storage,
arrow-loop for iteration, network nodes for communication
- Components sit inside soft rounded rectangles with a LEFT COLOR STRIP (4px wide)
- Background is pure white, but each logical group has a very faint colored region behind it
(#F8FAFC for blue group, #FFF8F0 for orange group)
- Connections use CURVED bezier paths (not straight lines), colored by SOURCE component
- Key data flows are THICKER (3px) than secondary flows (1px, dashed)
- Small annotation badges on arrows: "×N" for repeated operations, "optional" in italics
- Title labels are ABOVE each section in small caps, letter-spaced
- Overall: like a well-designed API documentation diagram
The default academic style. Safe for any venue, works well in grayscale.
VISUAL STYLE — CLASSIC ACCENT BAR:
- Horizontal section bands stacked vertically, pale gray (#F7F7F5) fill
- Thick colored LEFT ACCENT BAR (8px) distinguishes each section
- Content boxes: white fill, thin #DDD border, 4px rounded corners
- Section palette: Blue #4A90D9, Teal #5BA58B, Amber #D4A252, Slate #7B8794
- Sans-serif typography (Helvetica/Arial), bold titles, regular body
- Colored arrows match their SOURCE section
- Clean, flat, zero decoration
"Ocean Dusk" (professional, calming — default recommendation):
#264653 deep teal, #2A9D8F teal, #E9C46A gold, #F4A261 sandy orange, #E76F51 burnt coral
"Ink & Wash" (for 简笔画 style):
#2C2C2C charcoal ink, #D6E4F0 washed blue, #F5DEB3 washed wheat, #D4E6D4 washed sage, #E6DFF0 washed lavender
"Nord" (for modern minimal):
#2E3440 polar night, #5E81AC frost blue, #A3BE8C aurora green, #EBCB8B aurora yellow, #BF616A aurora red
"Okabe-Ito" (universal colorblind-safe, required for data charts):
#E69F00 orange, #56B4E9 sky blue, #009E73 green, #F0E442 yellow, #0072B2 blue, #D55E00 vermillion, #CC79A7 pink
GEMINI_API_KEY env var)figures/gen_fig_<name>.py, run for 3 attemptsfigures/fig_<name>.pngEvery Gemini prompt must include these sections in order:
1. FRAMING (5 lines): "Create a [STYLE_NAME]-style technical diagram for a
[VENUE] paper. The diagram should feel [ADJECTIVES]..."
2. VISUAL STYLE (20-30 lines): Copy the full style block from above (A/B/C/D).
This is the most important section — it determines the entire visual character.
3. COLOR PALETTE (10 lines): Exact hex codes for every color used.
4. LAYOUT (50-150 lines): Every component, box, section — exact text, spatial
arrangement, and grouping. Be exhaustively specific.
5. CONNECTIONS (30-80 lines): Every arrow individually — source, target, style,
label, routing direction.
6. CONSTRAINTS (10 lines): What NOT to include. Adapt per style — e.g., sketch
style allows slight irregularity but still no clip art.
#!/usr/bin/env python3
"""Generate [FIGURE_NAME] diagram using Gemini image generation."""
import os, sys, time
from google import genai
API_KEY = os.environ.get("GEMINI_API_KEY")
if not API_KEY:
print("ERROR: Set GEMINI_API_KEY environment variable.")
print(" Get a key at: https://aistudio.google.com/apikey")
sys.exit(1)
MODEL = "gemini-3-pro-image-preview"
OUTPUT_DIR = os.path.dirname(os.path.abspath(__file__))
client = genai.Client(api_key=API_KEY)
PROMPT = """
[PASTE YOUR 6-SECTION PROMPT HERE]
"""
def generate_image(prompt_text, attempt_num):
print(f"
{'='*60}
Attempt {attempt_num}
{'='*60}")
try:
response = client.models.generate_content(
model=MODEL,
contents=prompt_text,
config=genai.types.GenerateContentConfig(
response_modalities=["IMAGE", "TEXT"],
),
)
output_path = os.path.join(OUTPUT_DIR, f"fig_NAME_attempt{attempt_num}.png")
for part in response.candidates[0].content.parts:
if part.inline_data:
with open(output_path, "wb") as f:
f.write(part.inline_data.data)
print(f"Saved: {output_path} ({os.path.getsize(output_path):,} bytes)")
return output_path
elif part.text:
print(f"Text: {part.text[:300]}")
print("WARNING: No image in response")
return None
except Exception as e:
print(f"ERROR: {e}")
return None
def main():
results = []
for i in range(1, 4):
if i > 1:
time.sleep(2)
path = generate_image(PROMPT, i)
if path:
results.append(path)
if not results:
print("All attempts failed!")
sys.exit(1)
print(f"
Generated {len(results)} attempts. Review and pick the best.")
if __name__ == "__main__":
main()
os.environ.get("GEMINI_API_KEY")Full prompt examples per style: See references/diagram-generation.md
For any figure with numerical data, axes, or quantitative comparisons.
figures/gen_fig_<name>.py| Data Pattern | Best Chart | Notes |
|---|---|---|
| Trend over time/steps | Line plot | Training curves, scaling laws |
| Comparing categories | Grouped bar chart | Model comparisons, ablations |
| Distribution | Violin / box plot | Score distributions across methods |
| Correlation | Scatter plot | Embedding analysis, metric correlation |
| Grid of values | Heatmap | Attention maps, confusion matrices |
| Part of whole | Stacked bar (not pie) | Prefer stacked bar over pie in ML papers |
| Many methods, one metric | Horizontal bar | Leaderboard-style comparisons |
import matplotlib.pyplot as plt
import numpy as np
# --- Publication defaults (polished, not generic) ---
plt.rcParams.update({
"font.family": "serif", "font.serif": ["Times New Roman", "DejaVu Serif"],
"font.size": 10, "axes.titlesize": 11, "axes.titleweight": "bold",
"axes.labelsize": 10, "legend.fontsize": 8.5, "legend.frameon": False,
"figure.dpi": 300, "savefig.dpi": 300, "savefig.bbox": "tight",
"axes.spines.top": False, "axes.spines.right": False,
"axes.grid": True, "grid.alpha": 0.15, "grid.linestyle": "-",
"lines.linewidth": 1.8, "lines.markersize": 5,
})
# --- "Ocean Dusk" palette (professional, distinctive, colorblind-safe) ---
COLORS = ["#264653", "#2A9D8F", "#E9C46A", "#F4A261", "#E76F51",
"#0072B2", "#56B4E9", "#8C8C8C"]
OUR_COLOR = "#E76F51" # coral — warm, stands out
BASELINE_COLOR = "#B0BEC5" # cool gray — recedes
FIG_SINGLE, FIG_FULL = (3.25, 2.5), (6.75, 2.8)
Line plot (training curves) — with markers and confidence bands:
fig, ax = plt.subplots(figsize=FIG_SINGLE)
markers = ["o", "s", "^", "D", "v"]
for i, (method, (mean, std)) in enumerate(results.items()):
color = OUR_COLOR if method == "Ours" else COLORS[i]
ax.plot(steps, mean, label=method, color=color,
marker=markers[i % 5], markevery=max(1, len(steps)//8),
markersize=4, zorder=3)
ax.fill_between(steps, mean - std, mean + std, color=color, alpha=0.12)
ax.set_xlabel("Training Steps")
ax.set_ylabel("Accuracy (%)")
ax.legend(loc="lower right")
fig.savefig("figures/fig_training.pdf")
fig.savefig("figures/fig_training.png", dpi=300)
Grouped bar chart (ablation) — with value labels:
fig, ax = plt.subplots(figsize=FIG_FULL)
x = np.arange(len(categories))
n = len(methods)
width = 0.7 / n
for i, (method, scores) in enumerate(methods.items()):
color = OUR_COLOR if method == "Ours" else COLORS[i]
offset = (i - n / 2 + 0.5) * width
bars = ax.bar(x + offset, scores, width * 0.9, label=method, color=color,
edgecolor="white", linewidth=0.5)
for bar, s in zip(bars, scores):
ax.text(bar.get_x() + bar.get_width()/2, bar.get_height() + 0.3,
f"{s:.1f}", ha="center", va="bottom", fontsize=7, color="#444")
ax.set_xticks(x)
ax.set_xticklabels(categories)
ax.set_ylabel("Score")
ax.legend(ncol=min(n, 4))
fig.savefig("figures/fig_ablation.pdf")
Heatmap — with diverging colormap and clean borders:
import seaborn as sns
fig, ax = plt.subplots(figsize=(4, 3.5))
sns.heatmap(matrix, annot=True, fmt=".2f", cmap="YlOrRd", ax=ax,
cbar_kws={"shrink": 0.75, "aspect": 20},
linewidths=1.5, linecolor="white",
annot_kws={"size": 8, "weight": "medium"})
ax.set_xlabel("Predicted")
ax.set_ylabel("Actual")
fig.savefig("figures/fig_confusion.pdf")
Horizontal bar (leaderboard) — with "our method" highlight:
fig, ax = plt.subplots(figsize=FIG_SINGLE)
y_pos = np.arange(len(models))
colors = [BASELINE_COLOR] * len(models)
colors[our_idx] = OUR_COLOR
bars = ax.barh(y_pos, scores, color=colors, height=0.55,
edgecolor="white", linewidth=0.5)
ax.set_yticks(y_pos)
ax.set_yticklabels(models)
ax.set_xlabel("Accuracy (%)")
ax.invert_yaxis()
for bar, s in zip(bars, scores):
ax.text(bar.get_width() + 0.3, bar.get_y() + bar.get_height()/2,
f"{s:.1f}", va="center", fontsize=8, color="#444")
fig.savefig("figures/fig_leaderboard.pdf")
Full pattern library (scaling laws, violin plots, multi-panel, radar): See references/data-visualization.md
| Venue | Single Col | Full Width | Font |
|---|---|---|---|
| NeurIPS | 5.5 in | 5.5 in | Times |
| ICML | 3.25 in | 6.75 in | Times |
| ICLR | 5.5 in | 5.5 in | Times |
| ACL | 3.3 in | 6.8 in | Times |
| AAAI | 3.3 in | 7.0 in | Times |
Always export PDF for vector quality. PNG only for AI-generated diagrams.
Venue-specific details, LaTeX integration, font matching, accessibility checklist: See references/style-guide.md
| Issue | Solution |
|---|---|
| Fonts look wrong in LaTeX | Export PDF, set text.usetex=True, or use font.family=serif |
| Figure too large for column | Check venue width limits, use figsize in inches |
| Colors indistinguishable in print | Use colorblind-safe palette + different line styles/markers |
| Gemini misspells labels | Spell out every label exactly in prompt, add "SPELL EXACTLY" constraint |
| Gemini ignores style | Add more negative constraints, be more specific about hex colors |
| Blurry figures in PDF | Export as PDF (vector), not PNG; or use 300+ DPI for PNG |
| Legend overlaps data | Use bbox_to_anchor, loc="upper left", or external legend |
| Too many tick labels | Use ax.xaxis.set_major_locator(MaxNLocator(5)) |
| Need | This Skill | Alternative |
|---|---|---|
| Architecture diagrams | Gemini generation | TikZ (manual), draw.io (interactive), Mermaid (simple) |
| Data charts | matplotlib/seaborn | Plotly (interactive), R/ggplot2 (statistics-heavy) |
| Full paper writing | Use with ml-paper-writing | — |
| Poster figures | Larger fonts, wider | latex-posters skill |
| Presentation figures | Larger text, fewer details | PowerPoint/Keynote export |
figures/
├── gen_fig_<name>.py # Generation script (always save for reproducibility)
├── fig_<name>.pdf # Final vector output (for LaTeX)
├── fig_<name>.png # Raster output (300 DPI, for AI-generated or fallback)
└── fig_<name>_attempt*.png # Gemini attempts (keep for comparison)
评论 (0)
暂无评论,成为第一个评论者吧!