Download for MacApple silicon, macOS 14+
Skill

spark-best-practices

@oleanderhq Updated 2026-08-10

General Apache Spark best practices for scalable, maintainable DataFrame jobs: avoid driver materialization, reduce shuffle, join efficiently, and cache carefully. Use when optimizing Spark performance, reviewing PySpark jobs, or writing new DataFrame pipelines.

Install

With your agent

Install OMGSkills skill "oleanderhq/claude-plugin:skills/spark-best-practices" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.

Manual command

git clone https://github.com/OleanderHQ/claude-plugin /tmp/claude-plugin && ln -s /tmp/claude-plugin/skills/spark-best-practices ~/.claude/skills/spark-best-practices

From README

Spark Best Practices Use this skill for general Apache Spark guidance when optimizing performance, reliability, and maintainability. 1) Keep execution distributed Avoid collect(), toPandas(), and large take() in core data paths. Materialize to driver memory only for very small control outputs (metrics, IDs, summaries). Keep heavy transformation and write paths in Spark DataFrame execution. 2) Prefer DataFrame APIs to Python loops Use Spark SQL/DataFrame functions so Catalyst can optimize execution plans. Avoid row-by-row Python logic when equivalent DataFrame expressions exist. Keep transformations declarative and composable. 3) Reduce shuffle cost Project and filter early to reduce data volume before joins/aggregations. Repartition intentionally before heavy joins/writes. Use coalesce when reducing output partitions. Watch for skewed keys and apply skew mitigation. 4) Use efficient joins Broadcast small dimension tables when appropriate.