toolhq.io

skills / research and data

analyze-a-dataset

Check the data before trusting any number it produces, because most wrong analyses are correct arithmetic on misunderstood rows.

SKILL.md

Save as .claude/skills/analyze-a-dataset/SKILL.md in a repository, or under ~/.claude/skills/analyze-a-dataset/SKILL.md to have it everywhere. The copy button takes the whole file, frontmatter included.

---
name: analyze-a-dataset
description: Analyse a dataset and report findings that survive scrutiny, checking the data before trusting any number it produces. Use when asked to analyse data, explain a metric change, find patterns, summarise a spreadsheet or export, or answer a question from a table.
---

# Analyse a dataset

Most wrong analyses are not wrong arithmetic. They are correct arithmetic on
data that did not mean what the analyst assumed.

Look at the data before answering questions with it.

## 1. Understand the data before using it

Do not skip this even when the question seems simple.

- How many rows, and over what period. A partial final period makes the last
  point look like a crash.
- What is one row. "One order" and "one order line" give different totals, and
  nothing in the file will tell you which it is.
- Which columns have missing values, and how many. Distinguish absent from
  zero from empty string, because they mean different things and sum
  differently.
- Duplicates. Check whether the identifier is actually unique before grouping
  by it.
- Types: numbers stored as text, dates in mixed formats, booleans as "Y" and
  "yes" and 1.
- Range: the minimum and maximum of every numeric column. Impossible values
  surface here, such as negative quantities and dates in 1970.

Report anything surprising before you report results. A caveat found after the
conclusion rarely catches up with it.

## 2. Answer the question that was asked

Restate it as something computable. "Are sales up" becomes "is the sum of
order value in the last 30 days greater than the 30 days before".

If the question cannot be answered with this data, say so and say what is
missing. Answering a nearby question instead, without flagging it, is a
common and serious failure.

## 3. Rules for the numbers

- **Say the denominator.** A percentage without its base is not information.
  "40% growth" from 5 to 7 is a different claim from 5,000 to 7,000.
- **Give the count with the rate.** A 100% conversion rate on two visitors is
  noise.
- **Do not report more precision than the data supports.** 23.4%, not
  23.41729%.
- **Check whether a difference could be noise** before describing it as a
  change. With small numbers, most movement is.
- **Watch for the composition effect.** A total can move because the mix
  changed, not because anything within it did. Break the total down before
  explaining it.
- **Correlation is not cause**, and seasonality explains more apparent trends
  than anything else. Compare like periods.

## 4. Outliers and exclusions

Investigate outliers, do not delete them silently. One account with a thousand
times the usual volume is either an error, a bot, or your largest customer, and
the three call for different handling.

Every exclusion gets stated in the output, with its effect on the result.

## 5. Sanity check before reporting

- Do the parts sum to the whole.
- Does the magnitude make sense against something you already know.
- Would the opposite conclusion also be consistent with this data.

If a result is surprising, assume a data problem first and check it. Surprising
findings are usually joins.

## Report back

1. The answer, with the numbers that support it.
2. The denominators and the sample sizes.
3. Data quality problems found, and what you did about them.
4. Exclusions, and their effect.
5. What this does not tell you, and what would.

what it needs

Nothing. This skill is instructions only, so it works in any agent that reads SKILL.md with nothing installed and no account. Save the file and it is live in the next session.

the instructions, in full

Analyse a dataset

Most wrong analyses are not wrong arithmetic. They are correct arithmetic on data that did not mean what the analyst assumed.

Look at the data before answering questions with it.

1. Understand the data before using it

Do not skip this even when the question seems simple.

Report anything surprising before you report results. A caveat found after the conclusion rarely catches up with it.

2. Answer the question that was asked

Restate it as something computable. "Are sales up" becomes "is the sum of order value in the last 30 days greater than the 30 days before".

If the question cannot be answered with this data, say so and say what is missing. Answering a nearby question instead, without flagging it, is a common and serious failure.

3. Rules for the numbers

4. Outliers and exclusions

Investigate outliers, do not delete them silently. One account with a thousand times the usual volume is either an error, a bot, or your largest customer, and the three call for different handling.

Every exclusion gets stated in the output, with its effect on the result.

5. Sanity check before reporting

If a result is surprising, assume a data problem first and check it. Surprising findings are usually joins.

Report back

  1. The answer, with the numbers that support it.
  2. The denominators and the sample sizes.
  3. Data quality problems found, and what you did about them.
  4. Exclusions, and their effect.
  5. What this does not tell you, and what would.

check its answers by hand

A skill that reasons well about wrong data is still wrong. For the first few cases, run the same question through a tool that cannot be mistaken.

JSON ↔ CSV Converter

Convert JSON to CSV and CSV to JSON, with quoted fields and nested values handled.

Open the tool
Text Statistics & Word Counter

Count characters, words, sentences, and paragraphs, with reading time and word frequency.

Open the tool