debug-slow-spark-job

debug-slow-spark-job is a skill for Claude Code, Codex from EmbrasureAI/spark-observability-skills. It costs 73 tokens per session (1,880 once invoked), scanned A, original, Apache-2.0.

A troubleshooting guide for slow or increasingly expensive Apache Spark and PySpark applications. It compares execution measurements with a healthy run when one is available.

In plain words
What is it for?
Use it to investigate slow stages, uneven task workloads, data skew, shuffle or disk spill, garbage collection, too few workers, many small files, slow scans, scheduler delays, or unbalanced executors.
Why use it?
It helps identify the cause of a slowdown or rising compute cost instead of guessing from source code alone. It accounts for differences in input size before calling something a regression.

Skill for Claude CodeCodex

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

Good fit Use it to investigate slow stages, uneven task workloads, data skew, shuffle or disk spill, garbage collection, too few workers, many small files, slow scans, scheduler delays, or unbalanced executors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/embrasureai/spark-observability-skills/debug-slow-spark-job
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 EmbrasureAI/spark-observability-skills --skill debug-slow-spark-job
Clone the repo
git clone --depth 1 https://github.com/EmbrasureAI/spark-observability-skills

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 debug-slow-spark-job

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/embrasureai/spark-observability-skills/debug-slow-spark-job"><img src="https://agentmods.dev/badge/skills/embrasureai/spark-observability-skills/debug-slow-spark-job.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,880 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 112
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00073 $0.01880
Opus 5 $0.00036 $0.00940
Sonnet 5 $0.00015 $0.00376
Haiku 4.5 $0.00007 $0.00188

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

Security

Grade A, and why

debug-slow-spark-job 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/spark_history_api.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/debug-slow-spark-job/SKILL.md · 113 lines

How it starts

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

Debug a slow Spark job

Find the root cause of the slowdown or cost growth. Compare against a healthy run whenever one exists, and normalize for input size before calling anything a regression.

Get the evidence

export SPARK_HISTORY_URL="https://history.example.com"
python3 scripts/spark_history_api.py slow --app-id <slow-application-id> > /tmp/spark-slow.json
python3 scripts/spark_history_api.py slow --app-id <healthy-application-id> > /tmp/spark-healthy.json

Run from this skill directory. If SPARK_HISTORY_URL is unset, find the server before asking the user: try http://localhost:18080, a running application's UI on http://localhost:4040, and the history-server or eventLog settings in the local Spark config; ask only when nothing responds. Authentication comes from SPARK_HISTORY_AUTHORIZATION, SPARK_HISTORY_COOKIE, or SPARK_HISTORY_HEADERS_JSON; never ask for credentials in chat and never disable TLS verification (--ca-file for a private CA).

Other subcommands: applications [--status completed|running] to find app IDs, sql-list --app-id <id> and sql --app-id <id> --execution-id <n> for the executed plan with per-node metrics, failure --app-id <id> for failed-stage detail; all accept --stage-limit N --task-limit N. For anything the profiles omit, call $SPARK_HISTORY_URL/api/v1 directly with the same auth headers: /applications/{app}/jobs, /stages/{stage}/{attempt}/taskSummary?quantiles=0.05,0.5,0.95, /stages/{stage}/{attempt}/taskList?sortBy=-runtime, /allexecutors, /environment, /sql/{execution}?details=true&planDescription=true.

In taskSummary, metric arrays align with quantiles [0, 0.5, 0.95, 0.99, 1.0]: the middle entry is the median, the last is the max. Read spark.master and deploy mode from environment.sparkProperties to know where driver and executor logs live. Compare stage timelines between the two runs and start where they first diverge; wall time alone mixes queue time, driver work, execution, and commit.

Read the full file on GitHub · 113 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 113 lines · 73 tokens per session scan A 4da606a29aa0

Subscribe to this mod's changes

debug-slow-spark-job is a skill published in the GitHub repository EmbrasureAI/spark-observability-skills (52 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 73 tokens to every session and 1,880 once invoked, about $0.0004 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

notebooklm

Install, authenticate, troubleshoot, and operate Gemini Notebook through the notebooklm-py CLI or typed async Python API. Use for notebook and source management, grounded chat and research, and artifact generation or download when the user mentions Gemini Notebook, notebooklm-py, the notebooklm CLI, or its Python API.…

teng-lin/notebooklm-py · 79 tokens

debug-inference

Debug inference clients that use an attached provider and its native endpoint, including hosted APIs and host-local Ollama, vLLM, SGLang, TRT-LLM, LM Studio, or NIM. Use for provider attachment, endpoint policy, credential substitution, topology, and migration from the removed inference.local endpoint. Trigger…

NVIDIA/OpenShell · 119 tokens

oh-my-posh

Install, configure, or troubleshoot Oh My Posh/ohmyposh: shell init, themes, segments, Nerd Font icons, and prompt setup on PowerShell, zsh, bash, or fish.

JanDeDobbeleer/oh-my-posh · 47 tokens

eagle3-triage

Triage a failed EAGLE3 pipeline run. Identifies which step failed (data synthesis, hidden state dump, training, or benchmark), diagnoses root cause from logs, and suggests fixes. Use when user reports an EAGLE3 pipeline failure or asks why a specific step failed. Also helps debug new model support issues.

NVIDIA/Model-Optimizer · 73 tokens

setup

Configure MLflow tracing for Claude Code.

mlflow/mlflow · 10 tokens

trulens-instrumentation

Instrument LLM apps with TruLens OTEL-based tracing - from setup to debugging and optimization.

truera/trulens · 25 tokens