PatrickJS/awesome-cursorrules is a collection of Markdown rule files that give Cursor AI editor project-specific instructions about code, frameworks, workflows, and standards. Developers use it to find reusable guidance for shaping Cursor’s behavior in different kinds of software projects.
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.
git clone --depth 1 https://github.com/PatrickJS/awesome-cursorrulesWrote 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/patrickjs/awesome-cursorrules/pyspark-etl-best-practices-cursorrules-prompt-file)<a href="https://agentmods.dev/rules/patrickjs/awesome-cursorrules/pyspark-etl-best-practices-cursorrules-prompt-file"><img src="https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/pyspark-etl-best-practices-cursorrules-prompt-file/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/patrickjs/awesome-cursorrules/pyspark-etl-best-practices-cursorrules-prompt-file"><img src="https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/pyspark-etl-best-practices-cursorrules-prompt-file.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.03275 | $0.03275 |
| Opus 5 | $0.01638 | $0.01638 |
| Sonnet 5 | $0.00655 | $0.00655 |
| Haiku 4.5 | $0.00328 | $0.00328 |
Grade A, and why
pyspark-etl-best-practices-cursorrules-prompt-file 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 7d 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 — 382 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert in PySpark, Spark SQL, Apache Iceberg, and production data engineering. You write performant, idiomatic ETL code that is testable, readable, and safe for cumulative/snapshot tables.
Follow these rules when generating or reviewing PySpark code.
PySpark ETL Best Practices
1. Project Structure
ETL class scaffold
Create a base class that manages the SparkSession lifecycle. Accept an optional spark_session parameter so tests can inject a local session. Use an abstract method for the job logic.
from abc import ABC, abstractmethod
from pyspark.sql import SparkSession
class BaseETL(ABC):
def __init__(self, config, app_name="ETL Job", spark_session=None):
self.spark = spark_session or SparkSession.builder.appName(app_name).getOrCreate()
self.config = config
self.logger = logging.getLogger(self.__class__.__name__)
@abstractmethod
def run_job(self): ...
def stop(self):
self.spark.stop()
Config — use a factory function
Keep the dataclass as pure data and put CLI parsing in a standalone factory function. This makes configs easy to construct in tests without touching sys.argv.
@dataclass
class MyConfig:
read_date: int = 20200101
def create_config() -> MyConfig:
parser = argparse.ArgumentParser()
parser.add_argument("--read_date", type=int, default=20200101)
args = parser.parse_args()
return MyConfig(read_date=args.read_date)
Pipeline composition with .transform()
Keep run_job as orchestration. Each step is a named method.
events = self.read_source().transform(self.enrich).transform(self.merge_with_existing)
Use a shared reader for partition-aware reads
Build a generic reader utility that handles partition mechanics (date filters, hour ranges, latest-partition lookups). Don't create one-off reader classes per table — keep domain-specific filters in the ETL where they're visible.
class PartitionedReader:
@staticmethod
def read_latest(spark, table_name, partition_col):
row = spark.read.table(table_name).agg(F.max(partition_col)).first()
if row is None or row[0] is None:
return spark.createDataFrame([], spark.read.table(table_name).schema)
return spark.read.table(table_name).filter(F.col(partition_col) == row[0])
@staticmethod
def read_by_date(spark, table_name, partition_col, date_value):
return spark.read.table(table_name).filter(F.col(partition_col) == date_value)
# Reader handles partitioning
events = PartitionedReader.read_by_date(spark, "catalog.my_table", "event_date", 20260319)
# Business filters stay in the ETL
events = events.filter(F.col("event_type").isin("login", "purchase"))
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.
- 7d ago First seen · 382 lines · 3,275 tokens per session scan A 388d8d13dd15
pyspark-etl-best-practices-cursorrules-prompt-file is a cursor rule published in the GitHub repository PatrickJS/awesome-cursorrules (40,748 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 3,275 tokens to every session, about $0.0164 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-09-03.
Other cursor rules, from other repositories
pydantic
Pydantic: BaseModel, validators, Field, Settings.
pytorch
PyTorch: neural networks, model training, GPU optimization.
cursorrules
You are building an AI/ML project with Python. The project uses PyTorch for model training, handles data pipelines with proper validation, tracks experiments systematically, and follows production ML engineering practices. Code is type-hinted, tested, and reproducible.
django
Django: models, views, ORM best practices.
python
Python best practices: type hints, pathlib, pytest, clean error handling.
pytest
You are an expert in pytest testing. Follow these rules.