TraeSkill: Skill for Claude Code

.trae/Skills/03_Data_Analysis/SKILL.md

data-analysis-expert is a skill for Claude Code from boshi-xixixi/TraeSkill. It costs 117 tokens per session (2,423 once invoked), scanned A, original, MIT.

A practical guide to analysing data with Python tools such as pandas, from checking and cleaning a file to exploring patterns, choosing charts, and writing conclusions. It also explains common statistical mistakes.

In plain words
What is it for?
Use it to inspect Excel or other tabular data, clean and validate columns, explore distributions and relationships, select suitable charts, and write reproducible analysis findings.
Why use it?
It gives you a reliable order of operations so messy data, duplicate counts, missing values, and misleading averages are less likely to produce unsupported conclusions.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

This is boshi-xixixi/TraeSkill's own configuration. It tells Claude Code how to work on TraeSkill itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything TraeSkill configures →

Reuse

Borrowing it

Nothing to install: this file belongs to boshi-xixixi/TraeSkill. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/boshi-xixixi/TraeSkill/main/.trae/Skills/03_Data_Analysis/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/boshi-xixixi/TraeSkill

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for data-analysis-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/boshi-xixixi/traeskill/03_data_analysis/github.svg)](https://agentmods.dev/skills/boshi-xixixi/traeskill/03_data_analysis)
Your own site
<a href="https://agentmods.dev/skills/boshi-xixixi/traeskill/03_data_analysis"><img src="https://agentmods.dev/badge/skills/boshi-xixixi/traeskill/03_data_analysis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for data-analysis-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/boshi-xixixi/traeskill/03_data_analysis"><img src="https://agentmods.dev/badge/skills/boshi-xixixi/traeskill/03_data_analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,423 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00117 $0.02423
Opus 5.5 $0.00047 $0.00969
Sonnet 5.5 $0.00023 $0.00485
Haiku 4.5 $0.00012 $0.00242

Measured 8d ago against content hash 3eedfbe85d69, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

data-analysis-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.trae/Skills/03_Data_Analysis/SKILL.md · 145 lines

How it starts

The opening of the file, as written. The whole thing — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.

数据分析与可视化

数据分析的产出不是代码,是一个能站得住的结论。代码只是中间产物。

一、拿到数据的前 10 分钟

不要立刻 df.head() 然后开始写图。按这个顺序过一遍:

df.shape                    # 多少行多少列
df.dtypes                   # 每列什么类型
df.isna().sum()             # 缺失分布,不看总数看分布
df.duplicated().sum()       # 重复行
df.describe(include='all')  # 数值看分布,类别看频次

然后回答三个问题:

  1. 一行代表什么?(订单?用户?用户-天?)——粒度错,后面全错
  2. 主键是什么? 有没有重复计数
  3. 哪几列是算出来的?(如 GMV = 数量 × 单价)——别把派生列当独立变量

二、清洗顺序

顺序错了会白干,按这个来:

  1. 类型修正:数字被读成字符串("1,234")、日期被读成 object
  2. 去重:先确认口径再删,宁可标记不删
  3. 缺失处理:先分类,再决定
    • 真缺失(没采集到)→ 删除或插补
    • 逻辑不适用(未婚者的配偶姓名)→ 保留为空,不要填 0
  4. 异常值:先看是否真实(大客户、促销日),不要无脑 3σ
  5. 口径统一:时间区间、货币单位、区域编码
  6. 派生列:计算列要有清晰命名和注释

清洗必须留痕:删了多少行、为什么删,写进注释或输出日志。否则结论无法复现。

三、EDA 检查清单

  • 单变量:数值看分布形状(直方图 + 分位数),类别看长尾(value_counts() 前 20)
  • 双变量:连续 × 连续看散点,连续 × 类别看分组箱线,类别 × 类别看交叉表
  • 时间:先看趋势再看周期,注意口径变化(改版、活动、数据源切换)造成的断点
  • 分组:任何"平均值"都问一句"分群之后还成立吗"(辛普森悖论)

四、图表选型

想表达 用什么 不要用
随时间变化 折线 饼图、3D 柱
类别比较 条形(横向,按值排序) 饼图(超过 4 类)
分布 直方图、箱线、小提琴 只有均值
两个变量关系 散点 + 趋势线 双 Y 轴折线
构成 堆叠条形、百分比堆叠 饼图超过 5 块
相关矩阵 热力图 3D 曲面

通用规则:

  • 纵轴从 0 开始(折线可例外,但要在图注里说明)
  • 颜色不要超过 6 种,且不要只靠颜色区分(考虑色盲)
  • 标题写结论,不写"图 1 销售额变化",写"Q3 销售额环比下降 12%"
  • 中文图表记得设置字体,否则方块乱码

五、常见统计陷阱

陷阱 表现 怎么破
辛普森悖论 整体趋势和分群趋势相反 拆开看每一群
幸存者偏差 只统计留下来的样本 问"没进来的去哪了"
均值欺骗 收入均值被少数极端值拉高 同时给中位数和分位数
相关当因果 "A 涨 B 也涨,所以 A 导致 B" 找反例,找第三变量
口径漂移 前后期统计标准不同 对齐口径再比较
小样本 3 个用户说好就下结论 给出样本量和置信区间

六、输出结构

分析结论按这个骨架写,比堆图有用:

  1. 一句话结论(先说结果)
  2. 数据范围:时间、来源、样本量、已知局限
  3. 关键发现:3 条以内,每条配一张图
  4. 反直觉的点:如果有,单独拎出来
  5. 建议动作:可执行、有优先级
  6. 不确定的地方:明确标注是推测不是结论

七、性能与工程

  • 大文件用 pd.read_csv(..., chunksize=) 或 dtype 指定类型
  • 避免 df.apply 逐行,优先向量化
  • 反复用的中间结果存 parquet,不要每次重算
  • 分析脚本要能被别人重跑:固定随机种子,路径用变量

八、写作要求

  • 数字带单位和口径("客单价 128 元(含运费)"而不是"128")
  • 百分比变化说清基数("增长 200%" 和 "从 1 到 3" 差很远)
  • 不写"显著",除非真的做了显著性检验
  • 图表必须能被单独看懂:标题、坐标轴、单位、数据来源

九、对账与校验

结论交出去之前,按这个顺序过一遍。核心原则:机器判事实,人判品味——行数守恒、总和守恒、图有没有出框,这些能自动验;这个分析有没有意义,只能人来判。

Read the full file on GitHub · 145 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 145 lines · 117 tokens per session scan A 3eedfbe85d69

Subscribe to this mod's changes

data-analysis-expert is a skill published in the GitHub repository boshi-xixixi/TraeSkill (288 stars, last pushed 9d ago), licensed MIT. It adds 117 tokens to every session and 2,423 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-22.

Related

data-analysis-expert compared with skills from other repositories

data-analysis-expert next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
data-analysis-expertboshi-xixixi/TraeSkillSkill2889d agoMITA117Claude Code
azure-data-factoryMicrosoftDocs/Agent-SkillsSkill82421d agoCC-BY-4.0A131Claude Code
azure-databricksMicrosoftDocs/Agent-SkillsSkill82421d agoCC-BY-4.0A122Claude Code
azure-machine-learningMicrosoftDocs/Agent-SkillsSkill82421d agoCC-BY-4.0A128Claude Code
azure-hdinsightMicrosoftDocs/Agent-SkillsSkill82421d agoCC-BY-4.0A119Claude Code
azure-synapse-analyticsMicrosoftDocs/Agent-SkillsSkill82421d agoCC-BY-4.0A128Claude Code
azure-cognitive-searchMicrosoftDocs/Agent-SkillsSkill82421d agoCC-BY-4.0A123Claude Code