Coding agents write plausible data code, and the failures are quiet: a join that doubles revenue, nulls filled with zero, a job that duplicates rows on rerun, a 4 MB notebook read into context. These instruction files stop those mistakes with specific rules, and they cover the Polars 2.0 and pandas 3.0 changes.
What You Get
- Five CLAUDE.md templates. Analytics repo, ETL repo, notebook-heavy repo, dbt plus DuckDB, and a Polars 2.0 migration mode, each with verified commands, layout, hard rules and a change procedure.
- Six rules files. Data quality, SQL style, pandas 3.0, Polars 2.0, notebooks and pipeline safety, with path-scoped frontmatter so they load only when Claude reads matching files.
- Data-quality checklist. Nine sections from grain and keys to reconciliation, plus four SQL checks you can paste into a test file.
- Notebook output stripper. A standard-library script that strips outputs, checks a folder for outputs in CI, and prints a text summary of a notebook that is safe to read.
- Two Claude Code hooks. A PostToolUse hook that strips outputs after every notebook edit, and a PreToolUse guard that refuses to read a notebook inflated by outputs and points to the summary.
- Settings and pre-commit examples. A ready settings.json block for the hooks and a pre-commit entry for teammates who do not use Claude Code.
- 12 automated tests. Cover stripping, summaries, the check mode, both hooks and the settings file.
- Install guide. Five minutes of setup, how path-scoped rules and @ imports work, and a three-step verification.
How to Use
- Pick the template that matches your repo and copy it to the root as CLAUDE.md.
- Replace every <> slot and run each command in the Commands block once.
- Copy the rules you need into .claude/rules/ and delete the ones for libraries you do not use.
- If you work in notebooks, copy the three hook scripts and merge the settings block.
- Run python3 -m pytest hooks/tests -q and try the three checks in the install guide.
- Add a rule only after a real mistake, with its reason, and review the files monthly.
Who This Is For
- Data engineers and analytics engineers using Claude Code on pipelines and dbt projects.
- Data scientists whose repositories are mostly notebooks.
- Teams migrating from Polars 1.x to 2.0 or from pandas 2 to 3.
- Leads who want agents to reconcile numbers and test joins by default.
Each template is under 520 words, so it costs little context on every turn. Browse more in the Claude Code configs collection, or try browse all products.