- Home
- Skills
- Data & Databases
- Decimal CSV/ETL & Quarantine Pipeline
Decimal CSV/ETL & Quarantine Pipeline
Stop float rounding drift, silent row drops, and duplicate cron imports in Python CSV pipelines.
$12
Decimal CSV/ETL & Quarantine Pipeline
Example session with this skill installed
Audit my etl_script.py for financial data traps and then generate a command to ingest orders.csv using EU locale and DMY dates into a local ledger.sqlite3 database.
- Read your context and instructions
- Compiled the decimal csv etl
- Generated the data export
I have completed the static audit of etl_script.py and prepared the ingestion command for your European order data.
The audit identified two critical risks: the use of float for currency columns which will cause rounding drift, and a missing busy_timeout on the SQLite connection which may lead to locking failures during concurrent writes.
ETL Audit and Ingestion Plan
Audit Results for etl_script.py
| ID | Severity | Finding | Recommendation |
|---|---|---|---|
| ETL-001 | HIGH | Float coercion detected on line 42 | Use decimal.Decimal with explicit quantization |
| ETL-003 | MEDIUM | Missing utf-8-sig handling | Use encoding="utf-8-sig" to handle Excel BOMs |
| ETL-004A | MEDIUM | No SQLite busy_timeout | Set PRAGMA busy_timeout=5000 for WAL safety |
Ingestion Command
# Ingesting with EU locale (1.234,56) and DMY dates (31/12/2023)
python3 scripts/quarantine_etl.py \
--input orders.csv \
--schema assets/sample_schema.json \
--out-dir ./out \
--db ./out/ledger.sqlite3 \
--locale eu \
--date-order dmy \
--delimiter ";" \
--json
Next steps
- Refactor
etl_script.pyto replacefloat()calls withdecimal.Decimal. - Run the ingestion command and check
./out/quarantine.csvfor any rows that failed the locale validation. - Verify the
ledger.sqlite3contents to ensure the SHA-256 fingerprints correctly prevented duplicate entries.
quarantine.csv
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop losing financial data to silent rounding errors and failed batch imports. This skill provides a specialized pipeline for ingesting messy CSV data into SQLite with absolute precision and crash-safety. It replaces fragile float math with strict decimal.Decimal logic and ensures every row is either safely committed or formally quarantined.
What it does
- Strict Decimal Parsing converts currency and quantity strings directly into
decimal.Decimalto eliminate binary floating-point drift in accounting. - Row-Level Quarantine routes malformed or ambiguous rows to a structured
quarantine.csvwith line numbers and error codes instead of aborting the job. - Idempotency Guarding uses SHA-256 content fingerprints and SQLite WAL mode to prevent duplicate imports from retried crons or webhooks.
- Locale Normalization handles mixed US/EU decimal separators and ambiguous date formats through explicit configuration rather than guessing.
- Static Code Auditing scans existing Python ETL scripts for common traps like missing BOM handling, broad exceptions, or unsafe SQLite locking.
How it works
- Audit existing code using the AST scanner to identify
ETL-001(float money) orETL-004(unsafe SQLite locks) defects. - Configure the ingestion schema and locale settings to match the source data's decimal and date conventions.
- Execute the quarantine pipeline to process CSV inputs, populating the SQLite ledger and generating a quarantine report for invalid rows.
- Verify idempotency by re-running the same input to confirm zero new insertions and zero data corruption.
Frameworks & tools
Python 3.10+ standard library. Uses decimal, sqlite3 in WAL mode, hashlib, and ast for static analysis. Zero external dependencies or network access required.
Why this beats prompting it yourself
Prompting an LLM for ETL logic often results in code that uses pandas defaults or simple float() casts, leading to 0.01 rounding errors. This skill enforces specific SQLite BEGIN IMMEDIATE patterns and utf-8-sig handling that are frequently overlooked in generic AI-generated code.
Use cases
- Ingesting financial CSVs with mixed separators without rounding drift.
- Deduplicating recurring batch imports using collision-free fingerprints.
- Handling malformed rows in high-volume pipelines without dropping data.
- Auditing legacy Python scripts for monetary and crash-safety bugs.
Known limitations
Requires Python 3.10 or higher. Designed for CSV and SQLite workflows only. Does not support non-relational destinations or Excel (.xlsx) files directly without conversion to CSV.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 8 days ago
- Software
Python 3.10+
Permissions
What's inside
Frequently Asked Questions
New in Data & Databases
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.