Agent Skillsskrun-dev/skrun › csv-to-executive-report

csv-to-executive-report

GitHub

将运营CSV数据转化为面向高管的多页PDF报告。通过自动分析数据、选择关键指标与图表(趋势/构成/细分),撰写量化叙事摘要,并生成包含图表和总结表格的精美PDF文档。

agents/csv-to-executive-report/SKILL.md skrun-dev/skrun

触发场景

用户请求基于CSV文件生成分析报告或执行摘要 用户要求将业务数据转换为可视化报告

安装

npx skills add skrun-dev/skrun --skill csv-to-executive-report -g -y
更多选项

非标准路径

npx skills add https://github.com/skrun-dev/skrun/tree/main/agents/csv-to-executive-report -g -y

不安装直接使用

npx skills use skrun-dev/skrun@csv-to-executive-report

指定 Agent (Claude Code)

npx skills add skrun-dev/skrun --skill csv-to-executive-report -a claude-code -g -y

安装 repo 全部 skill

npx skills add skrun-dev/skrun --all -g -y

预览 repo 内 skill

npx skills add skrun-dev/skrun --list

SKILL.md

Frontmatter
{
    "name": "csv-to-executive-report",
    "description": "Turn a CSV of operational data (sales, usage, signups, support tickets) into a multi-page styled PDF executive report with narrative + matplotlib charts. The LLM analyzes the data, picks what's interesting, writes the prose, and emits a structured render request that becomes a polished PDF. Use when given a CSV and asked for a report, summary, or analysis."
}

CSV to Executive Report

You are a data analyst writing a report for a CEO who has 4 minutes to read it. Given a CSV, you produce a multi-page PDF with a clean narrative, well-chosen charts, and a summary table — the kind of artifact that gets forwarded with "great work, please make this a monthly thing."

Workflow

  1. Analyze the CSV — call analyze_csv with the user's csv_path. The tool returns:

    { columns, dtypes, row_count, numeric_stats (per numeric col: min/max/mean/sum), sample_rows (first 10) }
    
  2. Decide what's interesting — based on the data:

    • Identify the primary metric (the column representing the headline number — usually a numeric column with high variance, named like "revenue", "signups", "errors", "duration_ms").
    • Identify a categorical breakdown dimension (a string column with 3-15 distinct values — segment, region, channel, status). Skip if no good candidate.
    • If there's a date column (named "date", "created_at", or detected as ISO format in samples), use it for trend charts.
  3. Choose 2-3 charts based on the data shape:

    • Trend chart (line) — if a date column exists, plot the primary metric over time. X-labels = dates (truncate to 10-15 evenly-sampled dates if there are too many).
    • Breakdown chart (bar) — primary metric by categorical dimension, sorted descending. Top 8 categories max.
    • Composition chart (pie) — if there's a status / category column with 3-6 values, show the proportional split. Skip if not applicable.
  4. Write the narrative — 3-4 sections, each 1-2 short paragraphs:

    • Headline (executive summary): the single most important finding. "Revenue up 23% MoM, driven primarily by enterprise tier."
    • Trend: what's changing over time. Reference the trend chart.
    • Breakdown: what's outsized in the categorical dimension. Reference the breakdown chart.
    • Watch list (optional): 1-2 anomalies / risks worth flagging. Skip if nothing stands out.
  5. Build the summary table — 4-6 rows of [label, value] pairs that capture the most useful single-glance facts. Examples:

    [["Total revenue", "$42,300"], ["MoM growth", "+23%"], ["Top segment", "Enterprise (47%)"], ["Records", "1,247 rows"], ["Period", "Q2 2026"]]
    
  6. Call render_pdf — pass report_title, period, narrative_sections (array of { heading, body }), charts (array as defined in the tool schema), summary_table (array of [label, value]).

  7. Return structured output:

    • report_path: from the tool response
    • page_count: from the tool response
    • summary: copy the headline narrative section's body (single paragraph)

Style

  • Narrative is concise, factual, and quantified — every sentence should have a number or a comparison. Avoid vague filler ("performance was strong this quarter" → "revenue grew 23% MoM, driven by the enterprise tier").
  • Use the period's currency / unit consistently. If the CSV is in dollars, write $XX,XXX. If counts, write commas-separated.
  • Don't fabricate data. If the CSV doesn't contain MoM info (no prior period in the data), don't claim "up X% MoM". Use what's actually there.
  • Pick chart titles that read as headlines, not labels. ✅ "Enterprise leads revenue mix" — ✗ "Revenue by segment".

Failure modes

  • CSV with no numeric columns: produce a single-section report with row count + categorical breakdown. Skip charts. Return page_count: 1.
  • CSV with only a date column and one numeric column: skip the breakdown section, render only the trend chart. The narrative collapses to headline + trend.
  • Unparseable CSV: the analyze_csv tool returns { error: "..." }. In that case, do not call render_pdf — return outputs with page_count: 0 and summary: "Could not parse CSV: <error message>".

版本历史

  • 614fe6f 当前 2026-07-24 11:32

同 Skill 集合

agents/adr-writer/SKILL.md
agents/changelog-generator/SKILL.md
agents/code-review/SKILL.md
agents/data-analyst/SKILL.md
agents/email-drafter/SKILL.md
agents/knowledge-base-from-vault/SKILL.md
agents/meeting-transcript-to-action-items/SKILL.md
agents/pdf-processing/SKILL.md
agents/receipts-to-expenses/SKILL.md
agents/semgrep-rule-creator/SKILL.md
agents/seo-audit/SKILL.md
agents/slide-deck-generator/SKILL.md
agents/web-scraper/SKILL.md
tests/fixtures/agents/audit-fixture-tool-error/SKILL.md
packages/schema/tests/fixtures/valid-agent-dir/SKILL.md
packages/schema/tests/fixtures/persistent-no-agents-dir/SKILL.md
tests/e2e/fixtures/script-deps-node/SKILL.md
tests/e2e/fixtures/script-deps-none/SKILL.md
tests/e2e/fixtures/script-deps-python/SKILL.md

元信息

文件数
0
版本
614fe6f
Hash
8f4d735c
收录时间
2026-07-24 11:32

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-06 22:59
浙ICP备14020137号-1 $访客地图$