csv-metrics
Compute summary statistics for a CSV and write a JSON + markdown report. Use when the user asks to analyze, summarize, profile, or compute metrics for a CSV / tabular dataset.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- csv-metrics
- description
- Compute summary statistics for a CSV and write a JSON + markdown report. Use when the user asks to analyze, summarize, profile, or compute metrics for a CSV / tabular dataset.
02 资源文件 1
- 脚本scripts/metrics.py4.5 KB
03 SKILL.md 正文
csv-metrics
Profiles a CSV and writes two deliverables: a structured metrics.json and a
human-readable summary.md. The work is done by a bundled producer script
(scripts/metrics.py) — you run it, you don't reimplement it.
When to use
The user has a CSV (in uploads/ or a connected project folder) and wants
per-column statistics or a metrics report.
How to run
-
Locate the CSV. Default for this example:
uploads/sales.csv. -
Run the bundled producer, passing the CSV and the output directory. The script lives under this skill's
scripts/folder, reachable via${CLAUDE_PLUGIN_ROOT}:S="${CLAUDE_PLUGIN_ROOT}/skills/csv-metrics/scripts/metrics.py" [ -f "$S" ] || S="$(find /sessions/*/mnt/.local-plugins /sessions/*/mnt/.remote-plugins \ -path '*/skills/csv-metrics/scripts/metrics.py' 2>/dev/null | head -1)" python3 "$S" uploads/sales.csv outputsIn Cowork's default host-loop mode the bash tool rewrites the host path the agent writes in for
${CLAUDE_PLUGIN_ROOT}to the plugin's mount inside the VM, so the first line finds the script; the second line is the fallback for a Desktop older than 1.40609.0, or a plugin whose mount path the rewrite skips, and finds the script at that mount.It writes
outputs/metrics.jsonandoutputs/summary.mdand prints a one-line summary. -
Read
outputs/summary.md, then reply with a single line that includes the row count and the pathoutputs/metrics.json.
Constraints
- The producer uses only the Python standard library — no
pip install, no network. That is deliberate: under Cowork the agent runs with default-deny egress and no pypi access, so a skill's producer must be self-contained. - Treat
outputs/as write-once for the deliverable: don't delete or rewrite the files after the producer emits them.
04 同仓库更多 Skills
standalone-skill
fixture skill for collectArtifactSources — proves scripts/ is reached
skill-b
fixture skill B — sibling of skill-a, must be excluded when the target is skill-a directly
skill-a
fixture skill A — has a candidate source under scripts/
csv-report
Profile an uploaded CSV and write a metrics file, a summary and a short insights note. Use when the user asks to analyze, summarize or report on a CSV / tabular dataset.
csv-audit
Audit outputs/metrics.json for data-quality problems and return a findings list. Use when asked to audit CSV metrics.
my-pdf-skill
Example skill under test. Summarize a PDF and write action items.