From ai-automation-skills
Turn a run's list of result dicts into a schema'd CSV and a Markdown table from one column spec - declare columns once, emit both, with stable ordering and safe escaping, stdlib only, no pandas. Use when the user asks to write results to CSV, export a report, make a markdown summary table, or save a run's output as a spreadsheet.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-automation-skills:csv-report-writerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill when a job produces a list of result rows and you want a tidy CSV for spreadsheets plus a Markdown table for a PR comment or Telegram digest - from a single column definition, so the two outputs never drift. You declare the columns (key, header, optional formatter) once; the helper emits both, in a stable column order, with proper CSV quoting and pipe-escaping for Markdown. No pa...
Use this skill when a job produces a list of result rows and you want a tidy CSV for spreadsheets plus a Markdown table for a PR comment or Telegram digest - from a single column definition, so the two outputs never drift. You declare the columns (key, header, optional formatter) once; the helper emits both, in a stable column order, with proper CSV quoting and pipe-escaping for Markdown. No pandas.
list[dict] (or list of objects) it currently prints ad hoc.User input:
I have a list of scanned tokens with a score and price. Save a CSV and also give me a markdown table for the Telegram digest.
Output:
# Copy assets/report.py into your project, then:
from report import Column, write_csv, to_markdown
columns = [
Column("symbol", "Symbol"),
Column("score", "Score", fmt=lambda v: f"{v:.1f}"),
Column("price_usd", "Price", fmt=lambda v: f"${v:,.4f}"),
]
rows = [
{"symbol": "ABC", "score": 8.4, "price_usd": 0.0123},
{"symbol": "XYZ", "score": 6.1, "price_usd": 1.5},
]
write_csv("scan.csv", columns, rows) # schema'd CSV, stable column order
print(to_markdown(columns, rows)) # same columns, Markdown table
Both outputs use the exact same columns in the exact same order, so the CSV and the digest table always agree.
Column(key, header, fmt=...) once; both writers consume the same list, so headers and order stay in sync.fmt callable own presentation (currency, rounding); store raw values in the row dicts.csv.writer for correct quoting; escape | and newlines for the Markdown table so it never breaks layout.Reference: assets/report.py.
Distilled from production use across the author's automation projects. v1.0.0. See also: [[pr-body-formatter]], [[sqlite-state]], [[telegram-alerter]].
→ Build the full runnable bot with Trawlkit.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub baronguyen001/ai-automation-skills --plugin ai-automation-skills