databricks

databricks is a cursor rule for coding agents 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

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/sanjeed5/awesome-cursor-rules-mdc/databricks
Clone the repo
git clone --depth 1 https://github.com/sanjeed5/awesome-cursor-rules-mdc

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.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.svg" alt="Measured on agentmods" 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. 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.02405 $0.02405
Opus 5 $0.01203 $0.01203
Sonnet 5 $0.00481 $0.00481
Haiku 4.5 $0.00241 $0.00241

Measured 4d ago against content hash 58a8ca7344d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

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. 4d 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,571 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 2,405 tokens to every session, about $0.0120 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-30.

Related

Other cursor rules, from other repositories

executing-red-team-engagement-planning

Red team engagement planning is the foundational phase that defines scope, objectives, rules of engagement (ROE), threat model selection, and operational timelines before any offensive testing begins.

galyarderlabs/galyarder-framework · 34 tokens

solana-integration-constraints

Constraints and requirements for Solana integration with MetaMask Connect — wallet adapter config, CAIP-2 IDs, network support per platform, RPC routing, and platform limitations.

MetaMask/metamask-connect-cursor-plugin · 1,207 tokens

cadence-nft-standards

Comprehensive standards and best practices for developing Non-Fungible Tokens (NFTs) using Cadence. Ensures proper implementation of NonFungibleToken interfaces, MetadataViews integration for marketplace compatibility, secure resource handling patterns, and advanced modular architectures for complex NFTs with traits…

onflow/cadence-rules · 81 tokens

prediction-market-contract

Cursor rule "prediction-market-contract" from DeWiCats/solana-dev-cursor-rules, covering prediction market core rules, market structure, amm pool mechanics, share model and account structure.

DeWiCats/solana-dev-cursor-rules · 1,280 tokens

angular-20

This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.

angular/angular · 0 tokens

dev-standard

Apache Superset development standards and guidelines for Cursor IDE.

apache/superset · 1,147 tokens