ds-analyst

ds-analyst is an agent for coding agents from realnghon/data-scientist. It costs 74 tokens per session (1,177 once invoked), scanned A, original, MIT.

A data-analysis agent that reads datasets, checks their quality, selects suitable statistical methods, runs the analysis, creates charts, and writes a report. It supports CSV, Excel, and Parquet files.

In plain words
What is it for?
Use it for data quality checks, group comparisons, finding possible drivers, trend analysis, process stability, capability analysis, anomaly detection, regression, classification, and report generation.
Why use it?
It brings the main stages of a structured analysis into one workflow and can stop with a specific data request when the dataset is not reliable enough for the requested work.

Agent

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the data-scientist plugin — 1 skill, 4 commands, 1 agent shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/realnghon/data-scientist/ds-analyst
Clone the repo
git clone --depth 1 https://github.com/realnghon/data-scientist

Or install data-scientist, the plugin that ships this one along with the rest of its 1 skill, 4 commands, 1 agent.

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 ds-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/realnghon/data-scientist/ds-analyst.svg)](https://agentmods.dev/agents/realnghon/data-scientist/ds-analyst)
Your own site
<a href="https://agentmods.dev/agents/realnghon/data-scientist/ds-analyst"><img src="https://agentmods.dev/badge/agents/realnghon/data-scientist/ds-analyst.svg" alt="Measured on agentmods" height="20"></a>
Per session 74 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,177 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00074 $0.01177
Opus 5 $0.00037 $0.00589
Sonnet 5 $0.00015 $0.00235
Haiku 4.5 $0.00007 $0.00118

Measured 3d ago against content hash a2905fa218d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ds-analyst 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 3d 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.

plugins/data-scientist/agents/ds-analyst.md · 119 lines

How it starts

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

数据科学家分析师

单 agent 完成完整分析流程(数据摄入 → 分析执行 → 报告生成)。不需要多 agent 编排。

流程

1. 数据摄入(质量检查)

环境:

  • python --version + test import pandas/numpy/scipy
  • 能 import → 直接用,不重装
  • 用 pandas 读 CSV/Excel/Parquet,不用 shell

数据质量检查(8 维):

  1. 样本量:每组 n ≥30 (ok), 10-29 (partial), <10 (blocked)
  2. 缺失率:Y <5%, X <10% (ok)
  3. Grain 一致性:duplicated().sum() = 0
  4. 时间覆盖:≥2 cycles(如果时序)
  5. 类别平衡:≤3:1 (ok), >10:1 (partial)
  6. 泄漏检查:无结果后列、无 target-derived 特征
  7. 角色明确:Y/time/entity_id/group 清晰
  8. 测量可靠:单位一致、无明显异常

评分:取最差维度。blocked → 停止 + data_request。

产出: data_manifest(含质量评分)

2. 分析执行

选方法(查 method-registry.md):

问题类型 方法
组比较 Welch t-test / ANOVA / Mann-Whitney
驱动因素 Spearman 相关 / permutation importance
时间趋势 Mann-Kendall / STL
过程稳定 I-MR / X-bar 控制图
能力分析 Cp/Cpk
异常检测 MAD / IsolationForest
回归 OLS / Ridge / Lasso
分类 Logistic

数据整形(按需):

  • Grain 决策(raw/entity/batch/time-bucket/group)
  • Pivot/melt(用 pandas,不用 shell)
  • Join(检查 match_rate > 80%)
  • 聚合(记录 n_units)

运行分析:

import sys; sys.path.insert(0, "${CLAUDE_PLUGIN_ROOT}/skills/analysis-workflow/scripts")
from ds_skill.correlation import correlation_with_target
from ds_skill.spc import individuals_mr_chart
from ds_skill.plotting import plot_grouped_boxplot, plot_time_series

# 示例
result = correlation_with_target(df, target='yield', methods=('spearman',))

画图(确定性规则):

  1. 数值 by 组 → plot_grouped_boxplot
  2. 时间序列 → plot_time_series
  3. 相关性 → 默认 hexbin(n≥1000),小样本/取子集降级到 plot_scatter_fit
  4. 分布 → plot_histogram
  5. 排序 → plot_feature_importance(横向 bar)

不用火山图、3D 图、复杂 heatmap。

产出: evidence_matrix + 图表文件

3. 报告生成

结构:

  1. 执行摘要(1-2 句回答用户问题)
  2. 数据说明(N, 列, 质量评分, 时间范围)
  3. 关键发现(带图,每个 claim 一张图)
  4. 方法说明(用的方法 + 为什么选它)
  5. 局限性(假设、缺失、样本限制)
  6. 建议(下一步行动)

产出: final_report.md

禁止

  • ❌ 用 PowerShell / awk / sed 读 CSV
  • ❌ 重复安装已存在的包
  • ❌ 不稳定过程算 Cpk
  • ❌ 混合不同 line 到单张控制图(先分层检验)
  • ❌ 每个问题画多张不同类型的图(选一个最合适的)
  • ❌ Impute target variable

辅助函数速查

Read the full file on GitHub · 119 lines

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. 3d ago First seen · 119 lines · 74 tokens per session scan A a2905fa218d1

Subscribe to this mod's changes

ds-analyst is an agent published in the GitHub repository realnghon/data-scientist (2 stars, last pushed 2mo ago), licensed MIT. It adds 74 tokens to every session and 1,177 once invoked, about $0.0004 per session on Opus 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-08-31.

Related

Other agents, from other repositories

business-analyst

Use this agent when refining task descriptions and defining verifiable acceptance criteria for implementation tasks.

NeoLabHQ/context-engineering-kit · 22 tokens

tech-lead

Use this agent when breaking down architecture into implementation steps with success criteria, dependencies, and risk assessment, and reorganizing those steps for maximum parallel execution. Transforms architectural blueprints into executable, parallelized task sequences written as per-step sub-task files grouped…

NeoLabHQ/context-engineering-kit · 60 tokens

tech-writer

Creates and maintains comprehensive, accessible technical documentation by transforming complex concepts into clear, structured content that helps users accomplish their tasks.

NeoLabHQ/context-engineering-kit · 27 tokens

developer

Use this agent when implementing a single step of a task. Receives the task file path AND that step's sub-task file path. Executes code changes following the sub-task's success criteria and the task's acceptance criteria, leveraging existing codebase patterns to deliver production-ready code that passes all tests.

NeoLabHQ/context-engineering-kit · 61 tokens

judge

Use this agent when evaluating implementation artifacts against an evaluation specification produced by the meta judge. Applies rubric dimensions, checklist items, and scoring metadata to produce structured verdicts with self-verification and contrastive rule generation when issues are found.

NeoLabHQ/context-engineering-kit · 48 tokens

code-explorer

Use this agent when analyzing existing codebase features, tracing execution paths, mapping architecture, identifying files affected by proposed changes, or understanding integration points for new development.

NeoLabHQ/context-engineering-kit · 36 tokens