spark

spark is a skill for Claude Code from nimadorostkar/Claude-Skills-collection. It costs 80 tokens per session (1,401 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 Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the data plugin — 6 skills shipped together

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.

Or install data, the plugin that ships this one along with the rest of its 6 skills.

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 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,401 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.00080 $0.01401
Opus 5.5 $0.00032 $0.00560
Sonnet 5.5 $0.00016 $0.00280
Haiku 4.5 $0.00008 $0.00140

Measured 1mo ago against content hash 7f156063085f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 first — df.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. 1mo ago Changed · +42 tokens per session 7f156063085f
  2. 3mo 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 (41 stars, last pushed today), licensed MIT. It adds 80 tokens to every session and 1,401 once invoked, about $0.0003 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

spark compared with skills from other repositories

spark next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sparknimadorostkar/Claude-Skills-collectionSkill41todayMITA80Claude Code
ai-ethics-reviewmohitagw15856/pm-claude-skillsSkill1.6ktodayMITA88Claude Code
ai-product-canvasmohitagw15856/pm-claude-skillsSkill1.6ktodayMITA73Claude Code
model-migration-planmohitagw15856/pm-claude-skillsSkill1.6ktodayMITA99Claude Code
prompt-regression-suitemohitagw15856/pm-claude-skillsSkill1.6ktodayMITA102Claude Code
ai-context-primermohitagw15856/pm-claude-skillsSkill1.6ktodayMITA149Claude Code
ai-output-verifiermohitagw15856/pm-claude-skillsSkill1.6ktodayMITA142Claude Code