ingest-transactions

Parse and deduplicate bank CSV files into the OptimalOS transactions table.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/clenisa/optimal-cli --skill ingest-transactions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ingest-transactions
Source: https://github.com/clenisa/optimal-cli/tree/main/skills/ingest-transactions
Command: npx skills add https://github.com/clenisa/optimal-cli --skill ingest-transactions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the tedious process of parsing varied bank-export CSV formats, normalizing transaction data, and preventing duplicate inserts into the OptimalOS transactions table so financial imports are accurate and auditable.

Core Features & Use Cases

  • Format detection: Auto-detects Chase Checking, Chase Credit, Discover, or generic CSV headers and applies format-specific parsing rules.
  • Normalization & deduplication: Normalizes dates, amounts, and descriptions, computes a SHA-256 dedup hash, and skips existing transactions.
  • Provenance and batching: Creates upload_batches records for provenance, resolves or creates category mappings, and batch-inserts new transactions in safe chunks.
  • Use Case: Quickly import a downloaded Chase statement into a user's OptimalOS account, adding new transactions while skipping duplicates.

Quick Start

Run ingest-transactions with the CSV file path and the Supabase user UUID to import transactions into OptimalOS.

Frequently Asked Questions about ingest-transactions

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

FAQPage Schema
How do I import bank CSV files into Supabase without creating duplicate transactions?

To import bank CSV files into Supabase without duplicates, parse the data, normalize dates and amounts, and compute a SHA-256 dedup hash for each transaction. The Skill skips existing transactions and batch-inserts new records into the OptimalOS transactions table.

What is the best way to parse and normalize Chase Checking or Discover CSV exports for a database?

The best way to normalize Chase Checking or Discover CSV exports is to auto-detect the file headers and apply format-specific parsing rules. This standardizes transaction dates, amounts, and descriptions for accurate database insertion.

Can I use a generic CSV export format to import transactions into OptimalOS?

Yes, you can use a generic CSV export format to import transactions into OptimalOS. The process auto-detects generic CSV headers alongside Chase and Discover formats, applying the appropriate parsing rules to normalize and insert the transactional data.

Do I need specific Supabase credentials to ingest and deduplicate bank transactions?

Yes, you need the OPTIMAL_SUPABASE_URL and OPTIMAL_SUPABASE_SERVICE_KEY environment variables configured. These Supabase credentials are required to access the database, resolve categories, and batch-insert transactional records securely.

How does SHA-256 deduplication work when importing financial transaction data?

SHA-256 deduplication works by computing a unique hash for each normalized transaction row during the CSV import. If a transaction with the same hash already exists in the Supabase transactions table, the insertion is skipped to prevent duplicate records.

Are there limitations when parsing varied bank-export CSV formats into a normalized database schema?

A key limitation is that parsing varied bank-export CSV formats requires format-specific rules for Chase Checking, Chase Credit, Discover, or generic exports. Unsupported custom bank formats may not parse correctly without header auto-detection and manual normalization adjustments.