agentleFS
wwumitwwumit/skills-tools/skills/csv-tools/SKILL.md

csv-tools

Skill0 starsChanged 3 months agoMITView on GitHub

CSV 工具集 v1.1.0 — 子命令+安全增强。 预览、筛选、排序、合并、分割、去重、验证、统计、 列操作(重命名/选择/计算列)、类型检测、数据画像、抽样。 纯Python标准库(csv模块),无外部依赖。

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All write operations go to user-specified --output paths only

    line 139
  2. Very specific:

    Default output is stdout when no --output is specified

    line 141
  3. Distinctive:

    All scripts require explicit user-provided file paths — no auto-scanning of filesystem

    line 143

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

📊 CSV Tools v1.1.0

Overview

12个子命令覆盖日常CSV数据处理的完整工作流——从预览、筛选、排序到统计、类型检测、数据画像和抽样。所有操作基于Python标准库csv模块,无需安装任何第三方依赖。

Usage

stats — 列统计 (NEW)

python3 scripts/csv_tools.py stats data.csv

# 📊 Column Statistics — data.csv
#    [amount] — 数值列
#      计数: 1000 | 空: 0 | 总和: 485,230.00
#      平均: 485.23 | 中位: 320.00
#      最小: -8,500.00 | 最大: 25,000.00 | 标准差: 1,234.56
#    [name] — 文本列
#      非空: 980 | 空: 20 | 唯一值: 450
#      最常见: "张三" (15次)

columns — 列操作 (NEW)

# 重命名 + 选择列
python3 scripts/csv_tools.py columns data.csv \
  --rename "old_name=new_name" --select "id,name,amount"

# 添加计算列
python3 scripts/csv_tools.py columns data.csv \
  --add "total=price * quantity" --output result.csv

detect — 类型检测 (NEW)

python3 scripts/csv_tools.py detect --verbose data.csv

# 🔎 Data Type Detection — data.csv
#    [amount] → 浮点数(Float)
#    [date] → 日期(Date)
#    [is_active] → 布尔(Boolean)
#    [name] → 文本

profile — 数据画像 (NEW)

python3 scripts/csv_tools.py profile data.csv

# 📋 Data Profile — data.csv
#    Rows: 1000 | Columns: 8
#    [email]
#      非空: 850 / 1000 (████████████████████ 15% 缺失)
#      唯一值: 830 (98%)
#      最常见: "user@example.com"(3), ...

sample — 随机抽样 (NEW)

# 随机抽10条
python3 scripts/csv_tools.py sample data.csv --n 10 --method random

# 等距抽50条
python3 scripts/csv_tools.py sample data.csv --n 50 --method systematic --output sample.csv

原有命令

python3 scripts/csv_tools.py preview data.csv
python3 scripts/csv_tools.py filter data.csv --where "status=active"
python3 scripts/csv_tools.py sort data.csv --by "date" --desc
python3 scripts/csv_tools.py merge a.csv b.csv --output merged.csv
python3 scripts/csv_tools.py split data.csv --chunk-size 1000
python3 scripts/csv_tools.py dedup data.csv --on "email"
python3 scripts/csv_tools.py validate data.csv

Use Cases

  • 数据导入前清洗: dedup + validate + sort
  • ETL管线: split 大文件 → merge 多个源 → stats 检查分布
  • 数据质量审计: profile 检查缺失率 → detect 确认类型
  • 探索性分析: preview 快速查看 → stats 列统计 → sample 抽样

Security

Usage Boundaries

  • This skill is designed for CSV files only — CSV, TSV, and pipe-delimited text
  • It should NOT be used for non-tabular text, binary files, or structured data in other formats
  • Input files must be explicitly specified by the user — no auto-scanning
  • For simple data inspection (e.g. view first 5 rows), system tools (cat/head) are preferred

Declared Capabilities

ScriptPurposeInputOutputNetworkFilesystem WriteConstraints
csv_tools.pyCSV读写操作File path(s) or stdinCSV file / JSON / stdoutNoYes (user-specified paths only)Writes only to --output paths; never modifies input files; no overwrite without explicit user confirmation

Explicitly Denied

  • ❌ No network access (no HTTP, socket, or API calls)
  • ❌ No arbitrary code execution via exec()/eval() (使用安全数学解析器,无 eval)
  • ❌ No system commands via subprocess/shell
  • ❌ No telemetry or usage reporting
  • ❌ No auto-writes to input files (only writes to --output paths)
  • ❌ No writes outside the working directory without user confirmation
  • ❌ No file deletion or modification of existing data

Permission Boundaries

  • All write operations go to user-specified --output paths only
  • Input files are read-only; never modified
  • Default output is stdout when no --output is specified
  • Temporary files (if any) are cleaned up after operation
  • All scripts require explicit user-provided file paths — no auto-scanning of filesystem

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.