annotating-csv
БесплатноБез исполняемых скриптовНе проверенAnnotates CSV rows using OpenAI by applying a prompt to each row and adding a new column with AI-generated results. Use when the user wants to classify…
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
CSV Annotation with OpenAI
Adds AI-generated annotations to CSV files by processing each row with a prompt.
Quick Start
uv run annotate-csv.py "Classify sentiment as positive/negative/neutral" reviews.csv
Output: reviews_annotated.csv with new annotation column.
Dependencies install automatically on first run.
Core Usage
uv run annotate-csv.py <prompt> <csv_file> [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 | - |
Prompt Sources
Prompts can be inline or from a file:
# Inline prompt
python annotate-csv.py "Extract the main topic" data.csv
# From file (for complex prompts)
python annotate-csv.py prompt.txt data.csv
Common Patterns
Classification:
python annotate-csv.py "Classify sentiment: positive, negative, or neutral" feedback.csv -c sentiment
Extraction:
python annotate-csv.py "Extract the product name mentioned" reviews.csv -c product --context "review_text"
Summarization:
python annotate-csv.py "Summarize in one sentence" articles.csv -c summary
See EXAMPLES.md for more patterns and prompt templates.
Environment Setup
Requires OPENAI_API_KEY in .env file:
OPENAI_API_KEY=sk-...
Run with uv (recommended):
uv run annotate-csv.py "Your prompt" data.csv
Or install dependencies first:
uv pip install -r requirements.txt
python annotate-csv.py "Your prompt" data.csv
Workflow
- Preview data: Check CSV structure and columns
- Choose context: Decide which columns the AI needs to see
- Write prompt: Be specific about expected output format
- Test on subset: Try on a few rows first if large dataset
- Run full annotation: Process the complete file
- Validate results: Spot-check annotation quality
Writing Effective Prompts
- Be explicit about output format (single word, phrase, sentence)
- List valid categories for classification tasks
- Specify what to do with ambiguous cases
- Keep prompts focused on one task
See PROMPTS.md for prompt-writing guidance.
Troubleshooting
| Issue | Solution |
|---|---|
| API key error | Check .env file has OPENAI_API_KEY |
| Column not found | Verify column names match CSV exactly |
| Rate limits | Reduce --parallelism to 5 or lower |
| Empty annotations | Check context columns have data |
Установить annotating-csv в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл annotating-csv?
Annotates CSV rows using OpenAI by applying a prompt to each row and adding a new column with AI-generated results. Use when the user wants to classify, extract, summarize, or add AI-generated annotations to CSV data. Triggers on mentions of CSV annotation, row-by-row AI processing, bulk classification, or adding AI columns to spreadsheet data.
Как установить скилл annotating-csv?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл annotating-csv запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic