Skill: sschepis/flexible-data-importer (version 1.0.0)

# OpenClaw Data Importer Skill <!-- SKILL-META id: flexible-data-importer version: 1.0.0 author: OpenClaw description: AI-driven data ingestion for CSV, JSON, XLSX with auto-schema generation and Supabase integration. capabilities: - data-ingestion - schema-generation - supabase - etl requires: llm: true filesystem: true network: true invocation: cli: data-importer <file-path> api: UniversalImporter.execute(filePath) parameters: - name: filePath type: string required: true description: Path to the source file (CSV, JSON, XLSX). --> An AI-driven skill that ingests disparate data formats (CSV, JSON, XLSX) and builds a structured Supabase database. It automatically infers relationships, types, and schema names. ## Inputs * `filePath`: String - Path to the source file. * `supabaseUrl`: String - Your project URL. * `supabaseKey`: String - Service role key for schema creation. ## Capabilities - **Auto-Schema**: No need to define tables beforehand. - **Type Safety**: Automatically converts strings to dates/numbers where appropriate. - **Batched Uploads**: Handles large historical datasets without crashing.

path: README.md
content: # OpenClaw Data Importer Skill

The **OpenClaw Data Importer** is an AI-driven tool for ingesting unstructured or semi-structured data (CSV, JSON, XLSX) into Supabase. It uses an LLM to automatically infer relationships, generate relational schemas, and map data types, removing the need for manual ETL scripting.

## Features

- **Auto-Schema Generation**: Reads a sample of your file and proposes a SQL schema.
- **Intelligent Mapping**: Transforms raw keys (e.g., "First Name") to database columns (e.g., "first_name") and casts types (strings to dates/booleans).
- **Streaming & Batching**: Handles large datasets efficiently by streaming files and uploading in batches.
- **Supabase Integration**: Direct UPSERT support via PostgREST.

## Installation

```bash
npm install flexible-data-importer
```

## Usage

### CLI

Ensure you have a `.env` file with:
```env
SUPABASE_URL=...
SUPABASE_KEY=...
OPENAI_API_KEY=...
```

Run the importer:
```bash
npx data-importer ./path/to/my-data.csv
```

### Programmatic

```typescript
import { UniversalImporter, NodeFileAdapter, OpenAILLMAdapter, SupabaseAdapter } from 'flexible-data-importer';

const importer = new UniversalImporter(
  new NodeFileAdapter(),
  new OpenAILLMAdapter(process.env.OPENAI_API_KEY),
  new SupabaseAdapter(process.env.SUPABASE_URL, process.env.SUPABASE_KEY)
);

await importer.execute('./large-dataset.xlsx');
```

## Architecture

The system uses a **UniversalImporter** core that orchestrates three adapters:
1. **FileAdapter**: Abstracts filesystem access (Node streams vs OpenClaw sandbox).
2. **LLMAdapter**: Abstracts the intelligence provider (OpenAI vs OpenClaw Internal).
3. **DatabaseAdapter**: Abstracts the storage layer (Supabase vs Postgres).

This architecture allows the skill to be run standalone or injected with OpenClaw's native capabilities when running inside the agent runtime.


path: package.json
content: {
  "name": "@sschepis/flexible-data-importer",
  "version": "1.0.0",
  "description": "AI-driven data ingestion for CSV, JSON, XLSX with auto-schema generation and Supabase integration.",
  "main": "dist/index.js",
  "types": "dist/index.d.ts",
  "type": "module",
  "bin": {
    "data-importer": "dist/cli.js"
  },
  "scripts": {
    "build": "tsc",
    "start": "node dist/cli.js",
    "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
    "prepublishOnly": "npm run build"
  },
  "keywords": [
    "etl",
    "ai",
    "csv",
    "json",
    "importer",
    "supabase",
    "openclaw"
  ],
  "author": "OpenClaw",
  "license": "MIT",
  "dependencies": {
    "@supabase/supabase-js": "^2.39.0",
    "csv-parser": "^3.0.0",
    "dotenv": "^16.3.1",
    "xlsx": "^0.18.5",
    "zod": "^3.22.4"
  },
  "devDependencies": {
    "@types/jest": "^30.0.0",
    "@types/node": "^20.19.31",
    "jest": "^30.2.0",
    "ts-jest": "^29.4.6",
    "typescript": "^5.3.0"
  }
}


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: suspicious | SkillSpector: suspicious (MEDIUM)