xsv

Processes CSV files with high-speed, Rust-based command-line tools.

40|12|Updated Oct 17, 2011
One-click install
npx skills add https://github.com/lanej/dotfiles --skill xsv
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xsv
Source: https://github.com/lanej/dotfiles/tree/main/claude/skills/xsv
Command: npx skills add https://github.com/lanej/dotfiles --skill xsv

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires xsv-cli.

What problem does it solve?

This Skill eliminates the frustration of slow, memory-intensive CSV processing with traditional tools. It provides a Rust-powered, command-line toolkit for lightning-fast data manipulation, enabling you to handle large datasets efficiently and automate complex transformations.

Core Features & Use Cases

  • High-Performance Filtering & Selection: Quickly select columns, filter rows by regex, and slice data ranges, even on multi-gigabyte files, with optional indexing for extreme speed.
  • Data Analysis & Statistics: Compute comprehensive statistics (mean, min, max, stddev, median, mode) and generate frequency tables for deep insights into your data.
  • Joining & Transformation: Combine multiple CSV files with various join types, concatenate data, sort records, and reformat output to different delimiters.
  • Use Case: Take a multi-gigabyte sales_data.csv file, extract only the 'CustomerID', 'Product', and 'Revenue' columns, filter for sales over $1000, and then calculate the total revenue per product, all in seconds.

Quick Start

From the 'data.csv' file, view the column headers, then count the total number of records.

Frequently Asked Questions about xsv

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I process large CSV files faster than traditional command-line tools?

CSV processing with xsv leverages Rust's performance to handle multi-gigabyte files in seconds. It streams data efficiently, avoiding memory bloat, and supports indexing for instant random access to rows without scanning the entire file.

Can I filter and select specific columns from a CSV in one command?

Yes, xsv filters rows by regex patterns and selects columns by name or position in a single pipeline. Combine `search`, `select`, and `slice` commands to extract and transform data without intermediate files.

What's the best way to join multiple CSV files together?

xsv supports multiple join types to combine datasets on common columns. Use the `join` command to merge files by key, then sort, concatenate, or reformat output to different delimiters for downstream analysis.

How do I compute statistics like mean, median, and standard deviation on CSV data?

The `stats` command calculates comprehensive statistics—mean, min, max, stddev, median, mode—across numeric columns. Generate frequency tables to identify patterns and outliers in your dataset instantly.

Does xsv work on datasets larger than memory?

Yes, xsv processes streaming data without loading entire files into memory, making it suitable for gigabyte-scale CSVs. Optional indexing further optimizes performance for repeated queries on the same file.

What commands does xsv provide for data transformation?

xsv includes 20+ composable commands: `select`, `search`, `sort`, `join`, `slice`, `stats`, `frequency`, `count`, `fmt`, and others. Chain them into pipelines to accomplish complex transformations in seconds.