csv-transform

csv-transform is a command for coding agents from sigistry/marketplace. It costs 32 tokens per session (1,744 once invoked), scanned A, original, MIT.

Process CSV/TSV files with filtering, column selection, aggregation, and format conversion. Clean data, merge files, and transform to JSON/Excel formats.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/sigistry/marketplace/csv-transform
Clone the repo
git clone --depth 1 https://github.com/sigistry/marketplace

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for csv-transform

README.md
[![agentmods](https://agentmods.dev/badge/commands/sigistry/marketplace/csv-transform.svg)](https://agentmods.dev/commands/sigistry/marketplace/csv-transform)
Your own site
<a href="https://agentmods.dev/commands/sigistry/marketplace/csv-transform"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/csv-transform.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,744 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.01744
Opus 5 $0.00016 $0.00872
Sonnet 5 $0.00006 $0.00349
Haiku 4.5 $0.00003 $0.00174

Measured today against content hash 29651d3e9126, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

csv-transform scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/data-converter/commands/csv-transform.md · 274 lines

How it starts

The opening of the file, as written. The whole thing — 274 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a CSV data processing expert. Help users analyze, transform, filter, and convert CSV/TSV data files with powerful operations.

Your Task

When the user invokes this command, you should:

  1. Understand the Request: Identify which CSV file(s) to process and what operation is needed
  2. Parse the Data: Read CSV with proper delimiter and header detection
  3. Process Data: Apply transformations, filters, or aggregations
  4. Output Results: Display or save in requested format

Common CSV Operations

Data Exploration

  • Show first N rows (preview)
  • Display column names and types
  • Show basic statistics (count, unique values, null count)
  • Detect data quality issues

Filtering & Selection

  • Select specific columns
  • Filter rows by conditions
  • Remove duplicate rows
  • Handle missing/null values
  • Sample random rows

Transformations

  • Rename columns
  • Add calculated columns
  • Sort by column(s)
  • Group and aggregate
  • Pivot tables
  • Split columns
  • Merge/join multiple CSV files

Format Conversions

  • CSV to JSON (array or object-per-line)
  • CSV to Excel (XLSX)
  • CSV to Markdown table
  • CSV to SQL INSERT statements
  • TSV to CSV (and vice versa)
  • Change delimiters/encodings

Implementation Approach

1. Read CSV Data

For Node.js, use built-in parsing or suggest libraries:

import fs from 'fs';
import { parse } from 'csv-parse/sync';

const content = fs.readFileSync('data.csv', 'utf8');
const records = parse(content, {
  columns: true,  // Use first row as headers
  skip_empty_lines: true,
  trim: true
});

2. Common Transformations

Select columns:

const selected = records.map(row => ({
  name: row.name,
  email: row.email
}));

Filter rows:

const filtered = records.filter(row =>
  parseInt(row.age) >= 18 && row.country === 'USA'
);

Sort data:

const sorted = records.sort((a, b) =>
  parseInt(b.score) - parseInt(a.score)
);

Group and aggregate:

const grouped = records.reduce((acc, row) => {
  const key = row.category;
  if (!acc[key]) acc[key] = { category: key, count: 0, total: 0 };
  acc[key].count++;
  acc[key].total += parseFloat(row.amount);
  return acc;
}, {});

Read the full file on GitHub · 274 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 274 lines · 32 tokens per session scan A 29651d3e9126

Subscribe to this mod's changes

csv-transform is a command published in the GitHub repository sigistry/marketplace (3 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 1,744 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.