data-analysis

A workflow for answering questions about data, from simple metric lookups to investigations and reports. It includes steps for understanding the question, checking available data, querying only what is needed, and validating results.

In plain words
What is it for?
Use it to investigate trends, compare groups, check anomalies and data quality, retrieve metrics, write SQL-based analyses, and prepare concise stakeholder reports.
Why use it?
It reduces errors caused by unclear metric definitions, querying the wrong data, or presenting unverified results.

Skill for Claude CodeCodex

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 skills/datagallery-ai/dataagent/data-analysis
Any agent
npx skills add datagallery-ai/dataagent --skill data-analysis
Clone the repo
git clone --depth 1 https://github.com/datagallery-ai/dataagent

Made for: Claude Code, Codex.

Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 902 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.00019 $0.00902
Opus 5 $0.00010 $0.00451
Sonnet 5 $0.00004 $0.00180
Haiku 4.5 $0.00002 $0.00090

Measured yesterday against content hash 66aff698592e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

data-analysis 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 yesterday.

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.

packages/skills/builtin/data-analysis/SKILL.md · 121 lines

How it starts

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

Data Analysis

Use this skill for natural-language data questions, including metric lookups, trend investigations, segment comparisons, anomaly checks, quality reviews, and short reports.

Chinese search aliases: 数据分析, 查数, 指标查询, 报表, SQL 分析, 趋势分析, 维度, 度量, 异常检查, 数据质量.

This workflow is adapted for this workbench from public data-analysis skill patterns:

  • Classify the user's request before querying.
  • When a knowledge base is enabled for the run, call retrieve_knowledge first for definitions, prior findings, or document-backed facts before guessing or writing SQL.
  • Explore schema before SQL.
  • Retrieve only the data needed for the current question.
  • Validate results before presenting them.
  • Match the output to the user's requested level of detail.

Workflow

1. Understand The Question

Classify the task:

  • Quick answer: one metric, a simple filter, or a factual lookup.
  • Full analysis: trends, drivers, comparisons, segmentation, or anomalies.
  • Report: a structured write-up with method, findings, caveats, and recommendations.

Identify the needed datasource, tables, metrics, dimensions, filters, time range, and output format. If a required business definition is missing, state the assumption or ask only when guessing would materially change the answer.

2. Explore Before Querying

Always inspect the relevant datasource before writing SQL unless a valid schema token is already available in the current run.

Use progressive disclosure:

  • Start broad with datasource and schema discovery.
  • Narrow to candidate tables and columns.
  • Inspect only the specific tables needed for the query.
  • Use preview_table sparingly to understand shape, examples, nulls, or category values.

Do not dump broad schemas into the answer. Keep schema exploration focused on the user's task.

3. Query Read-Only Data

Write precise SELECT or WITH SQL through run_sql_readonly.

Use exact inspected table and column names. If a query fails, inspect the schema or simplify the query before retrying. Do not guess alternate names blindly.

Read the full file on GitHub · 121 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. yesterday First seen · 121 lines · 19 tokens per session scan A 66aff698592e

Subscribe to this mod's changes

data-analysis is a skill published in the GitHub repository datagallery-ai/dataagent (743 stars, last pushed 3d ago), licensed Apache-2.0. It adds 19 tokens to every session and 902 once invoked, about $0.0001 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-30.