Token导航 LogoToken导航

Agent Skill · 研究检索

spark-advisor(火花顾问)

spark-advisor 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

spark-advisor 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 66,724。

总安装 259周安装 11GitHub Stars 22下载 91核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:spark-advisor(火花顾问)
来源仓库:https://github.com/yaooqinn/spark-history-cli
仓库路径:skills/spark-advisor
安装命令:
npx skills add https://github.com/yaooqinn/spark-history-cli --skill spark-advisor
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yaooqinn/spark-history-cli --skill spark-advisor

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

分析 Spark 作业性能瓶颈,识别任务倾斜与小文件问题。诊断 SQL 计划节点效率,提供连接策略与资源调整建议。适合大数据工程师优化集群资源配置。spark-advisor 属于研究检索类 Skill,可作为该场景下的辅助能力补充。需运行 Spark 历史服务器并授权访问事件日志。

建议查看原始 CLI 文档了解命令参数与输出解析方式。

来源仓库内路径:skills/spark-advisor

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/yaooqinn/spark-history-cli --skill spark-advis…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

spark-advisor 怎么安装?

在终端执行 npx skills add https://github.com/yaooqinn/spark-history-cli --skill spark-advisor。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

spark-advisor 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

spark-advisor 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/yaooqinn/spark-history-cli --skill spark-advisor 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

spark-advisor 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

spark-advisor 用的人多吗?

公开数据是累计安装 259 次,近一周安装 11 次,下载 91 次,GitHub 22 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

spark-advisor 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
spark-advisor

火花顾问 · 本页

25922执行命令未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

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

For app comparison, collect the same data for both apps.

For specific query diagnosis, also fetch:

spark-history-cli --json -a <app> sql <exec-id>          # SQL detail with nodes/edges
spark-history-cli -a <app> sql-plan <exec-id> --view final   # post-AQE plan
spark-history-cli -a <app> sql-plan <exec-id> --view initial # pre-AQE plan
spark-history-cli --json -a <app> sql-jobs <exec-id>     # linked jobs
spark-history-cli --json -a <app> stage-summary <stage>  # task quantiles for slow stages
spark-history-cli --json -a <app> stage-tasks <stage> --sort-by -runtime --length 10  # stragglers

3. Analyze

Apply the diagnostic rules from references/diagnostics.md to identify issues. Key areas to check:

  • Duration breakdown: Where is time spent? (stages, tasks, shuffle, GC)
  • Skew detection: Compare p50 vs p95 in stage-summary; >3x ratio suggests skew
  • GC pressure: Total GC time vs executor run time; >10% is concerning
  • Shuffle overhead: Large shuffle read/write relative to input size
  • Spill: Any memory or disk spill indicates memory pressure
  • Straggler tasks: Tasks much slower than peers (check stage-tasks sorted by runtime)
  • Config issues: Suboptimal shuffle partitions, executor sizing, serializer choice

4. Compare (when applicable)

For TPC-DS benchmark comparisons, see references/comparison.md for the structured approach:

  • Match queries by name (q1, q2,..., q99)
  • Calculate speedup/regression per query
  • Identify top-N improved and regressed queries
  • Drill into regressed queries to find root cause
  • Compare configurations side-by-side

5. Report

Produce two outputs:

  1. Conversation summary: Key findings and top recommendations (concise, actionable)
  2. Detailed report file: Full analysis saved to disk as Markdown

Report structure:

# Spark Performance Report

## Executive Summary
<2-3 sentence overview of findings>

## Application Overview
<summary data for each app>

## Findings
### Finding 1: <title>
- **Severity**: High/Medium/Low
- **Evidence**: <specific metrics>
- **Recommendation**: <what to change>

## Configuration Comparison (if comparing)
<side-by-side diff of key Spark properties>

## Query-Level Analysis (if TPC-DS)
<table of query durations with speedup/regression>

## Recommendations
<prioritized list of actionable changes>

Diagnostic Quick Reference

These are the most impactful things to check. For the full diagnostic ruleset, see references/diagnostics.md.

