
Jupyter Notebooks
Skill创建、修改与校验可复现的 Python / SQL Jupyter Notebook:按分析报告或教程结构组织单元格,结论对照实际输出,交付前从头到尾执行一遍。OpenAI 官方维护,属于 openai/plugins 的 Data Analytics 插件。
name: jupyter-notebooks
description: "Create, edit, or validate reproducible SQL or Python notebooks. Use for notebooks, SQL/Python scratchpads, reproducible exploration, audit trails, or runnable companions where the analysis should be reviewable or rerunnable."
Related Skills
Use $validate-data when notebook results support a recommendation, shared claim, or decision.
Jupyter Notebooks
Create clean, reproducible Jupyter notebooks that are easy to skim, rerun, and handoff. Treat the notebook as a reader-facing analysis artifact, not a scratchpad dump. Notebook work is not complete until the notebook executes successfully top-to-bottom, or the execution gap is called out with the exact validation steps needed to reproduce it.
Workflow
-
Lock the notebook mode and scope.
Decide whether the notebook is an analysis report, experiment log, diagnostic notebook, data-quality check, market-sizing calculation, model exploration, tutorial, or companion artifact for a report. Identify the reader, decision, expected handoff, required inputs, and whether the task calls for a new notebook or targeted edits to an existing one.
-
Inspect or scaffold with notebook-safe tooling.
Prefer JupyterLab,
nbformat,nbclient, or an existing scaffold utility over hand-editing raw JSON. When editing an existing notebook, preserve its intent and minimize JSON churn. Avoid reordering cells unless it clearly improves the top-to-bottom story. If raw JSON editing is unavoidable, validate the notebook structure before finishing. -
Structure the notebook for the chosen mode.
For analytical notebooks, default to:
## tl;dr## Context & Methods## Data## Results## Takeaways
Write
tl;drand takeaways after reviewing executed outputs. Use concrete observed values, visible patterns, rows, or charts, not assumptions. Include a### Key Assumptionssubsection inContext & Methodswhen assumptions affect correctness.For tutorials or walkthroughs, adapt the same discipline to a teaching flow:
## Goal## Setup## Steps## Checks## Next Steps
-
Build a clear data and computation path.
Separate setup, imports, parameters, data loading, data preparation, calculations, visualizations, and interpretation. If the notebook uses both SQL and Python, keep complex SQL in SQL cells or separate query files rather than large embedded Python strings unless there is a clear reason. Use descriptive variable names and keep each code cell focused on one step.
-
Use data sources deliberately.
When a notebook needs table data, first use
~~structured_datato confirm table choice, schema, partition filters, sample rows, and query-submission policy. Use the relevant source connector when available, then fall back to exports or pasted SQL when needed. Use~~operations_logsfor freshness or lineage checks when they matter. Record query permalinks, request IDs, source paths, dashboard links, extract names, or other source artifacts in the notebook context for any executed result that supports the analysis. Keep heavy queries filtered and bounded instead of turning the notebook into a broad live-source scan. -
Make cells readable and bounded.
Add concise markdown headers before most code cells. Keep headers brief and action-oriented, such as
### 1. Load Data,### 2. Validate Inputs, or### 3. Plot Results. Favor several short cells over one large mixed-purpose cell. Keep prose short: explain purpose, assumptions, and expected result, not every line of code. Split multiple tables or charts across separate cells instead of dumping all outputs from one cell. -
Validate results before writing conclusions.
Check that key numbers, charts, and takeaways match executed outputs. Bound raw debug output, oversized tables, and noisy logs. If a result is surprising, add a local reasonableness check, small sample inspection, or reconciliation against a trusted source before promoting it to the summary.
-
Execute and record validation status.
Run the notebook top-to-bottom when the environment allows:
python -m jupyter nbconvert --execute --to notebook --inplace path/to/notebook.ipynbOptional local setup when needed:
uv pip install jupyterlab nbformat nbclient ipykernelIf execution is not possible, say so explicitly and provide the exact command, missing dependency, credential, data access, kernel, or environment step needed to validate locally.
Standards
Notebook Structure
- Make the default top-to-bottom read clear before the reader starts executing cells out of order.
- Put executive summary material at the top, but write it last after inspecting executed results.
- Keep notebook sections aligned with the notebook mode: analysis, experiment, diagnostic, tutorial, or handoff artifact.
- Keep section titles, chart titles, labels, and file names descriptive enough for handoff.
- Preserve the existing notebook's intent when refactoring; improve structure without rewriting everything by default.
Reproducibility
- Keep parameters, date ranges, filters, cohorts, assumptions, and source references visible near the top of the notebook.
- Record enough source context for another reader to trace the analysis: query permalinks, request IDs, table names, source paths, spreadsheet tabs, dashboard links, extract versions, or input file locations.
- Make computation deterministic where possible. Avoid hidden state, manually edited intermediate values, out-of-order dependencies, and unexplained cached outputs.
- Prefer explicit environment setup cells or notes when the notebook depends on nonstandard packages, kernels, credentials, or local files.
- Execute the notebook when the task requires a runnable artifact. In the final response, do not add a separate routine validation section for a clean run; surface execution gaps, partial execution, or unrun notebooks with the reason because those affect whether the user can rely on the artifact.
Code And Data Hygiene
- Separate data preparation from presentation.
- Keep complex SQL readable and documented with a one-line goal comment.
- Keep plotting and lightweight shaping in Python after the data preparation step is complete.
- Use descriptive variable names and avoid abbreviated temporary names in reader-facing notebooks.
- Keep outputs bounded. Prefer small preview tables, sampled rows, explicit limits, and focused charts over raw dumps.
- Avoid broad live-source scans. Filter queries by needed partitions, cohorts, or time windows.
Analysis Quality
- Make assumptions explicit when they affect interpretation.
- Tie takeaways to executed outputs with concrete numbers, rows, charts, or visible patterns.
- Do not promote unexecuted or unverified calculations into the
tl;dr. - Label caveats, incomplete checks, missing source access, and known validation gaps.
- Add reasonableness checks for surprising results, high-impact claims, or stakeholder-facing conclusions.
Validation Checklist
- Required section order is present for the notebook mode.
- The notebook executes without runtime errors, or execution failure is called out explicitly.
- Outputs are present where expected and are not dominated by raw debug dumps.
- The
tl;dr, results, and takeaways match executed cells. - Source references and query or artifact links are preserved.
- Tables and charts are labeled, bounded, and interpretable.
- The final response includes the notebook path and validation status.
相關資源

