data-science-rules

A set of conventions for reproducible environmental, ecological, and geospatial analysis in R and Python. Reproducible analysis means the same code can be rerun with the real data and produce the same process and results.

In plain words
What is it for?
Use it when writing or reviewing R or Python analysis that depends on real environmental, ecological, or geospatial data.
Why use it?
It prevents invented placeholder data and encourages analysis that can be read, checked, and rerun cleanly.

Cursor rule

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/nceas-ai/coding-agent-rules-for-data-science/data-science-rules
Clone the repo
git clone --depth 1 https://github.com/NCEAS-AI/Coding-Agent-Rules-for-Data-Science
Per session 3,654 This file is loaded in full into every session.
When invoked 3,654 The same file — it is already loaded in full.
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.03654 $0.03654
Opus 5 $0.01827 $0.01827
Sonnet 5 $0.00731 $0.00731
Haiku 4.5 $0.00365 $0.00365

Measured 2d ago against content hash 6f3f507e6105, 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-rules 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 2d 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.

personal-rules/data-science-rules.mdc · 368 lines

How it starts

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

🧭 Data-Science Conventions (R & Python)

Reproducible R and Python data-science work — environmental, ecological, geospatial. These are conventions for reproducible analysis, not a software product.


🎯 Priorities

Optimize for code that reads top-to-bottom and reruns cleanly — not for abstraction, generality, or "production" polish. This is reproducible analysis, not a software product.


🚫 Real data only — never fabricate or insert demo data

  • Use real, actual data. Never invent, mock, or insert demo / sample / placeholder / synthetic data to make code run or an analysis complete. This is a hard line.
  • If real data is missing, unavailable, or unclear, STOP and say so, then ask for it — don't substitute stand-in values and keep going.
  • No silent gap-filling: no made-up rows, columns, values, default fallbacks, or dummy files slipped into a pipeline. If sample data is ever genuinely needed (e.g. to test structure), label it unmistakably as fake and keep it out of any analysis path.
  • Flag it loudly wherever data looks fabricated, hardcoded, or placeholder-like in the code or inputs.

🖥️ System / environment

  • Primary host: Aurora (aurora.nceas.ucsb.edu) — a shared, multi-user NCEAS research server reached over SSH. Many people use it at once, so resource discipline matters (see Parallel & multiprocessing).
  • CPU: 2x AMD EPYC 9634 -> 168 physical cores / 336 logical (2 threads/core).
  • RAM: ~2.2 TiB.
  • Work may also run on local machines; the shared-server utilization caps below apply specifically when on a shared server like Aurora.

💬 Communication

  • Be concise and scannable; lead with the answer; don't restate code back.
  • When directions are unclear, ask clarifying questions — and note how the request could have been phrased more clearly.

🧰 Working with code (general)

  • Make only changes that were requested or are clearly understood and directly related to the task. Don't touch unrelated code.
  • Strongly prefer common, well-documented, standard packages and techniques.
  • Don't assume a package or function exists from memory. Confirm it's installed in the active environment before importing, and verify the specific function/argument exists in the installed version rather than guessing.
  • Never fabricate data, results, statistics, or citations. When inferring something rather than knowing it, say so.

Read the full file on GitHub · 368 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. 2d ago First seen · 368 lines · 3,654 tokens per session scan A 6f3f507e6105

Subscribe to this mod's changes

data-science-rules is a cursor rule published in the GitHub repository NCEAS-AI/Coding-Agent-Rules-for-Data-Science (3 stars, last pushed 8d ago), licensed CC0-1.0. It adds 3,654 tokens to every session, about $0.0183 per session on Opus 5. 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.