# CSV Data Dictionary with Unknown-Field Flags

> Profiles every column of a CSV and returns a field-level dictionary that marks meanings it cannot verify as PENDING_CONFIRMATION instead of inventing them. For students and junior analysts handed an undocumented export.

CSV Data Dictionary with Unknown-Field Flags is a free AI agent skill on Agensi by jiajing, in Data & Databases. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [jiajing](https://www.agensi.io/creators/jiajing-1)
- Category: [Data & Databases](https://www.agensi.io/skills/data-databases)
- Version: 1.0
- Last updated: 2026-11-17
- Security: scan passed (2026-11-17); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/csv-data-dictionary-with-unknown-field-flags
- Tags: database, python, documentation, data-analysis, csv

## About this skill

A field-level data dictionary for a single CSV - one that says what it knows and marks what it doesn't.

Most AI-generated field documentation has no way to tell a reader which column descriptions were confirmed and which were guessed. This skill makes `PENDING_CONFIRMATION` a first-class output status, so a guessed meaning can never be mistaken for a verified one.

### What it does

- **Profiles every column across the whole file** - non-null counts, distinct counts, sample values, min/max length - not a sample of the first 20 rows.
- **Assigns a type from documented rules** - `integer`, `float`, `date-like`, `boolean-like`, `text`, `empty` - with stated precedence and edge-case handling.
- **Writes a meaning only where the field name and the supplied context support one.** Ambiguous names (`col3`, `flag_a`, `X2023`) stay `PENDING_CONFIRMATION`.
- **Ends with a coverage line you can hand to a reviewer**: `Total fields: N; Pending confirmation: M.`
- **Returns the questions that confirmation needs**, phrased so the user can answer each in one line.

### Why not just prompt a chatbot?

A generic prompt pushes the model to fill every field, because "complete" reads as "helpful". The failure is silent: an invented definition looks identical to a verified one once it reaches a cleaning rule, a model variable or a report definition.

This skill encodes the opposite discipline. It halts on unusable input, refuses to resolve ambiguous names from suggestive sample values, and reports coverage honestly instead of declaring the document finished.

### Package contents

- `SKILL.md` - scope, triggers, inputs, workflow, boundaries, output contract.
- `references/inference-rules.md` - type precedence, edge cases, name-versus-data conflicts, escalation list.
- `scripts/profile_csv.py` - read-only profiler, Python standard library only, no network, no install step.
- `assets/dictionary-template.md` - the output skeleton.

### Real-world CSV handling

Reads UTF-8, UTF-8 with BOM, GB18030/GBK (the Excel default on Chinese Windows) and Big5; auto-detects comma, semicolon, tab and pipe delimiters; reads mixed boolean spellings (`Y`/`1`/`0`/`N`) as one boolean field rather than four values; plausibility-checks four date formats (`20231345` is not a date); keeps leading-zero identifiers as text instead of silently stripping them; reports ragged rows and duplicate headers instead of dropping them.

### What it will not do

No cleaning, repair or conversion of the source CSV. No statistical analysis. No database schema design. No multi-file reconciliation. It never states business meaning it cannot support.

### Requirements

Python 3.8 or newer, standard library only. One CSV with a header row. No network access, no API key, nothing to configure.

## Requires

- Python

## Known limitations

Requires header rows in CSVs. Cannot infer business meaning for generic names (e.g., 'col1') without user context. Limited to single-file documentation.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the CSV Data Dictionary with Unknown-Field Flags skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What core problem does the Data Dictionary Builder solve for data teams?

This skill generates a standardized, audit-ready data dictionary that profiles types, identifies PII, and flags ambiguous fields for human review to prevent errors in migrations or pipelines.

### How does this skill's 'honesty policy' differ from simply asking an LLM to explain a CSV?

Unlike generic prompts, this skill uses a specialized Python profiling script to ensure definitions are grounded in real metrics rather than AI guesswork or hallucinations.

### What technical environment is required to run this skill?

The skill is designed for any AI agent or platform with Python execution capabilities, as it relies on a local script to analyze data structures and generate the Markdown report.

### What exactly is included in the purchase of this skill?

You will receive the specialized profiling logic, the structured documentation template, and the integration instructions needed to deploy the skill within your AI agent environment.

### Can I use this skill on datasets that do not have a header row?

The skill requires either a standard CSV file with a header row or a clear list of field names accompanied by sample data to accurately profile the schema.

### Does the builder handle multi-file schema mapping or join-key identification?

No, this skill is focused on documenting a single dataset; it does not currently perform cross-file relational mapping or multi-table schema reconciliation.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
