For the scripts that turn a CSV export into a chart, a report or a cleaned file. Agents tend to write one-off notebooks that only run on their machine and silently drop half the rows. This loadout makes every script runnable with one command, keeps raw data untouched, and adds a sanity-check skill that looks for the classic data mistakes before results get shared.
What's in it
- Single-file scripts with PEP 723 inline dependencies, run with `uv run`
- Raw data is read-only; outputs go to their own folder
- Row counts and assumptions logged at each step, so silent data loss shows up
- Sanity-check skill: types, nulls, duplicates, ranges, join explosions, date and currency traps
You'll need
- Tools:
uv,python
Verification
| Check | Result | What we found |
|---|---|---|
| Listinglisting.yaml matches the schema and declares every file in the folder. | Pass | Schema valid; 5 files declared, none missing or extra
|
| Files parseJSON parses; SKILL.md and .mdc front matter is valid YAML with the fields each agent needs; code fences are closed. | Pass | All 5 files parse; front matter valid |
| AdaptersCLAUDE.md imports @AGENTS.md, GEMINI.md imports @./AGENTS.md, and both match the generator. | Pass | CLAUDE.md and GEMINI.md import AGENTS.md and are up to date
|
| Install pathsEvery file lands where each agent documents it, with no collisions, and the laid-out project is re-discovered correctly. | Pass | Correct paths for all 5 agents; layouts re-discovered
|
| MCP configmcp.json is structurally valid, converts to each agent's format, declares no literal secrets, and referenced packages exist on npm/PyPI. | Not applicable | No MCP servers in this loadout |
| Safety scanThe intake scanner finds no credentials, risky shell, hidden Unicode or prompt-injection wording, and the listing's network flag is honest. | Pass | Clean: no credentials, risky shell or hidden text
|
| ReferencesLinks and file paths between the loadout's files resolve, including for each agent's installed layout. | Pass | No cross-file references to check |
| Size limitsFile count and sizes are within the submission limits; SKILL.md bodies stay under 500 lines. | Pass | 5 files, 5.7 KB total; largest AGENTS.md 2.2 KB
|
| LicenceA recognised SPDX licence, with the licence text available. | Pass | MIT, by Agent Loadout; text in the repository LICENSE |
| Starter buildA minimal fixture project with the loadout applied installs and builds or type-checks, and the loadout's own code examples compile. | Pass | PEP 723 polars script in the loadout's layout runs with uv run on sample data, keeps raw data untouched, and is ruff check and ruff format clean
|
What this means: a script checked the files themselves: they parse, they install where each agent looks, any MCP config is sound, the safety scan is clean, references between files resolve, and, where a free and repeatable fixture exists, a small starter project builds with the loadout applied. No AI agent was run. Per-agent results ("tested with agent") are separate and stay untested until an agent actually runs.
Install
Choose your agent. Run the commands from your project root, or download a zip already laid out in the right folders.
Claude Code reads CLAUDE.md (imports AGENTS.md with @AGENTS.md) and skills from .claude/skills/.
curl -fsSL --create-dirs -o AGENTS.md https://loadout.jnw-it.com/raw/python-data-script/1.0.0/AGENTS.md curl -fsSL --create-dirs -o CLAUDE.md https://loadout.jnw-it.com/raw/python-data-script/1.0.0/CLAUDE.md curl -fsSL --create-dirs -o .claude/skills/data-sanity-check/SKILL.md https://loadout.jnw-it.com/raw/python-data-script/1.0.0/skills/data-sanity-check/SKILL.md
| File | Goes to |
|---|---|
AGENTS.md | AGENTS.md |
CLAUDE.md | CLAUDE.md |
skills/data-sanity-check/SKILL.md | .claude/skills/data-sanity-check/SKILL.md |
Already have an AGENTS.md or CLAUDE.md? The commands above overwrite it — download the file instead and merge the sections you want.
Codex CLI reads AGENTS.md and skills from .agents/skills/.
curl -fsSL --create-dirs -o AGENTS.md https://loadout.jnw-it.com/raw/python-data-script/1.0.0/AGENTS.md curl -fsSL --create-dirs -o .agents/skills/data-sanity-check/SKILL.md https://loadout.jnw-it.com/raw/python-data-script/1.0.0/skills/data-sanity-check/SKILL.md
| File | Goes to |
|---|---|
AGENTS.md | AGENTS.md |
skills/data-sanity-check/SKILL.md | .agents/skills/data-sanity-check/SKILL.md |
Already have an AGENTS.md or CLAUDE.md? The commands above overwrite it — download the file instead and merge the sections you want.
Cursor reads AGENTS.md + .cursor/rules/*.mdc and skills from .agents/skills/.
curl -fsSL --create-dirs -o AGENTS.md https://loadout.jnw-it.com/raw/python-data-script/1.0.0/AGENTS.md curl -fsSL --create-dirs -o .cursor/rules/python-scripts.mdc https://loadout.jnw-it.com/raw/python-data-script/1.0.0/.cursor/rules/python-scripts.mdc curl -fsSL --create-dirs -o .agents/skills/data-sanity-check/SKILL.md https://loadout.jnw-it.com/raw/python-data-script/1.0.0/skills/data-sanity-check/SKILL.md
| File | Goes to |
|---|---|
AGENTS.md | AGENTS.md |
.cursor/rules/python-scripts.mdc | .cursor/rules/python-scripts.mdc |
skills/data-sanity-check/SKILL.md | .agents/skills/data-sanity-check/SKILL.md |
Already have an AGENTS.md or CLAUDE.md? The commands above overwrite it — download the file instead and merge the sections you want.
Gemini CLI reads GEMINI.md (imports AGENTS.md with @./AGENTS.md) and skills from .agents/skills/.
curl -fsSL --create-dirs -o AGENTS.md https://loadout.jnw-it.com/raw/python-data-script/1.0.0/AGENTS.md curl -fsSL --create-dirs -o GEMINI.md https://loadout.jnw-it.com/raw/python-data-script/1.0.0/GEMINI.md curl -fsSL --create-dirs -o .agents/skills/data-sanity-check/SKILL.md https://loadout.jnw-it.com/raw/python-data-script/1.0.0/skills/data-sanity-check/SKILL.md
| File | Goes to |
|---|---|
AGENTS.md | AGENTS.md |
GEMINI.md | GEMINI.md |
skills/data-sanity-check/SKILL.md | .agents/skills/data-sanity-check/SKILL.md |
Already have an AGENTS.md or CLAUDE.md? The commands above overwrite it — download the file instead and merge the sections you want.
GitHub Copilot reads AGENTS.md and skills from .agents/skills/.
curl -fsSL --create-dirs -o AGENTS.md https://loadout.jnw-it.com/raw/python-data-script/1.0.0/AGENTS.md curl -fsSL --create-dirs -o .agents/skills/data-sanity-check/SKILL.md https://loadout.jnw-it.com/raw/python-data-script/1.0.0/skills/data-sanity-check/SKILL.md
| File | Goes to |
|---|---|
AGENTS.md | AGENTS.md |
skills/data-sanity-check/SKILL.md | .agents/skills/data-sanity-check/SKILL.md |
Already have an AGENTS.md or CLAUDE.md? The commands above overwrite it — download the file instead and merge the sections you want.
Files
Rules AGENTS.md Python data scripting rules. 43 lines
# AGENTS.md: Python data scripts
## Folders
```
data/raw/ inputs exactly as received — never modified, often git-ignored
data/interim/ intermediate files written by scripts
output/ final CSVs, charts, reports
scripts/ one script per job, numbered if they run in order: 01_clean.py, 02_report.py
```
## Every script is runnable with one command
- Use PEP 723 inline metadata so `uv run scripts/01_clean.py` installs what it needs:
```python
# /// script
# requires-python = ">=3.12"
# dependencies = ["polars>=1.0", "matplotlib"]
# ///
```
- Add dependencies with `uv add --script scripts/01_clean.py <package>` rather than editing by hand.
- Paths come from CLI arguments (`argparse`) with sensible defaults, built with `pathlib.Path`. No hard-coded absolute paths.
- Put the work in `main()` and end with `if __name__ == "__main__": main()`.
## Data handling
- Prefer **polars** for new scripts (fast, strict types); use pandas if the project already does.
- Read with explicit types for IDs, postcodes and phone numbers (strings, so leading zeros survive) and explicit date parsing.
- Never overwrite files in `data/raw/`. Write outputs to new files.
- After each major step (load, filter, join, dedupe), log the row count. A join that changes the row count unexpectedly is a bug until proven otherwise.
- State assumptions in code comments next to the line that makes them ("drops refunds: amount < 0").
- Money: keep as integer pence/cents or `Decimal`, not floats, when sums must reconcile.
- Dates: be explicit about time zones and day-first formats (UK data is usually DD/MM/YYYY).
## Output
- Print a short summary at the end: rows in, rows out, files written.
- Charts: label axes with units, title says what the chart shows, save as PNG and SVG to `output/`.
- Do not print or commit personal data. If the data contains names, emails or addresses, keep outputs aggregated unless asked otherwise.
## Style
- Type hints on functions. Small functions per step (`load`, `clean`, `summarise`), each returning a dataframe.
- `ruff format` and `ruff check` clean (`uvx ruff check .`).
## Before you say "done"
Run the script end to end on the real input (or a sample), show the summary output, and mention any rows dropped and why. Adapter CLAUDE.md Imports AGENTS.md for Claude Code. 10 lines
# CLAUDE.md
@AGENTS.md
## Claude Code notes
- Skills from this loadout live in `.claude/skills/`: `data-sanity-check`. Use them when their description matches the task.
- Follow AGENTS.md above; where this file and AGENTS.md disagree, AGENTS.md wins.
<!-- From the Agent Loadout "Python data script" v1.0.0 — https://loadout.jnw-it.com/loadouts/python-data-script/ --> Adapter GEMINI.md Imports AGENTS.md for Gemini CLI. 10 lines
# GEMINI.md
@./AGENTS.md
## Gemini CLI notes
- Skills from this loadout live in `.agents/skills/`: `data-sanity-check`. Use them when their description matches the task.
- Follow AGENTS.md above; where this file and AGENTS.md disagree, AGENTS.md wins.
<!-- From the Agent Loadout "Python data script" v1.0.0 — https://loadout.jnw-it.com/loadouts/python-data-script/ --> Cursor rule .cursor/rules/python-scripts.mdc Rule applied to Python files. 14 lines
---
description: Python data script conventions
globs: "**/*.py"
alwaysApply: false
---
- Scripts start with a PEP 723 `# /// script` block listing `requires-python` and `dependencies`; run them with `uv run`.
- `pathlib.Path` for paths, `argparse` for inputs, `main()` guarded by `if __name__ == "__main__":`.
- Never write into `data/raw/`.
- Log row counts after loads, filters, joins and dedupes.
- Read identifier-like columns (IDs, postcodes, phone numbers) as strings.
- No bare `except:`; catch specific exceptions and re-raise with context.
- Type hints on every function signature. Skill skills/data-sanity-check/SKILL.md Profiles a dataset and flags data quality problems. 38 lines
---
name: data-sanity-check
description: Profile a dataset (CSV, Excel, Parquet, JSON) and flag quality problems before analysis. Use when the user shares a data file, asks "is this data OK?", or before producing figures someone will rely on.
---
# Data sanity check
Write a throwaway script `scripts/00_sanity_check.py` (PEP 723, polars) that reads the file and prints the checks below.
Do not modify the input file.
## Checks
1. **Shape:** row and column count. Does it match what the human expects (ask if they know)?
2. **Types:** each column's inferred type. Flag numbers stored as text (e.g. "1,234", "£12.50"), dates stored as text,
and IDs inferred as numbers (leading zeros lost).
3. **Nulls:** null count and percentage per column. Flag columns over 5% null and "null-like" strings: `""`, `"N/A"`, `"null"`, `"-"`, `"0"` in date columns.
4. **Duplicates:** fully duplicated rows, and duplicates on the column that should be a unique key.
5. **Ranges:** min/max for numbers and dates. Flag negatives where impossible, dates in the future or before 1990, outliers beyond 3 IQR.
6. **Categories:** for text columns with fewer than 50 distinct values, list the values with counts. Flag near-duplicates
(`"London"`, `"london"`, `"London "`).
7. **Dates:** check whether day-first or month-first parsing is ambiguous (all days ≤ 12?). Note time zone assumptions.
8. **Joins (if a second file is involved):** key overlap in both directions, and whether the join is one-to-one,
one-to-many or many-to-many. Many-to-many is almost always a mistake.
9. **Totals:** if there is an amount column, print the grand total so the human can reconcile it with the source system.
10. **Personal data:** flag columns that look like names, emails, phone numbers or addresses.
## Report
```
Sanity check — <file> — <rows> rows × <cols> columns
Problems
- [High] customer_id inferred as integer — 214 IDs had leading zeros. Read as string.
- [Medium] order_date: 3.1% null; 12 dates in 2031.
Looks fine
- No duplicate rows; amounts total £48,210.55.
Questions for you
- Is order_date day-first? Every day value is ≤ 12, so it's ambiguous.
```
Lead with problems, keep "looks fine" to a line or two, and end with questions only the human can answer. All files: source zip · Licence MIT · By Agent Loadout · First listed
Installing and testing
How do I install Python data script in Claude Code?
From your project root, put AGENTS.md, CLAUDE.md, skills/data-sanity-check/SKILL.md at .claude/skills/data-sanity-check/SKILL.md. The "Claude Code" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/python-data-script/claude-code.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.
How do I install Python data script in Codex CLI?
From your project root, put AGENTS.md, skills/data-sanity-check/SKILL.md at .agents/skills/data-sanity-check/SKILL.md. The "Codex CLI" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/python-data-script/codex.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.
How do I install Python data script in Cursor?
From your project root, put AGENTS.md, .cursor/rules/python-scripts.mdc, skills/data-sanity-check/SKILL.md at .agents/skills/data-sanity-check/SKILL.md. The "Cursor" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/python-data-script/cursor.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.
How do I install Python data script in Gemini CLI?
From your project root, put AGENTS.md, GEMINI.md, skills/data-sanity-check/SKILL.md at .agents/skills/data-sanity-check/SKILL.md. The "Gemini CLI" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/python-data-script/gemini-cli.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.
How do I install Python data script in GitHub Copilot?
From your project root, put AGENTS.md, skills/data-sanity-check/SKILL.md at .agents/skills/data-sanity-check/SKILL.md. The "GitHub Copilot" tab on this page has the curl commands, or download https://loadout.jnw-it.com/download/python-data-script/copilot.zip, which is already laid out. Do not overwrite an existing AGENTS.md or CLAUDE.md; merge it.
Has Python data script been tested?
It passed the Level 1 automated install checks on 2026-10-16: the files parse, install to each agent's documented paths, and pass the safety scan. No AI agent has run it yet, so no agent pass or fail is claimed.
More for Claude Code, Codex, Cursor, Gemini CLI and GitHub Copilot.