# @6171/csv Tools

> View, filter, merge, convert, and analyze CSV files. Use when the user needs to work with CSV data — inspect structure, filter rows, merge files, compute stats, or convert to JSON/JSONL.

- Skill: `starchild-ai-agent/6171-csv-tools` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add starchild-ai-agent/6171-csv-tools`
- Raw SKILL.md: https://api.skillmd.com/api/skills/starchild-ai-agent/6171-csv-tools/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: starchild-ai-agent (https://skillmd.com/u/starchild-ai-agent)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/starchild-ai-agent/6171-csv-tools

---


# CSV Tools

## Core Capabilities

| Action | Description | Command |
|--------|-------------|---------|
| **Info** | Get row count, columns, headers, file size | `--action info --input file.csv` |
| **View** | Preview rows with pagination | `--action view --input file.csv --limit 10` |
| **Filter** | Filter rows by column value | `--action filter --input file.csv --column City --value "Beijing"` |
| **Merge** | Combine multiple CSV files | `--action merge --inputs a.csv b.csv --output merged.csv` |
| **Stats** | Column statistics (numeric or text) | `--action stats --input file.csv --column Price` |
| **Convert** | CSV → JSON or JSONL | `--action convert --input file.csv --to json` |

## Usage

```bash
# Quick info
python3 skills/csv-tools/scripts/csv_tools.py --action info --input data.csv

# View first 10 rows
python3 skills/csv-tools/scripts/csv_tools.py --action view --input data.csv --limit 10

# Filter rows
python3 skills/csv-tools/scripts/csv_tools.py --action filter --input data.csv --column City --value "Beijing" --output filtered.csv

# Merge two CSVs
python3 skills/csv-tools/scripts/csv_tools.py --action merge --inputs a.csv b.csv --output combined.csv

# Column stats
python3 skills/csv-tools/scripts/csv_tools.py --action stats --input sales.csv --column Revenue

# Convert to JSON
python3 skills/csv-tools/scripts/csv_tools.py --action convert --input data.csv --to json --output data.json

# Handle TSV (tab-separated)
python3 skills/csv-tools/scripts/csv_tools.py --action info --input data.tsv --delimiter $'\t'
```

## Gotchas

- **Encoding**: auto-detects UTF-8 BOM. For other encodings, convert first.
- **Large files**: `view --limit` and `filter` with output are safe for large files (streaming). `stats` loads all rows.
- **Merge** requires same column headers across all files.
- **Stats numeric** auto-detects by trying to parse numbers (strips `$`, `,`, `¥`).
- **TSV files**: use `--delimiter $'\t'`
