Skip to content
Back to skills

Data Analysis

ASecurity

Profile and aggregate a bundled sales dataset - group revenue by region, category, channel or month, apply filters, and compute sums, means, medians and ranges. Use for questions about sales figures, trends, or which segments perform best.

  • 376 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 4, 2026
ai-agentsgo

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 4, 2026

npx -y skills add DougTrajano/pydantic-ai-skills --skill data-analysis --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Data Analysis?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Data Analysis
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dougtrajano-data-analysis/badge)](https://www.skillsdirectory.com/skills/dougtrajano-data-analysis)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: data-analysis
description: Profile and aggregate a bundled sales dataset - group revenue by region, category, channel or month, apply filters, and compute sums, means, medians and ranges. Use for questions about sales figures, trends, or which segments perform best.
compatibility: Standard library only, no network - runs unchanged on the host or inside a sandbox executor
---

# Data Analysis Skill

Answers questions about a bundled sales dataset (`resources/sales.csv`): 96 rows
covering six months, four regions, four product categories and three sales
channels.

This is the reference skill for exercising sandbox executors. Both scripts are
standard library only and read their data from the skill folder, so they do real
work with no network, no third-party packages and no host access — exactly the
shape a sandbox is meant to run.

## When to Use This Skill

- "Which region had the highest revenue?" → `aggregate`
- "What were average units sold per category?" → `aggregate`
- "How many rows are in the dataset and what does revenue look like?" → `profile_dataset`
- "Compare online versus retail sales in the north" → `aggregate` with filters

## Skill Scripts

### profile_dataset

Reports dataset shape, column names, summary statistics for every numeric column
(count, sum, mean, median, stdev, min, max) and distinct-value counts for the
categorical ones.

- `column` (optional): Profile a single numeric column instead of all of them

Exits 2 for an unknown column.

### aggregate

Groups rows and aggregates a numeric column, optionally filtered and truncated.

- `group-by` (required): Column to group by — `month`, `region`, `category`, `channel`
- `metric` (optional): Numeric column to aggregate, default `revenue`
- `agg` (optional): `sum` (default), `mean`, `median`, `min`, `max`, `count`
- `where` (optional, repeatable): Filter as `column=value`, e.g. `region=north`
- `top` (optional): Keep only the highest N groups

Exits 2 for an unknown column or malformed filter, 1 when no rows match.

### Usage Examples

**Revenue by region, highest first:**

- group-by: region

**Top 3 categories by units sold, online only:**

- group-by: category
- metric: units
- agg: sum
- where: channel=online
- top: 3

**Average revenue per month in the west:**

- group-by: month
- agg: mean
- where: region=west

## Data Source

`resources/sales.csv` is generated sample data, included so the skill is
self-contained and deterministic. It is not real sales data.

## Sandbox Behaviour

Both scripts produce byte-identical output on the host and under
`LocalSandboxScriptExecutor` or `OpenSandboxScriptExecutor`, including the
`../resources/sales.csv` read through the skill root and non-zero exit codes for
bad arguments. That equivalence is the point: swapping the executor changes where
the script runs, not what the model sees.

Files in this skill

  • SKILL.md2.8 KB
  • resources/sales.csv4.9 KB
  • scripts/aggregate.py3.7 KB
  • scripts/profile_dataset.py2.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.