clean-csv-toolkit for Openclaw

A local, zero-dependency CSV, TSV, and JSONL data cleanup and inspection toolkit built entirely on the Python 3 standard library.

gopendrasharma89-tech
v0.5.0
May 21, 2026
1
1.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install clean-csv-toolkit

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install clean-csv-toolkit using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is clean-csv-toolkit?

The clean-csv-toolkit is a lightweight, secure utility collection engineered for AI agents to inspect, validate, and manipulate tabular data files without loading entire datasets into memory. It operates completely offline with no remote API or LLM calls, making it an excellent choice for privacy-centric environments utilizing Openclaw Skills.

By leveraging the Python 3 standard library rather than heavy frameworks like pandas, this tool processes files exceeding 100,000 rows in less than a second. It handles parsing, schema compliance, deduplication, merging, and transformations cleanly and safely, protecting workflows from shell injection vulnerabilities and memory exhaustion.

clean-csv-toolkit Use Cases

  • Data Profiling: Quickly inspect unknown data drops to detect file encoding, column types, missing values, and row counts.
  • Schema Validation: Implement automated data sanity checks within automated CI pipelines by verifying files against strict JSON schemas.
  • Data Cleaning & Enrichment: Deduplicate entries, filter records via a safe expression language, and compute derived columns without risk of code execution.
  • Data Translation: Seamlessly convert datasets among CSV, TSV, JSON Lines, JSON arrays, and GitHub-Flavored Markdown tables.

How clean-csv-toolkit Works

  1. Inspection and Dialect Auto-Detection: The toolkit checks the target file's structural metadata, establishing its dialect (CSV, TSV, or JSONL) and character encoding.
  2. Streaming and Processing: Actions like filtering, heading, and trailing stream data row-by-row using memory-efficient structures such as reservoir sampling and ring buffers.
  3. Safe Parsing and Calculation: Transformations and row selections pass through a hand-rolled tokenizer and recursive-descent parser, eliminating any reliance on dangerous Python eval routines.
  4. Structured Format Output: Processed data is exported cleanly into the specified format, outputting exact exit codes (0 for success, 1 for failures/differences, 2 for bad arguments) to ensure continuous shell pipeline usability.

clean-csv-toolkit Setup

Verify that Python 3 is installed and ready within your environment:

bash scripts/check_deps.sh

No additional pip configuration or third-party packages are required. The ecosystem relies entirely on standard libraries.

clean-csv-toolkit Data Schema & Taxonomy

The toolkit interacts dynamically with a configurable schema file for validation tasks. It parses JSON rules structured as follows:

Property Type Description
required_columns Array A list of headers that must be present in the document.
columns Object Map of column names containing rules such as type, min, max, regex, and unique.

Validation Error Architecture

When validation fails, structured reports or JSON outputs outline rows with issues using the following taxonomy:

  • bad_type: Value does not match the inferred or declared datatype.
  • regex_mismatch: Value fails to correspond with the expected regular expression pattern.
  • below_min / above_max: Numeric indicators fall outside bounds.
  • duplicate_unique: A constraint violation on a column requiring distinct rows.

clean-csv-toolkit Advanced Features

  • Safe Transform Matrix Engine: Add calculated metrics via expressions like profit = revenue - cost using built-in deterministic operations (coalesce, year, strip, replace).
  • Streamed Relational Joins: Merge separate files on single or multiple keys supporting inner, left, right, and outer strategies while controlling memory overhead.
  • Aggregation Cross-Tabs: Construct multi-variable group-by matrices and wide pivot reports with numeric-aware sorting directly inside terminal prompts.
  • Reservoir Sampling: Pull perfectly random, reproducible sample subsets from massive data streams using arbitrary --seed values to preserve analytical integrity.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins python3
Github Stars: 0
forks: 0

Featured*