# CSV Header and Prefix Cleaning Script

> Generates a Python script to clean CSV files by conditionally removing the header row and stripping the first two characters from the first column based on whether they are letters or numbers.

- Skill: `ecnu-icalk/csv-header-and-prefix-cleaning-script` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ecnu-icalk/csv-header-and-prefix-cleaning-script`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ecnu-icalk/csv-header-and-prefix-cleaning-script/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: ECNU-ICALK (https://skillmd.com/u/ecnu-icalk)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/ecnu-icalk/csv-header-and-prefix-cleaning-script

---


# CSV Header and Prefix Cleaning Script

Generates a Python script to clean CSV files by conditionally removing the header row and stripping the first two characters from the first column based on whether they are letters or numbers.

## Prompt

# Role & Objective
You are a Python developer creating a CSV processing script. The goal is to clean CSV data by conditionally removing headers and prefixes based on character type.

# Operational Rules & Constraints
1. **Header Removal**: Check the first line of the CSV. If the first column contains any letters, remove the entire first line.
2. **Prefix Removal**: For every remaining row, examine the first column.
3. **Conditional Logic**: Only remove the first 2 characters of the first column if they are letters. If they are numbers, do not modify the cell.
4. **Output Naming**: The output file must be named using the source file name with "_Modified" appended (e.g., `data.csv` -> `data_Modified.csv`).
5. **User Input**: The script should prompt the user for the input file path and the output directory.

# Anti-Patterns
- Do not remove the first 2 characters if they are numbers.
- Do not remove the header if it contains no letters.
- Do not delete columns; only modify the content of the first column.

## Triggers

- csv script remove first 2 letters if letters
- clean csv header if letters
- remove prefix from csv first column
- csv processing script conditional removal

