csv-query

csv-query is a skill for Claude Code from Kilo-Org/kilo-marketplace. It costs 19 tokens per session (1,711 once invoked), scanned A, original, Apache-2.0.

A way to query CSV, TSV, and Excel files with SQL using a Polars-based command-line tool. SQL is a language for selecting, filtering, joining, and summarizing table data.

In plain words
What is it for?
Use it to filter, join, group, sort, inspect, validate, and export data from CSV, TSV, or Excel files.
Why use it?
It lets you answer questions about tabular files without first loading them into a database. Profiling and validation steps help you understand the file before querying it.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Good fit Use it to filter, join, group, sort, inspect, validate, and export data from CSV, TSV, or Excel files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kilo-org/kilo-marketplace/csv-query
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.

Any agent
npx skills add Kilo-Org/kilo-marketplace --skill csv-query
Clone the repo
git clone --depth 1 https://github.com/Kilo-Org/kilo-marketplace

Made for: Claude Code.

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-query

README.md
[![agentmods](https://agentmods.dev/badge/skills/kilo-org/kilo-marketplace/csv-query/github.svg)](https://agentmods.dev/skills/kilo-org/kilo-marketplace/csv-query)
Your own site
<a href="https://agentmods.dev/skills/kilo-org/kilo-marketplace/csv-query"><img src="https://agentmods.dev/badge/skills/kilo-org/kilo-marketplace/csv-query/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for csv-query

Your own site · 80×15
<a href="https://agentmods.dev/skills/kilo-org/kilo-marketplace/csv-query"><img src="https://agentmods.dev/badge/skills/kilo-org/kilo-marketplace/csv-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,711 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original 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.1 $0.00019 $0.01711
Opus 5 $0.00010 $0.00856
Sonnet 5 $0.00004 $0.00342
Haiku 4.5 $0.00002 $0.00171

Measured 8d ago against content hash 4803807bd405, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

csv-query 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 8d ago.

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.

skills/csv-query/SKILL.md · 132 lines

How it starts

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

CSV Query

Query tabular data files using SQL via the Polars-powered sqlp command.

Cowork note: If relative paths don't resolve, call mcp__qsv__qsv_get_working_dir and mcp__qsv__qsv_set_working_dir to sync the working directory.

Decision Tree

Is the query simple (single column filter, basic select)?

  • Yes -> Consider select + search for simpler operations
  • No -> Use sqlp for full SQL support

Does the query involve joins, GROUP BY, window functions, or complex expressions?

  • Yes -> Use sqlp (Polars SQL engine)

Is the CSV file very large (> 10MB)?

  • Yes -> Consider converting to Parquet with mcp__qsv__qsv_to_parquet for faster repeated queries. Note: sqlp can also query CSV files of any size directly.

Steps

  1. Prepare the file: Run mcp__qsv__qsv_index and mcp__qsv__qsv_stats with cardinality: true, stats_jsonl: true to create index and stats cache.

  2. Read the stats cache: Read <FILESTEM>.stats.csv (e.g., data.stats.csv for data.csv) to understand column metadata before writing SQL. This is the most important step for writing efficient queries.

  3. Run frequency on key columns: For columns you plan to GROUP BY, filter on, or join on, run mcp__qsv__qsv_frequency to see actual value distributions. This reveals the best filter values and whether a GROUP BY will produce a manageable result set.

  4. Write and run SQL: Use mcp__qsv__qsv_sqlp with the SQL query informed by stats and frequency data. The table name in SQL is the filename stem (e.g., data.csv -> SELECT * FROM data). For Parquet files, use read_parquet('data.parquet') as the table source instead.

  5. Refine if needed: Check results and adjust the query.

Using Stats to Write Better SQL

After reading the .stats.csv cache, use these columns to inform your SQL:

Stats Column How to Use in SQL
type Use correct casts and comparisons — don't quote integers, use date functions for Date/DateTime columns
min / max Write precise WHERE clauses using actual data range (e.g., WHERE price BETWEEN 10.5 AND 999.99 instead of arbitrary bounds)
cardinality Estimate GROUP BY result size — low cardinality (< 100) is fast; high cardinality (> 10K) may need LIMIT or a different approach
nullcount Only add COALESCE or IS NOT NULL where nullcount > 0 — skip null handling for columns with zero nulls
sort_order Skip ORDER BY if data is already sorted on that column (sort_order = "Ascending"/"Descending")
mean / stddev Write outlier filters: WHERE col BETWEEN mean - 3*stddev AND mean + 3*stddev
median / q1 / q3 For skewed data (when mean and median diverge), use quartile-based ranges: WHERE col BETWEEN q1 AND q3 instead of mean ± stddev
skewness If skewness > 1 or < -1, prefer median/quartile-based filters over mean-based ones
cv High CV (> 100%) signals high relative variability — add LIMIT to GROUP BY queries and consider binning continuous values
outliers_percentage If > 5%, consider excluding outliers before aggregation: WHERE col BETWEEN lower_inner_fence AND upper_inner_fence
sparsity Columns with sparsity > 0.5 are mostly null — avoid using them as join keys or GROUP BY columns

Read the full file on GitHub · 132 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 132 lines · 19 tokens per session scan A 4803807bd405

Subscribe to this mod's changes

csv-query is a skill published in the GitHub repository Kilo-Org/kilo-marketplace (175 stars, last pushed 22d ago), licensed Apache-2.0. It adds 19 tokens to every session and 1,711 once invoked, about $0.0001 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.