spark

spark is a skill for Claude Code, Codex from nimadorostkar/Claude-Skills-collection. It costs 38 tokens per session (1,359 once invoked), scanned A, original, MIT.

A guide for building and tuning Apache Spark data pipelines, which process large datasets across multiple computers. It focuses on how data is divided, moved between computers, joined, cached, and read.

In plain words
What is it for?
Use it to reduce data movement, balance partitions, handle uneven data, choose join strategies, tune caching, improve file reads, and investigate Spark stages.
Why use it?
It helps find why a Spark job is slow, runs out of memory, or has one task taking much longer than the others. It connects problems shown in the Spark UI to changes in the job or cluster setup.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to reduce data movement, balance partitions, handle uneven data, choose join strategies, tune caching, improve file reads, and investigate Spark stages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nimadorostkar/claude-skills-collection/spark
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.

Any agent
npx skills add nimadorostkar/Claude-Skills-collection --skill spark
Clone the repo
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection

Made for: Claude Code, Codex.

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 spark

README.md
[![agentmods](https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/spark/github.svg)](https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/spark)
Your own site
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/spark"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/spark/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 spark

Your own site · 80×15
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/spark"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/spark.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,359 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00038 $0.01359
Opus 5 $0.00019 $0.00679
Sonnet 5 $0.00008 $0.00272
Haiku 4.5 $0.00004 $0.00136

Measured 12d ago against content hash 0015bec0a960, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

spark 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 12d 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.

skills/data/spark/SKILL.md · 121 lines

How it starts

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

Spark

Purpose

Write Spark jobs whose cost is understood. Almost all Spark performance problems are one of three things: too much shuffle, skewed partitions, or reading far more data than the query needs.

When to Use

  • Building or reviewing a Spark pipeline.
  • A job that is slow, failing with out-of-memory errors, or has one straggling task.
  • Tuning partitioning and join strategy.
  • Reading the Spark UI to diagnose a stage.

Capabilities

  • Partitioning strategy and repartitioning.
  • Shuffle minimization and broadcast joins.
  • Skew detection and mitigation.
  • Caching and persistence levels.
  • File-format and predicate-pushdown optimization.
  • Spark UI interpretation.

Inputs

  • The job, its input data volume, and its physical plan.
  • The Spark UI: stage timings, task distribution, shuffle read/write.
  • Cluster resources.

Outputs

  • A plan with fewer or smaller shuffles.
  • Balanced partitions with no straggling tasks.
  • Measured improvement in wall-clock time and cost.

Workflow

  1. Read the plan firstdf.explain(True). Every Exchange is a shuffle, and a shuffle writes to disk and crosses the network. It is the dominant cost.
  2. Prune early — Select the columns and filter the rows you need before joining, not after. With Parquet, this pushes down to the file reader and never reads the data at all.
  3. Broadcast the small side — A join where one side fits in memory (roughly under 100 MB) should be a broadcast join. That eliminates the shuffle entirely.
  4. Find the skew — In the Spark UI, look at the task duration distribution within a stage. If the max is 50x the median, one partition holds most of the data. That single task is your job's runtime.
  5. Mitigate the skew — Salting the key, or enabling adaptive query execution's skew join handling.
  6. Cache only what is reused — Caching a DataFrame used once costs memory and gains nothing.

Best Practices

  • Enable adaptive query execution (spark.sql.adaptive.enabled=true). It coalesces partitions, converts joins to broadcasts at runtime, and handles skew automatically. It is on by default from Spark 3.2 and is the single largest free improvement available.
  • A shuffle is the most expensive operation in Spark. groupBy, join, distinct, and repartition all shuffle. Count them in the plan.
  • collect() brings the entire dataset to the driver. On anything non-trivial this is an out-of-memory error waiting for a larger input.
  • Use Parquet or Delta, never CSV or JSON, for anything that will be read more than once. Columnar formats support predicate and projection pushdown; row formats do not.
  • Too many small partitions means task-scheduling overhead dominates; too few means poor parallelism and memory pressure. Aim for partitions of roughly 128 MB.
  • cache() is lazy. It does nothing until an action runs, and it can silently fall back to recomputation if it does not fit in memory.

Read the full file on GitHub · 121 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. 12d ago First seen · 121 lines · 38 tokens per session scan A 0015bec0a960

Subscribe to this mod's changes

spark is a skill published in the GitHub repository nimadorostkar/Claude-Skills-collection (26 stars, last pushed 24d ago), licensed MIT. It adds 38 tokens to every session and 1,359 once invoked, about $0.0002 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 skills, from other repositories

datarobot-agent-assist

Use when the user wants to design, build, code, simulate, or deploy an AI agent (not a predictive model) to DataRobot; mentions agentspec.md, dr-assist, datarobot-agent-assist, dress rehearsal, swarm simulation, or the DataRobot agent template; wants to scaffold a LangGraph, CrewAI, LlamaIndex, NAT, or Base agent…

datarobot-oss/datarobot-agent-skills · 182 tokens

datarobot-agent-assist-build

Use when the user wants to design, build, code, or deploy an AI agent on DataRobot; mentions agentspec.md, dress rehearsal, the DataRobot agent template, LangGraph, CrewAI, LlamaIndex, NAT, Base agents, MCP servers, backend APIs, custom frontends, or the DataRobot CLI.

datarobot-oss/datarobot-agent-skills · 74 tokens

datarobot-model-explainability

Tools and guidance for model explainability, prediction explanations, feature impact analysis, SHAP values, SHAP distributions, anomaly assessment, and model diagnostics. Use when analyzing model explanations, feature impact, SHAP values, SHAP distributions, anomaly assessment, or diagnosing model behavior.

datarobot-oss/datarobot-agent-skills · 63 tokens

datarobot-model-training

Comprehensive guidance for training models in DataRobot, including project creation, AutoML configuration, feature engineering, and model selection. Use when training models, creating AutoML projects, or selecting models in DataRobot.

datarobot-oss/datarobot-agent-skills · 48 tokens

datarobot-predictions

Tools and guidance for making predictions with DataRobot deployments, including real-time predictions, batch scoring, prediction dataset generation, and prediction explanations (SHAP/XEMP). Use when making predictions, running batch scoring, generating prediction datasets, or explaining individual predictions from a…

datarobot-oss/datarobot-agent-skills · 60 tokens

datarobot-setup

Sets up DataRobot for local development including Python SDK, dr-cli, Agent Assist, and all required dependencies. Use when the user has not yet worked with DataRobot on this machine, OR when any DataRobot task fails due to missing or invalid credentials. Covers first-time setup, re-authentication, and credential…

datarobot-oss/datarobot-agent-skills · 70 tokens