Jupyter MCP Server
MCP让 agent 实时连接 Jupyter Notebook:读写、插入与执行单元格,并读取图表等多模态输出,适合交互式数据分析。需自备 JupyterLab 或 JupyterHub,Datalayer 开源维护。
datalayer/jupyter-mcp-server1.3k
Scientific Agent Skills
SkillK-Dense 维护的 166 个科研技能合集(原 Claude Scientific Skills):覆盖生物信息、化学信息、临床研究、材料与物理等领域,含统一查询 PubChem、UniProt 等 78 个公共数据库的技能。
K-Dense-AI/scientific-agent-skills51.2k
Scanpy Single-Cell Analysis
Skill教 agent 用 Scanpy 完成单细胞 RNA-seq 标准分析:质控、归一化、PCA/UMAP 降维、聚类、差异表达与可视化,附可直接运行的流程脚本,并指导把 Seurat 等 R 对象转成 h5ad。需 Python 3.12+,K-Dense 维护。
K-Dense-AI/scientific-agent-skills51.2k
Statistical Analysis
Skill引导 agent 为科研数据选对统计方法:t 检验、方差分析、卡方、回归与贝叶斯分析,检查前提假设、计算效应量与统计功效,并按 APA 格式写出结果。基于 Python(pingouin、statsmodels),K-Dense 维护。
K-Dense-AI/scientific-agent-skills51.2k
Jupytext
CLI在 Jupyter Notebook 与普通 Python 脚本或 Markdown 之间互相转换、双向同步的工具,让 agent 能像改普通文本一样修改科研和教学用的 notebook,版本对比也更清楚。需要本机 Python 环境,用 pip 安装。
jupytext/jupytext7.3k
MATLAB MCP Server
MCPMathWorks 官方出品,让 agent 启动本机 MATLAB,编写并运行脚本和单元测试、检查代码风格与潜在错误,适合用 MATLAB 做数值计算、仿真和数据分析的工程师、科研人员与学生。需本机安装已授权的 MATLAB R2021a 以上,并下载服务器程序。
matlab/matlab-mcp-server1.6k