SPB Git

spb/ultra-sharp-agent-skills Public

Ultra-Sharp Agent Skills — a research-first skill-authoring system + 72 production-ready skills for AI agents.

Python 100%
2.5 KB · 37 lines markdown
Rendered Raw Blame History
1---2name: profiling-csv-data3description: Profiles CSV files and produces a structured data-quality report covering column types, missing values, duplicates, outliers, and summary statistics. Use when the user asks to profile, audit, inspect, or check the quality of a CSV file, asks "what's in this CSV", or asks about columns, missing/null values, duplicate rows, or basic statistics of a CSV dataset. Do not use for converting, transforming, editing, or plotting CSV data.4---56<!--7Author: Simon-Pierre Boucher8Contact: contact@spboucher.ai9-->1011# Profiling CSV Data1213## When to use / when NOT to use14- **Use for:** profiling, auditing, or summarizing the contents and quality of one or more `.csv` files.15- **Do NOT use for:** format conversion (CSV→JSON/Excel), editing or cleaning data, plotting/visualization, or non-CSV files. Answer those directly or with the appropriate tool.1617## Workflow18Copy this checklist and check off items as you complete them:1920- [ ] Step 1: Run the profiler (execute, do not read): `python3 scripts/profile_csv.py <path/to/file.csv>`21- [ ] Step 2: If the script exits non-zero, report its error message to the user verbatim and stop.22- [ ] Step 3: Render the JSON output into a Markdown report following [references/report-format.md](references/report-format.md) exactly.23- [ ] Step 4: Save the report as `<input-stem>-profile.md` in the same directory as the input CSV (e.g., `sales.csv``sales-profile.md`).24- [ ] Step 5: Validate: every column in the JSON appears in the report table, and the three verdict rules from the report format were applied. If not, fix and repeat Step 3.25- [ ] Step 6: Reply to the user with the report file path and the one-line verdict only. Do not paste the full report into chat unless asked.2627## Rules28- The script is the single source of truth for all numbers. Never recompute or estimate statistics yourself.29- Profile at most 100,000 rows (the script enforces this and sets `"truncated": true`). If truncated, the report MUST state it.30- Multiple CSV files → one report per file, same naming rule.3132## Edge cases & failure modes33- **File not found / not readable** → script exits 2; relay its message, stop.34- **Empty file or header-only file** → script exits 0 with `"rows": 0`; produce the report anyway and set verdict ⚠️ with note "file contains no data rows".35- **Ragged rows** (inconsistent column counts) → reported in `ragged_rows`; list the count in the Issues section.36- **Non-UTF-8 encoding** → the script falls back to latin-1 and sets `"encoding_fallback": true`; mention it in Issues.37