# Spark & Databricks Performance Reviewer

> Paste PySpark code or an EXPLAIN plan and get ranked fixes for skew, shuffles, small files, UDFs and missed broadcasts.

Spark & Databricks Performance Reviewer is a free AI agent skill on Agensi by Shrey Kumar Soni, in Data & Databases. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Shrey Kumar Soni](https://www.agensi.io/creators/shrey-kumar-soni)
- Category: [Data & Databases](https://www.agensi.io/skills/data-databases)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-15
- Security: scan passed (2026-10-15); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/spark-databricks-performance-reviewer
- Tags: database, devops, spark, pyspark, databricks, performance, delta-lake, photon

## About this skill

Most Spark tuning skills are a table of tips. This one reads your actual evidence.

- **Reads code and plans.** A bundled read-only scanner (Python stdlib, no installs) checks `.py/.sql/.scala` files for 20 anti-patterns, and parses `EXPLAIN FORMATTED` output and pasted Spark UI metrics.
- **Uses your own numbers.** It flags skew when max task shuffle is at least 5x the median. It flags small files when the average file is under 32 MiB across more than 100 files. It also catches Cartesian or nested-loop joins, sort-merge joins that could broadcast, Python UDFs in the plan, scans with no partition pruning, missing AdaptiveSparkPlan (AQE), Photon gaps, and too many shuffle exchanges.
- **Ranks by impact.** Driver OOM and Cartesian joins come first, then skew, then UDFs, small files, joins and config.
- **Gives exact fixes.** Code and SQL changes, null-key and salting patterns, and Delta layout advice: OPTIMIZE, auto-compaction, and liquid clustering vs Z-order vs Hive partitioning (never Z-order and liquid clustering on one table).
- **Proves it with measurement.** It never promises a speed-up. It gives you a before/after table: duration, shuffle, spill, files read and cost per run, with row-count and checksum parity.

Built by a data engineer who runs Databricks ETL in production.

**What it won't do:** run jobs, change clusters, or run OPTIMIZE/VACUUM.

## Requires

- Python 3

## Known limitations

Won't run jobs, change clusters, or run OPTIMIZE/VACUUM. Scanner is pattern-based and can give false positives (e.g. `collect()` on a tiny aggregate); the agent confirms each finding in context. Photon and liquid clustering advice applies only on Databricks.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Spark & Databricks Performance Reviewer skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How is this different from free Spark tuning skills?

Free ones list tips. This one parses your plan and metrics, cites file:line, ranks by impact, and makes you measure before and after.

### Does it need Databricks?

No. It works for Apache Spark plans too. The Photon and liquid clustering advice applies only on Databricks.

### Does it guarantee speed-ups?

No. Every fix comes with a measurement step.

### False positives?

Possible, since it's pattern-based (e.g. `collect()` on a tiny aggregate). The agent confirms each finding in context.

### Which agents?

Any SKILL.md-compatible agent that can run Python 3.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
