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.
npx agentmods add rules/inboxpraveen/minimize-cursor-cost/data-sciencegit clone --depth 1 https://github.com/inboxpraveen/Minimize-Cursor-CostWrote 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.
[](https://agentmods.dev/rules/inboxpraveen/minimize-cursor-cost/data-science)<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>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.
| Model | Per session | Once 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 |
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.
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), ordf.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.dtypesordf.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 unchangedbetween 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 installcells 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
.shapeand.dtypeonly)
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.
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.
- 4d ago First seen · 49 lines · 0 tokens per session scan A 614ffb3ad366
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.
Other cursor rules, from other repositories
tensorflow
TensorFlow: Keras, model training, production deployment.
sample_cursor_rule
React component best practices.
guardrails
Security guardrails applied to all AI interactions.
documentation-standards
Documentation standards for code, APIs, and architecture.
token-efficiency
Token optimization rules to reduce AI costs by 30%+.
performance
Frontend performance optimization rules. Apply when optimizing UI or bundle.