add-csv-importer

Scaffolds a Python bulk CSV importer with validation, deduplication, and dry-run.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/michaelayoade/dotmac_crm --skill add-csv-importer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-csv-importer
Source: https://github.com/michaelayoade/dotmac_crm/tree/main/.claude/skills/add-csv-importer
Command: npx skills add https://github.com/michaelayoade/dotmac_crm --skill add-csv-importer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Building bulk import scripts is slow and error-prone, especially when you need validation, deduplication, dry runs, and per-row error reporting.

Core Features & Use Cases

  • Scaffolded bulk CSV importer: Generates a ready-to-run Python import script for importing entities from a CSV with clear CLI options.
  • Validation and normalization hooks: Establishes patterns for validating required headers and normalizing key fields (e.g., whitespace and case).
  • Deduplication + optional upsert: Supports skipping duplicates by dedup key or updating existing records with an --update-existing flag.
  • Dry-run safety and reporting: Adds --dry-run to preview actions and writes an import results CSV (created/updated/skipped/error) to reports/.
  • Resilient batch processing: Uses per-row exception handling with rollback so one bad row doesn’t break the entire import.

Quick Start

Use the add-csv-importer skill to generate an import script for your target entity and CSV mapping, then run the produced script with dry-run first to verify results before importing.

Frequently Asked Questions about add-csv-importer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Python CSV importer with validation and deduplication?

To build a Python CSV importer with validation and deduplication, you can scaffold a script that loads, normalizes, and deduplicates rows by a specific key before writing to the database. The generated script includes validation hooks and supports skipping or updating duplicates.

What is the best way to preview a bulk CSV import before writing to a database?

The best way to preview a bulk CSV import is to use a dry-run flag. Running the import script with a dry run executes the validation and deduplication logic without committing changes, generating a results CSV that reports whether rows would be created, updated, skipped, or encountered an error.

How do I handle errors during a bulk CSV import without stopping the entire process?

To handle errors during a bulk CSV import without stopping the process, the script uses per-row exception handling with rollback. This isolates bad rows so they fail individually while allowing the rest of the batch to process successfully, and records the specific errors in a reporting CSV.

Does this CSV import scaffolder support updating existing records instead of skipping duplicates?

Yes, this CSV import scaffolder supports updating existing records instead of skipping duplicates. You can use an update-existing command-line flag to trigger upsert behavior, which updates the database record matching the deduplication key with the new CSV row data.

How do I resolve foreign keys when importing CSV data into a CRM database?

To resolve foreign keys when importing CSV data, the importer script includes optional foreign-key resolution capabilities during the row normalization phase. This maps CSV input values to their corresponding database identifiers before safely writing the entity records to the CRM.

What is needed to generate a deterministic CSV import script for DotMac Omni CRM patterns?

Generating a deterministic CSV import script for DotMac Omni CRM patterns requires providing the target entity and CSV column mapping. The scaffolder outputs a ready-to-run Python script with command-line arguments, validation rules, and per-row error isolation matching the required CRM structure.