data-science

data-science is a cursor rule for Cursor from inboxpraveen/Minimize-Cursor-Cost. It costs 0 tokens per session (526 once invoked), scanned A, original, Apache-2.0.

A set of rules for data science, machine-learning, and Jupyter notebook work. Jupyter notebooks combine code, results, charts, and notes in one document.

In plain words
What is it for?
Use it when inspecting DataFrames, editing notebook cells, reviewing errors, choosing a machine-learning framework, or managing model experiments.
Why use it?
It reduces unnecessary notebook output that can make work harder to review and consume excessive context, such as full tables, plots, and long error messages.

Cursor rule for Cursor

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 rules/inboxpraveen/minimize-cursor-cost/data-science
Clone the repo
git clone --depth 1 https://github.com/inboxpraveen/Minimize-Cursor-Cost

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for data-science

README.md
[![agentmods](https://agentmods.dev/badge/rules/inboxpraveen/minimize-cursor-cost/data-science.svg)](https://agentmods.dev/rules/inboxpraveen/minimize-cursor-cost/data-science)
Your own site
<a href="https://agentmods.dev/rules/inboxpraveen/minimize-cursor-cost/data-science"><img src="https://agentmods.dev/badge/rules/inboxpraveen/minimize-cursor-cost/data-science.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 526 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.00000 $0.00526
Opus 5 $0.00000 $0.00263
Sonnet 5 $0.00000 $0.00105
Haiku 4.5 $0.00000 $0.00053

Measured 4d ago against content hash 614ffb3ad366, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

data-science 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 4d ago.

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.

lean-cursor/.cursor/rules/data-science.mdc · 49 lines

How it starts

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

Data Science / Notebook Rules

Notebook outputs are the single biggest hidden token cost in DS work — printed DataFrames, plot bytes, and stack traces all flood context.

Cell output discipline

  • After running a cell that produces large output, suggest clearing it before next prompt: print only df.shape, df.head(3), or df.dtypes.
  • For plots: confirm visually, then suggest plt.close() and remove the inline image from the next prompt.
  • Don't paste tracebacks longer than 30 lines — paste the final exception line and the most recent frame in your code.

DataFrame work

  • Use .head(n) / .sample(n) for inspection, never full prints.
  • Don't print(df) on a DataFrame larger than 50 rows.
  • Show schema with df.dtypes or df.info() rather than the data itself.
  • For a transformation: show the chain (df.groupby(...).agg(...)) without printing intermediate results.

Code cell output

  • Edit single cells in place; don't regenerate the whole notebook.
  • Use # ... cell unchanged between edits.
  • Don't add markdown cells unless asked.

Modeling

  • Match existing framework: scikit-learn / PyTorch / TensorFlow / JAX. Don't switch.
  • Don't introduce a new experiment-tracking tool (W&B, MLflow) if not present.
  • Don't add hyperparameter sweeps unless asked.
  • Don't print(model) for large models — show only the layer/parameter being changed.

Reproducibility

  • Set random seeds only if the surrounding code does.
  • Don't add pip install cells in the middle of a notebook — flag missing deps for the requirements file.

Heavy outputs to suppress

  • Full model summaries (model.summary() for big networks)
  • Feature importance for thousands of features (show top-20)
  • Confusion matrices wider than 10×10 (show as text counts, not seaborn plot)
  • Tensor pretty-prints (use .shape and .dtype only)

Never

  • Don't display(df) without a row limit.
  • Don't paste binary outputs (image base64, pickled bytes) into chat.
  • Don't refactor a research notebook into "clean code" unless asked.
  • Don't add unit tests to exploratory notebooks.

Read the full file on GitHub · 49 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. 4d ago First seen · 49 lines · 0 tokens per session scan A 614ffb3ad366

Subscribe to this mod's changes

data-science is a cursor rule published in the GitHub repository inboxpraveen/Minimize-Cursor-Cost (7 stars, last pushed 19d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 526 tokens. 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-31.