spark-advisor

spark-advisor is a skill for Claude Code, Codex from yaooqinn/spark-history-cli. It costs 137 tokens per session (2,474 once invoked), scanned A, original, Apache-2.0.

A set of instructions for diagnosing and improving Apache Spark applications and SQL queries using data from a Spark History Server. It focuses on execution details such as task balance, memory cleanup, data movement, and spilled data.

In plain words
What is it for?
Use it to diagnose slow applications or queries, compare benchmark runs such as TPC-DS, find bottlenecks, and assess executor skew, garbage collection, shuffle overhead, or spill.
Why use it?
It helps explain why a Spark job is slow using recorded run data rather than guesswork. It can also reveal performance regressions and differences between benchmark runs.

Skill for Claude CodeCodex

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

Good fit Use it to diagnose slow applications or queries, compare benchmark runs such as TPC-DS, find bottlenecks, and assess executor skew, garbage collection, shuffle overhead, or spill.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yaooqinn/spark-history-cli/spark-advisor
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 yaooqinn/spark-history-cli --skill spark-advisor
Clone the repo
git clone --depth 1 https://github.com/yaooqinn/spark-history-cli

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-advisor

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/yaooqinn/spark-history-cli/spark-advisor"><img src="https://agentmods.dev/badge/skills/yaooqinn/spark-history-cli/spark-advisor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,474 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.
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.00137 $0.02474
Opus 5 $0.00068 $0.01237
Sonnet 5 $0.00027 $0.00495
Haiku 4.5 $0.00014 $0.00247

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

Security

Grade A, and why

spark-advisor 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 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (sample_codes/compare-apps.sh), 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/spark-advisor/SKILL.md · 205 lines

How it starts

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

Spark Advisor

You are a Spark performance engineer. Use spark-history-cli (via the spark-history-cli skill or directly) to gather data from the Spark History Server, then apply diagnostic heuristics to identify bottlenecks and recommend improvements.

Quick Start

Diagnose an app in one shot:

# Get the latest app ID, then diagnose it
spark-history-cli --json apps --limit 1
spark-history-cli --json -a <app-id> summary
spark-history-cli --json -a <app-id> stages
spark-history-cli --json -a <app-id> executors --all

Then ask: "Why is this app slow?" — the skill will analyze the data and produce findings.

When to use this skill

  • User asks why a Spark application or SQL query is slow
  • User wants to compare two benchmark runs (especially TPC-DS)
  • User asks for tuning advice based on actual execution data
  • User mentions performance regressions between runs
  • User wants to understand executor skew, GC pressure, shuffle overhead, or spill
  • User asks about Gluten/Velox offloading effectiveness

Prerequisites

  • A running Spark History Server accessible via spark-history-cli
  • If the CLI is not installed: pip install spark-history-cli
  • Default server: http://localhost:18080 (override with --server)

Core Workflow

1. Gather Context

Always start by understanding what the user has and what they want to know:

  • Which application(s)? Get app IDs.
  • Single app diagnosis or comparison between two apps?
  • Specific query concern or overall app performance?
  • What changed between runs (config, data, Spark version, Gluten version)?

2. Collect Data

Use --json for all data collection so you can reason over structured data.

For single-app diagnosis, collect in this order:

# Overview first
spark-history-cli --json -a <app> summary
spark-history-cli --json -a <app> env

# Then drill into workload
spark-history-cli --json -a <app> sql                    # all SQL executions
spark-history-cli --json -a <app> stages                 # all stages
spark-history-cli --json -a <app> executors --all         # executor metrics

Read the full file on GitHub · 205 lines

Files

What ships with it

3 files 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. 10d ago First seen · 205 lines · 137 tokens per session scan A a0559f0198f3

Subscribe to this mod's changes

spark-advisor is a skill published in the GitHub repository yaooqinn/spark-history-cli (29 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 137 tokens to every session and 2,474 once invoked, about $0.0007 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

benchmarking

A guide to benchmarking, which means measuring how quickly and reliably a computer, disk, database, or service performs under test. It uses tools such as sysbench and fio.

chaterm/terminal-skills · 7 tokens

hotpath_init

Configure hotpath profiling in a Rust project. Adds the hotpath dependency with feature-gated setup, instruments main with hotpath::main, functions with measure/measureall, and wraps channels, mutexes, rwlocks, streams, futures, reqwest clients, axum routers and byte-level I/O with hotpath macros. Use when the user…

pawurb/hotpath-rs · 88 tokens

syncmeta

Sync changes from hotpath and hotpath-macros crates to their meta counterparts (hotpath-meta and hotpath-macros-meta). Use when meta crates need to be updated with recent changes.

pawurb/hotpath-rs · 43 tokens

hotpath_bump

Bump the hotpath version number across the workspace and related files. Updates crate versions in Cargo.toml files (exact patch version) and version references in the backend middleware, hotpathinit skill, and README (major.minor only). Use when the user wants to bump, bump the version, or release a new hotpath…

pawurb/hotpath-rs · 73 tokens

http-load-profiler

Run stepped HTTP load tests with ab/wrk, ramping concurrency levels to collect p50/p90/p99 latency, detect performance inflection points, and recommend optimal concurrency. Triggered by requests like 'load test this URL', 'benchmark my API', 'find the max concurrency', or mentions of p99 latency, throughput…

zebbern/claude-code-guide · 76 tokens

codspeed-optimize

Autonomously optimize code for performance using CodSpeed benchmarks, flamegraph analysis, and iterative improvement. Use this skill whenever the user wants to make code faster, reduce CPU usage, optimize memory, improve throughput, find performance bottlenecks, or asks to 'optimize', 'speed up', 'make faster'…

CodSpeedHQ/codspeed · 113 tokens