SymptomWhat to CheckCLI Command
Slow overallDuration breakdown by stagesummary, stages
Task skewp50 vs p95 durationstage-summary <id>
GC pressureGC time vs run time per executorexecutors --all
Shuffle heavyShuffle bytes vs input bytesstages, stage <id>
Memory spillSpill bytes > 0stage <id>, stage-summary <id>
Straggler tasksTop tasks by runtimestage-tasks <id> --sort-by -runtime
Bad configPartition count, executor sizingenv, summary
AQE ineffectiveInitial vs final plan differencesql-plan <id> --view initial/final
Gluten fallbackNon-Transformer nodes in final plansql-plan <id> --view final
Small files readAvg file size < 3MB, files > 100sql <exec-id> node metrics
Small files writtenAvg file size < 3MB, files > 100sql <exec-id> node metrics
Broadcast too largeBroadcast data > 1GBsql <exec-id> node metrics
SMJ→BHJ conversionSMJ with small input sidesql-plan <id> --view final
Large cross joinCross join rows > 10Bsql <exec-id> node metrics
Long filter conditionFilter condition > 1000 charssql-plan <id> --view final
Full scan on partitionedMissing partition/cluster filterssql-plan <id> --view final
Large partition sizeMax partition > 5GBstage-summary <id>
Wasted coresIdle cores > 50%executors --all
Memory over-provisionedMax usage < 70%executors --all
Driver memory riskDriver heap > 95%executors --all
Iceberg inefficient replaceFiles replaced > 30%, records < 30%sql <exec-id> node metrics

SQL Plan Analysis

When diagnosing specific SQL queries, analyze the SQL plan nodes for these patterns:

  • File I/O efficiency: Check scan/write node metrics for files read, bytes read, files written, bytes written. Calculate average file size — small files (< 3MB) are a common hidden bottleneck.
  • Join strategy: Look for SortMergeJoin nodes where one input is significantly smaller than the other. These may benefit from broadcast hints or AQE tuning.
  • Broadcast sizing: Check BroadcastExchange node data size metric. Broadcasts > 1 GB cause excessive memory pressure and network overhead.
  • Cross joins: Identify BroadcastNestedLoopJoin or CartesianProduct nodes. Calculate total scanned rows from input sizes — cross joins on large tables are extremely dangerous.
  • Filter complexity: Inspect Filter node conditions. Very long conditions (> 1000 chars) with large IN-lists or OR chains should be converted to joins.
  • Partition pruning: For Delta Lake and Iceberg tables, verify that scan nodes show partition filters being applied. Full scans on partitioned tables waste I/O.
  • Partition sizing: Check stage task distribution for oversized partitions (> 5GB). These cause OOM risk, long tail tasks, and GC pressure.

Use sql <exec-id> for node-level metrics and sql-plan <exec-id> --view final for post-AQE plan structure.

Lakehouse Awareness

When analyzing workloads on Delta Lake or Apache Iceberg tables:

Delta Lake

  • OPTIMIZE: Recommend OPTIMIZE for tables with small file problems detected in scan metrics
  • Z-ORDER: Check if queries filter on z-ordered columns; if not, the z-ordering provides no benefit
  • Liquid Clustering: For Databricks, check if cluster key filters are being applied in scans
  • Full scans: Flag scans on partitioned Delta tables without partition filters

Apache Iceberg

  • Copy-on-Write overhead: For update/delete workloads, check if files replaced >> records changed — this indicates COW overhead
  • Merge-on-Read: Recommend write.merge-mode=merge-on-read for update-heavy tables
  • Table maintenance: Recommend rewrite_data_files for small file compaction
  • Bulk replace detection: If > 60% of table files are replaced in a single operation, flag potential misuse

General Lakehouse Checks

  • File sizes in scan/write metrics (target ~128MB per file)
  • Partition filter pushdown in scan nodes
  • Table statistics availability for cost-based optimization

Gluten/Velox Awareness

When analyzing Gluten-accelerated applications:

  • Plan nodes: *Transformer and *ExecTransformer nodes indicate Gluten-offloaded operators
  • Fallback detection: Non-Transformer nodes in the final plan (e.g., SortMergeJoin instead of ShuffledHashJoinExecTransformer) indicate Gluten fallback — these are performance-critical to investigate
  • Columnar exchanges: ColumnarExchange and ColumnarBroadcastExchange are Gluten's native shuffle — look for VeloxColumnarToRow transitions which indicate fallback boundaries
  • Native metrics: Gluten stages may show different metric patterns (lower GC, different memory profiles) than vanilla Spark stages

References

  • references/diagnostics.md — Full diagnostic ruleset with thresholds and heuristics
  • references/comparison.md — TPC-DS benchmark comparison methodology

平台分布

Codex

33.07%
按下载量换算30

Claude

30.54%
按下载量换算28

Cursor

18.06%
按下载量换算16

Gemini CLI

9.82%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/yaooqinn/spark-history-cli --skill spark-advisor 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills