Home / All Skills / Docs & Knowledge / csv-data-summarizer
Docs & Knowledge · coffeefuelbump/csv-data-summarizer-claude-skill

csv-data-summarizer

Analyzes CSV files, generates summary stats, and plots quick visualizations using Python and pandas.

L4 High-Privilege · Graded auth & full auditV1 Commit-PinnedExecute CommandInstall DepsWrite FileDual-pass Audit
Author coffeefuelbumpGitHub coffeefuelbump/csv-data-summarizer-claude-skill ↗Stars 465License 仓库内无 LICENSE 文件(git ls-tree 无 LICENSE);README 自述 'MIT License - feel free to use this skill for personal or commercial projects!',GitHub API license=nullCommit 9b3affd270
Control levels describe skill capabilities and suggested control measures; they do not represent quality or safety certifications, nor do they dictate usability. Usage decisions rest entirely with users and administrators. Different agent hosts apply varying constraints; do not assume hosts provide automatic protection. Third-party skill copyrights belong to their original authors. Use at your own risk.

1How It Works & Mechanism

The entire capability is implemented in a single 182-line pandas function `summarize_csv(file_path)`: read CSV → route through fixed branches by column type → assemble a string report, while saving plots via `plt.savefig` directly into the **current working directory** during execution.

analyze.py
def summarize_csv(file_path): """ Comprehensively analyzes a CSV file and generates multiple visualizations. Args: file_path (str): Path to the CSV file Returns: str: Formatted comprehensive analysis of the dataset """ df = pd.read_csv(file_path)
The report is built as a string array with piecewise appends (dozens of `summary.append(...)`), ending with `return "\n".join(summary)`. Plot file names and report text are hardcoded constants (correlation_heatmap.png / time_series_analysis.png / distributions.png / categorical_distributions.png).

Branching logic is strictly driven by column types or column name substrings rather than business or data semantics: numeric columns trigger statistics and correlations, object columns trigger value frequencies, and columns with 'date' or 'time' in their names trigger time-series analysis.

analyze.py
date_cols = [c for c in df.columns if 'date' in c.lower() or 'time' in c.lower()]
Supporting code: `numeric_cols = df.select_dtypes(include='number').columns.tolist()`, `categorical_cols = df.select_dtypes(include=['object']).columns.tolist()`, and columns containing 'id' in their names are subsequently filtered out (`categorical_cols = [c for c in categorical_cols if 'id' not in c.lower()]`).

The report content and sequence are fixed: dataset overview (shape/column names) → per-column dtype → missing value statistics → numerical describe → correlation matrix → categorical Top 10 values → time-series range → generated chart list.

analyze.py
summary.append("📊 DATA OVERVIEW")
The missing values section reports counts and percentages per column (`Missing values: {missing:,} ({missing_pct:.2f}% of total data)`), outputting `✓ No missing values - dataset is complete!` when no missing values exist.

Visualizations consist of four conditional charts: correlation heatmap (≥2 numeric columns), time-series line chart (date column present and numeric columns present, up to 3 series), numeric distribution histograms (2x2 grid, up to 4 columns), and categorical horizontal bar charts (2x2 grid, up to 4 columns).

analyze.py
plt.savefig('correlation_heatmap.png', dpi=150) plt.close() charts_created.append('correlation_heatmap.png')
All charts use `plt.savefig(...)` to relative paths followed by `plt.close()`. Maximum count limits are hardcoded via slices (`categorical_cols[:5]` in text, `value_counts.head(10)`, `numeric_cols[:3]/[:4]`).

'Do not ask the user' is mandated as a top-priority strict behavioral rule: SKILL.md uses all-caps paragraphs forbidding all questions and options, demanding immediate execution of the full analysis and delivery in a single turn.

SKILL.md
**DO NOT ASK THE USER WHAT THEY WANT TO DO WITH THE DATA.** **DO NOT OFFER OPTIONS OR CHOICES.**
The same section lists prohibited phrases ('What would you like me to do with this data?', 'Here are some common options:', etc.) and prohibited behaviors (listing options, awaiting user instructions, providing partial analysis). This represents the skill's clearest product philosophy: eliminating analysis-assistant confirmation fatigue through 'zero interaction'.

Trigger contexts are explicitly specified (uploading/referencing a CSV, asking to summarize/analyze/visualize, wanting to inspect data structure and quality), along with rules for detecting missing values and date columns.

