数据分析
- 作者仓库星标 34
- 许可证 MIT
- 作者更新于 实时读取
- 作者仓库 skills
- 领域
- 数据
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 94 / 100 · 已通过审计
- 作者 / 版本 / 许可
- @ericmjl · MIT
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- Python
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: scientific-eda
description: Defensive exploratory data analysis for scientific data (CSV, FASTA, etc.). Context-first, human…
category: 数据
runtime: Python
---
# scientific-eda 输出预览
## PART A: 任务判断
- 适用问题:表格、CSV、数据集、指标或分析流程。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Usage / Requirements / What It Does”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于表格、CSV、数据集、指标或分析流程,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Usage / Requirements / What It Does”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Usage / Requirements / What It Does”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: scientific-eda
description: Defensive exploratory data analysis for scientific data (CSV, FASTA, etc.). Context-first, human…
category: 数据
source: ericmjl/skills
---
# scientific-eda
## 什么时候使用
- 把数据处理方向的常用动作沉淀成 Agent 可调用的技能 适合处理表格、CSV、指标、数据集、分析和可视化报告,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步…
- 面向表格、CSV、数据集、指标或分析流程,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Usage / Requirements / What It Does」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "scientific-eda" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Usage / Requirements / What It Does
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Python | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Scientific exploratory data analysis
This skill guides defensive, human-led exploratory data analysis on scientific data. The agent does not open files and dump code; it captures problem context first, helps narrow to a single first step, takes instruction from the user, and asks "why?" before executing when the user requests a specific plot or table.
Usage
Use this skill when the user provides one or more data files (CSV, FASTA, or other scientific formats) and wants to explore or analyze them. Start by capturing context—do not load or plot data until the problem (biological, chemical, or data-science question) is clearly stated and the agent is aligned as a guided assistant.
Requirements
- uv for running Python scripts: every script uses PEP723 inline script metadata and is run with
uv run script.py. Do not run ad-hoc Python or raw interpreters; each script declares and manages its own dependencies. - Ability to read the relevant data formats (pandas, BioPython, etc.) via dependencies declared in the script block.
What It Does
- Context first – Capture and record the problem context (what question, what domain) before touching the data.
- Single first step – Help the user narrow to one first plot or one first summary (not a barrage of code or plots).
- Human-guided execution – Take instruction on what to do next; when the user says "make this plot" or "give me that table," ask why before doing it, then execute.
- Session layout – Each analysis is a session: one folder under
analysis/with a descriptive name and start date/time, containingjournal.md,plots/, andscripts/. - Journal – Append-only
journal.mdper session: record data shape (columns, rows, structure), what was done, and findings. - Scripts and plots – Throwaway scripts in
scripts/(PEP723,uv run); plots saved as WebP (not PNG) for small file size; all under the session folder. - Suggest next step – After each action, suggest the most logical next step and let the user decide.
How It Works
Phase 1: Capture context (before touching data)
- Do not open the data file and start coding or plotting.
- Ask for or confirm: the problem context—biological, chemical, or data-science question; what the user hopes to learn or decide; and any constraints (e.g. specific variables, subsets).
- Record this in the session’s
journal.md(see Phase 3). Only after context is recorded and agreed, proceed to inspect data shape and plan the first step.
Phase 2: Start a data analysis session
- Create one session folder under
analysis/(or a project-agreed base). Name it descriptive + ISO datetime at session start, e.g.analysis/2025-02-05T14-30-00-protein-binding/. - Canonical layout for each session folder:
journal.md– append-only running journal for this sessionplots/– all figures (WebP only for matplotlib)scripts/– disposable scripts that load data, summarize, or make plots
- Session folder name must include date/time and a short descriptive slug so sessions are sortable and identifiable. See references/session-structure.md for the canonical tree.
Phase 3: Journal (append-only, per session)
- Before each substantive action, read the session’s
journal.md. - Record in the journal:
- Data shape: after loading or inspecting the data, jot columns (and types if relevant), row count, and any structure (e.g. multi-index, FASTA count, key fields). Do this as soon as shape is known and after any major data step.
- What was done (which script, which plot, which summary)
- Findings, surprises, and follow-up ideas
- Use a timestamp per entry (e.g. ISO or compact
YYYY-MM-DD HH:MM). - Tags like
[SHAPE],[PLOT],[FINDING],[NEXT]keep the journal scannable. The journal is the session’s memory; use it to suggest the next step.
Phase 4: Understand shape, then one first step
- Shape of the data: Before proposing or making plots, ensure the agent (and user) knows: what columns/fields exist, how many rows/records, and any critical structure. Record this in
journal.mdunder a[SHAPE]entry. - Single first plot (or table): Help the user choose one first visualization or summary (e.g. one distribution, one overview table). Do not generate many plots at once; get alignment on that single step, then execute.
Phase 5: Human-guided execution and "ask why"
- Take instruction: The user may ask for a specific plot, table, or filter. Execute only after clarity.
- Ask why before doing: When the user says "make this plot" or "give me that table," briefly ask why (e.g. what decision or question it supports). Then run the script and record the outcome in the journal.
- After each action: Suggest the most logical next step (one step), and let the user confirm or redirect. Do not auto-execute a long pipeline.
Phase 6: Scripts (disposable, PEP723, uv run)
- All Python used for this EDA lives in scripts under the session’s
scripts/folder. - Every script has PEP723 inline script metadata at the top (
# /// script,requires-python,dependencies,# ///). Run withuv run script.py(oruv run scripts/script_name.pywith CWD = session folder). Do not run rawpythonor paste code in a REPL; the script is the unit of execution and owns its environment. - Scripts are throwaway: they are for this session’s plots and summaries, not production. Paths in scripts are relative to the session folder (e.g.
../data/file.csvor as agreed).
Phase 7: Plots (WebP only for matplotlib)
- Save all matplotlib (and similar) figures as WebP, not PNG, to keep image sizes small. Use e.g.
fig.savefig("plots/overview.webp", format="webp"). - Write plot files into the session’s
plots/directory. Name files descriptively (e.g.distribution_response.webp,first_ten_records.webp). - Reference these plots in the journal when you record what was done.
When EDA is in a Marimo notebook
When the user conducts this EDA workflow in a Marimo notebook (instead of scripts in scripts/), follow the same phases above (context first, one step, journal, ask why). In addition:
- Markdown before and after code: For each code cell in the notebook, add markdown cells before and after that explain what the code does and what the results mean. The markdown before sets up intent; the markdown after summarizes or interprets the output.
See references/marimo-notebook-eda.md for the canonical convention.
Guardrails
- Context before data – Do not open or analyze the data until the problem context is stated and recorded in the session journal.
- One first step – Propose and agree on a single first plot or summary; do not generate a large block of code or many plots in one go.
- Ask why – When the user requests a specific plot or table, ask why (what question or decision it serves) before executing.
- Journal as memory – Read and append to the session’s
journal.md; record data shape and findings so the next step is informed. - Scripts only via uv run – No ad-hoc Python; every script has PEP723 metadata and is run with
uv run script.py. - WebP for plots – Use WebP for matplotlib (and similar) output; do not save as PNG by default.
- Suggest, don’t assume – After each action, suggest one logical next step and wait for the user to confirm or change direction.
- Marimo notebooks – When EDA is in a Marimo notebook, add markdown cells before and after each code cell to explain intent and results (see references/marimo-notebook-eda.md).
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核