GPT 6 FIELDGUIDE

CSV quality triage

Original · Operations

Profile small CSV datasets while preserving missing values, duplicate keys and currency boundaries.

What this skill does

Profile small CSV datasets while preserving missing values, duplicate keys and currency boundaries.

Best for:
Transaction exports before cleaning or aggregation.
Tools and setup:
Text and file reading. A standards-compliant CSV parser with decimal arithmetic is recommended.
Using it with GPT 6:
Self-contained Markdown instructions for skill-capable agents. Sample explicitly executed in Codex; host file access determines installation support.

Downloads and files

MIT License · Source repository

Complete SKILL.md

---
name: csv-quality-triage
description: Profile small CSV datasets while preserving missing values, duplicate keys and currency boundaries.
---

# CSV quality triage

Use this skill when a user requests a quality review of CSV data before analysis, import, or reporting. It profiles the supplied data and proposes repairs; it does not silently clean rows or replace the source file.

## Inputs and parsing
Identify the expected columns, candidate key, required fields, and the meaning of amounts. Use a CSV parser that respects quoted delimiters and embedded newlines; do not split raw text on commas. Number data records starting at one, excluding the header, and use those record numbers consistently. If no schema is given, label inferred requirements as assumptions.

## Workflow
Count records and inspect each relevant column for blanks, parse failures, and unexpected values. Distinguish missing numeric values from zero. Group duplicate candidate keys and compare their complete records: identical duplicates and conflicting duplicates need different remediation. Preserve the original strings for evidence.

For amounts, use decimal arithmetic where available, retaining the currency column. Report totals separately by currency and identify exactly which records entered each total. Do not add unlike currencies or invent exchange rates. Negative values may be refunds rather than errors; interpret them only against the supplied contract. When duplicate keys exist, label totals that include them as raw totals and do not present them as settled business metrics.

## Output contract
Return the parsed record count, field assumptions, findings with record references, per-currency arithmetic where requested, and proposed next actions. State how blanks and duplicates affect each calculation. Produce a cleaned dataset only when requested and when the repair rule is explicit; otherwise retain ambiguous records. Before delivery, reconcile accepted, missing, and invalid amounts with the record count and show enough arithmetic for a reviewer to reproduce the results without relying on a pass label.

Reproduce the example

Example input

# Synthetic CSV quality request
Review example-input.csv. Required: invoice_id, amount, currency. Candidate key: invoice_id. Negative amounts are valid refunds. Report raw currency totals without deleting rows. Blank amount is missing, never zero.

```csv
invoice_id,amount,currency,note
A1,10.00,USD,"first, order"
A2,,USD,pending
A1,10.00,USD,"first, order"
A3,20.00,EUR,sale
A4,-5.00,USD,refund
A5,0.00,EUR,waived
```

Example output

# Synthetic CSV quality triage
Parsed 6 data records, excluding the header. The quoted note “first, order” remains one field. Required fields and candidate key come from the request, not inference.

## Findings
- Records 1 and 3 share invoice_id A1 and are identical across all four fields. This is one duplicate-key group with one excess occurrence; neither row was removed.
- Record 2 (A2) has a missing amount. It is excluded from amount sums, not converted to zero.
- Record 5 has -5.00 USD, a valid refund under the supplied contract.
- Record 6 has 0.00 EUR, a valid zero amount, included in the EUR total.
- All invoice_id and currency values are present. Five amounts parse as decimal numbers; one is missing; none are invalid. Currency values are USD and EUR.

## Raw totals, duplicates retained
| Currency | Included records | Arithmetic | Raw total | Limitation |
| --- | --- | --- | --- | --- |
| USD | 1, 3, 5 | 10.00 + 10.00 - 5.00 | 15.00 USD | Includes duplicate A1; excludes missing record 2 |
| EUR | 4, 6 | 20.00 + 0.00 | 20.00 EUR | Includes valid zero |

No combined total is meaningful without an explicitly chosen exchange-rate contract. These are raw data totals, not reconciled revenue.

Next actions: confirm whether A1 is a repeated export or a legitimate repeated transaction; obtain the missing A2 amount from its source. Keep the source unchanged until the repair rule is agreed. Reconciliation: 5 numeric amounts + 1 missing + 0 invalid = 6 records.

What we checked

  • CSV parser yields six records including quoted comma
  • One identical A1 key group at records 1 and 3
  • Record 2 amount missing; record 6 zero valid
  • Raw USD 15.00 and EUR 20.00, separately

Other original skills

Back to the Skills library