SKILL.md
Claude should use this Skill whenever the user: - Uploads or references a CSV file - Asks to summarize, analyze, or visualize tabular data
Invocation is documented as 'The Skill provides a Python function summarize_csv(file_path)'—meaning the host Claude writes and executes code calling this function, rather than relying on a built-in CLI subcommand (analyze.py only accepts an optional path argument in `__main__`, defaulting to 'resources/sample.csv').

Distribution is handled via a zip archive uploaded to Claude.ai Skills, while identical source code is maintained in the repository; files inside the zip match the repository workspace byte-for-byte (verified).

README.md
2. Go to [Claude.ai](https://claude.ai) → Settings → Capabilities → Skills 3. Upload the zip file 4. Enable the skill
Verification: SHA-256 hashes of analyze.py, SKILL.md, and requirements.txt inside the zip match identical repository files exactly (see verification.second_pass). The zip contains SKILL.md, analyze.py, requirements.txt, and resources/{sample.csv,README.md}, mirroring the workspace structure minus examples/.

2Core Capabilities

01Generates a complete data health-check report in a single invocation: row/column dimensions, per-column types, missing value distribution, numeric descriptive statistics, and correlation matrix
02Automatically renders conditional visualizations (correlation heatmap / time-series line plot / numeric distribution histograms / categorical Top-N bar charts)
03Categorical column frequency breakdown (first 5 categorical columns, Top 10 values and percentages per column)
04Automatic date column identification and interval summary (identified when column names contain 'date' or 'time')
05Column-level missing value breakdown (counts + percentages) as part of data quality evaluation
06Runs independently outside the host environment (analyze.py includes a `__main__` entrypoint, defaulting to resources/sample.csv)
07Zero-interaction execution discipline: forbidden from asking questions, forbidden from offering options, required to return full results immediately

3External Dependencies

KindDependency / Endpoint
packagepandas
packagematplotlib
packageseaborn
network无:脚本不发起任何网络请求(无 URL 取数、无遥测、无外部 API);仓库内 URL 仅出现在 README/resources 的徽章与社区链接中

4Recommended Governance & Evidence

Suggested Controls for Safe Operation
For Agent Runtime
Graded/per-use authorization, sandbox recommended
For Administrators
Approval workflow, rollback support, full audit
Evidence & Triggers (File Paths & Excerpts)
  • scripts/: Executes local script or command: python analyze.py [csv_path] (defaults to resources/sample.csv)
  • scripts/ 或 SKILL.md: Declares dynamic installation of external language package dependencies
  • 本地工作目录: File I/O and artifact output: writes PNG files with fixed filenames to the **current working directory**: correlation_heatmap.png, time_series_analysis.png, dis
Audit Notes: Based on unified tiering: this skill is classified under 'Local-only tool / local file operations'—it utilizes pandas/matplotlib/seaborn locally for statistics and plotting, with no network outbound traffic, credential access, subprocessing, or arbitrary code execution surface; dependencies are official PyPI packages. It does not qualify for green tier solely because it executes Python scripts, writes fixed-name image files to the working directory (risking file overwrites), and requires installing three third-party libraries. With zero exfiltration and credential exposure, it does not meet yellow or orange trigger thresholds.

5Second-Pass Verification

  • [ok] 『无网络外发/无凭证读取』结论 — analyze.py imports 仅 pandas/matplotlib.pyplot/seaborn/pathlib;全仓(排除 .git)关键词扫描 requests|urllib|socket|http|subprocess|os.system|getenv|os.environ 零命中;URL 仅出现在 README/resources/README 的徽章与社区链接。
  • [discrepancy] 日期列判据与文档不符(实测) — SKILL.md Notes 写 'Automatically detects date columns (columns containing \'date\' in name)',实际代码是 "'date' in c.lower() or 'time' in c.lower()"。实测在仓库自带演示集上命中 **customer_lifetime_value**('life**time**' 含 'time'),随后 pd.to_datetime 把 2400 一类整数按纳秒解释成 1970 年,输出 'Date range: 1970-01-01 … to 1970-01-01 …'、'Span: 0 days',并据此画出无意义的时间序列图(实测 pandas 3.0.5;该行为与 pandas 2.x 一致:to_datetime(int) 亦按纳秒)。即 README 宣称该演示集『Perfect for showcasing time-series analysis』,实际触发的是误判列。
  • [discrepancy] 『自适应/智能识别行业数据类型』的能力声明 — SKILL.md 列出 Sales/E-commerce、Customer、Financial、Operational、Survey 五类数据的『相应分析』,README 写 'Automatically detects data type (sales, customer, financial, survey, etc.) and applies relevant analysis';但 analyze.py 没有任何行业或语义分类代码,全部行为由 dtype 与列名子串决定(number→describe/corr/hist,object→value_counts/barh,含 date|time→区间)。属**能力夸大**:它确实会因列构成不同而产出不同报告,但没有『识别数据类型』这一步。
  • [discrepancy] Notes『Generates visualizations only when date columns are present』 — 实际仅 time_series_analysis.png 需要日期列;distributions.png 只需数值列、categorical_distributions.png 只需分类列、correlation_heatmap.png 只需 ≥2 数值列。该句把条件说得比实现更严,属文档描述偏差(本身不影响使用)。
  • [discrepancy] SKILL.md『Files』清单与仓库实际文件 — SKILL.md 只列 analyze.py、requirements.txt、resources/sample.csv、resources/README.md;仓库另有 examples/showcase_financial_pl_data.csv(README 重点宣传的演示集)与 csv-data-summarizer.zip(分发包)。清单不完整。
  • [ok] 分发包与源码一致性 — zip 内 analyze.py(sha256 fa217db952541d59…)、SKILL.md(1599338ac2db52ba…)、requirements.txt(3787888dbf39eb94…)与工作区同名文件哈希完全相同;zip 结构为 SKILL.md/analyze.py/requirements.txt/resources/{sample.csv,README.md}。
  • [ok] 依赖声明三重一致 — SKILL.md frontmatter metadata(python>=3.8, pandas>=2.0.0, matplotlib>=3.7.0, seaborn>=0.12.0)与 requirements.txt 三行、README Technical Details 段逐项吻合;实际运行时三项库均被 import(seaborn 用于 heatmap,matplotlib 用于绘图)。
  • [ok] 写盘行为与覆盖风险 — 四处 plt.savefig 全部使用相对文件名(correlation_heatmap.png / time_series_analysis.png / distributions.png / categorical_distributions.png)+ dpi=150 + plt.close();不创建目录、不检查同名文件、不接受输出路径参数——已在 file_writes 与 risks 记入。

6Verdict & Scenarios

  • Zero friction: drop a CSV into the conversation to receive a complete report and multiple charts without answering any questions—eliminating the primary friction point of analytical assistants.
  • Minimalist, readable, and hackable implementation: a single 182-line file with no abstraction layers; anyone familiar with pandas can add domain-specific calculations or modify charts within minutes (modification steps are clearly outlined in resources/README).
  • Stable and complete report structure: fixed sequence across eight sections (dimensions, types, missing values, descriptive statistics, correlations, categorical frequencies, time intervals, chart inventory), making it easy to skim or parse programmatically.
  • Disciplined conditional output: plots are generated only when supported by the underlying data (no time series without dates, no heatmap without multiple numeric columns), preventing junk artifacts.
  • Entirely local execution with zero outbound traffic or credentials: well-suited for sensitive spreadsheets containing customer or financial fields (data never leaves the machine).
  • Best for: Ideal for: quickly surveying an unfamiliar CSV (columns, types, missing values, scale, preliminary correlations, and distributions); non-technical users seeking 'instant reports upon upload'; users processing sensitive tables (customer/financial data) locally without exfiltrating data; and developers wanting a minimal, easily modifiable single-file template for custom domain analysis scripts.
    Not for: Not suitable for: domain-specific business analytics (no industry logic included; requires manual extension); scenarios requiring rigorous statistical/causal inferences or anomaly testing (provides purely descriptive statistics without testing or disclaimers); massive or streaming datasets (loads entire file into memory without chunking); automated pipelines requiring deterministic output directories or file overwrite protection (filenames are hardcoded); and environments requiring multi-encoding/cross-locale character set robustness (relies on default pd.read_csv encoding assumptions).
    Install Agent-Ready
    ① Verified Mirror 2026-09-15
    Option A · Direct DownloadDownload csv-data-summarizer.tar.gz
    sha256: 812ec659a4b533a8…
    Option B · Copy Guide for Agent
    install.json
    Agents automatically download and verify mirrors from this JSON guide.
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit 9b3affd270.