databricks

databricks is a cursor rule for Cursor from sanjeed5/awesome-cursor-rules-mdc. It costs 2,405 tokens per session, scanned A, original, CC0-1.0.

A set of coding guidelines for Databricks, a platform for processing data and running data pipelines. It focuses on keeping notebooks and supporting Python code organized, versioned, and reusable.

In plain words
What is it for?
Use it when organizing Databricks notebooks, Git repositories, Python modules, and data-processing pipelines.
Why use it?
It helps prevent important pipeline logic from being trapped in untracked notebooks and makes data projects easier to maintain and review.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is notebook_path: ./notebooks/main_pipeline.py.

Good fit Use it when organizing Databricks notebooks, Git repositories, Python modules, and data-processing pipelines.

Compare 6 cursor rules from other repositories ↓
About the project

awesome-cursor-rules-mdc is a generator that creates Cursor MDC rule files from structured library information, using semantic search and language models to gather and organize guidance. Developers use it to produce reusable rules for libraries in Cursor, and the catalogue includes 200 of those rules.

sanjeed5/awesome-cursor-rules-mdc · 3,588 stars · on GitHub

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/sanjeed5/awesome-cursor-rules-mdc
agentmods
npx agentmods add rules/sanjeed5/awesome-cursor-rules-mdc/databricks

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 databricks

README.md
[![agentmods](https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/databricks/github.svg)](https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/databricks)
Your own site
<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/databricks"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/databricks/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.

agentmods 80×15 button for databricks

Your own site · 80×15
<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/databricks"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/databricks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,405 This file is loaded in full into every session.
When invoked 2,405 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.02405 $0.02405
Opus 5.5 $0.00962 $0.00962
Sonnet 5.5 $0.00481 $0.00481
Haiku 4.5 $0.00241 $0.00241

Measured 3mo ago against content hash 58a8ca7344d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

databricks 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 3mo 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.

rules-mdc/databricks.mdc · 290 lines

How it starts

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

databricks Best Practices

This guide outlines the essential best practices for developing on Databricks. Adhere to these rules to ensure your code is maintainable, performant, and secure.

1. Code Organization and Structure

Leverage Git folders and Databricks Asset Bundles for all projects. Treat notebooks as version-controlled code, not isolated scripts. Extract reusable logic into Python modules.

  • Version Control: Always use Git folders for notebooks and source code. ❌ BAD: Storing notebooks directly in Workspace without Git integration. ✅ GOOD:

    # In a Git-synced notebook (e.g., /Repos/user/my-repo/notebooks/my_pipeline.py)
    # This notebook is version-controlled and can import local modules.
    from ..src.utils import process_data
    
    df = spark.read.table("raw_data")
    processed_df = process_data(df)
    processed_df.write.mode("overwrite").saveAsTable("processed_data")
    
  • Module Extraction: For any logic beyond simple notebook orchestration, extract it into Python modules (.py files) within your Git repository. ❌ BAD:

    # In a notebook cell
    def complex_transformation(df):
        # 50+ lines of transformation logic
        return df
    

    ✅ GOOD:

    # /Repos/user/my-repo/src/transformations.py
    def complex_transformation(df):
        # Modular, testable logic
        return df
    
    # In a notebook
    from src.transformations import complex_transformation
    df = complex_transformation(spark.read.table("staging"))
    
  • Project Structure with Bundles: Use Databricks Asset Bundles to define and deploy your entire project (jobs, pipelines, models, notebooks, infrastructure) as a single, versioned unit. ✅ GOOD:

    # databricks-bundle.yml
    bundle:
      name: my-data-pipeline
    resources:
      jobs:
        my_etl_job:
          name: My ETL Job
          tasks:
            - task_key: process_data
              notebook_task:
                notebook_path: ./notebooks/main_pipeline.py
              new_cluster:
                spark_version: "14.3.x-scala2.12"
                node_type_id: "Standard_DS3_v2"
                num_workers: 3
    

Read the full file on GitHub · 290 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. 3mo ago First seen · 290 lines · 0 tokens per session scan A 58a8ca7344d3

Subscribe to this mod's changes

databricks is a cursor rule published in the GitHub repository sanjeed5/awesome-cursor-rules-mdc (3,588 stars, last pushed 9d ago), licensed CC0-1.0. It adds 2,405 tokens to every session, about $0.0096 per session on Opus 5.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-30.

Related

databricks compared with cursor rules from other repositories

databricks next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
databrickssanjeed5/awesome-cursor-rules-mdcCursor rule3.6k9d agoCC0-1.0A2,405Cursor
tensorflownedcodes-ok/cursorrules-collectionCursor rule389mo agoMITA413Cursor
006_Program_of_Thought_TutorialAIFlowML/cursor_rulesCursor rule241y agononeA24Cursor
standards-data-engrwking/wellness_plannerCursor rule09mo agononeA170Cursor
ponytailDietrichGebert/ponytailCursor rule204k11d agoMITA604Cursor
angular-20angular/angularCursor rule102ktodayMITA0Cursor
dev-standardapache/supersetCursor rule76ktodayApache-2.0A1,147Cursor