Skip to content

brook-miller/annotate-csv

Repository files navigation

Annotate CSV

A Claude Code skill that adds AI-generated annotations to CSV files by processing each row with a prompt.

Features

  • Classify, extract, or summarize data row-by-row
  • Parallel processing for speed
  • Use all columns or select specific context
  • Inline prompts or prompt files for complex tasks

Installation

As a Claude Code Skill

git clone https://github.com/brook-miller/annotate-csv.git ~/.claude/skills/annotate-csv

Standalone

git clone https://github.com/brook-miller/annotate-csv.git
cd annotate-csv
cp .env.example .env
# Add your API key to .env

Setup

Create a .env file:

OPENAI_API_KEY=sk-...

Quick Start

# Classify sentiment
uv run annotate-csv.py "Classify sentiment: positive, negative, neutral" reviews.csv -c sentiment

# Extract information
uv run annotate-csv.py "Extract the product name mentioned" feedback.csv -c product

# Summarize
uv run annotate-csv.py "Summarize in one sentence" articles.csv -c summary

Options

Option Description Default
-o, --output Output file path <input>_annotated.csv
-c, --column Annotation column name annotation
--context Columns to use (all or comma-separated) all
--model OpenAI model gpt-5-mini
--parallelism Parallel workers 10
--id-column Column for progress display -

Example

Input reviews.csv:

id,text
1,"Great product, love it!"
2,"Terrible experience, broke immediately"

Command:

uv run annotate-csv.py "Classify sentiment: positive, negative, neutral" reviews.csv -c sentiment

Output reviews_annotated.csv:

id,text,sentiment
1,"Great product, love it!",positive
2,"Terrible experience, broke immediately",negative

Requirements

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages