sql-load
- Repo stars 0
- Author updated Live
- Author repo skills-registry
- Domain
- Writing
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @tomevault-io · no license declared
- Token usage
- Lean
- Setup complexity
- Plug-and-play
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- Python
- Permissions
-
- Read-only
- Write / modify
- Env read
- Network behavior
- External requests
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: sql-load
description: Load a flat dataset (CSV / Parquet / JSON / Excel) into a SQL database. Either uses an existing…
category: writing
runtime: Python
---
# sql-load output preview
## PART A: Task fit
- Use case: Load a flat dataset (CSV / Parquet / JSON / Excel) into a SQL database. Either uses an existing configured database connection or walks the user through configuring a new one (PostgreSQL, MySQL, SQLite, MSSQL, DuckDB). Creates the table if absent, validates schema, handles primary keys and indexes, and loads with chunked inserts for large files. Use when this capability is needed..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “When to invoke / Supported backends / Procedure” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Load a flat dataset (CSV / Parquet / JSON / Excel) into a SQL database. Either uses an existing configured database connection or walks the user through configuring a new one (PostgreSQL, MySQL, SQLite, MSSQL, DuckDB). Creates the table if absent, validates schema, handles primary keys and indexes, and loads with chunked inserts for large files. Use when this capability is needed.”.
- **02** When the source has headings, the agent prioritizes “When to invoke / Supported backends / Procedure” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files, read environment variables; may access external network resources; usually needs no extra API key.
## Running Rules
- read files, write/modify files, read environment variables; may access external network resources; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files, read environment variables.
Start with a small task and check whether the result follows “When to invoke / Supported backends / Procedure”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: sql-load
description: Load a flat dataset (CSV / Parquet / JSON / Excel) into a SQL database. Either uses an existing…
category: writing
source: tomevault-io/skills-registry
---
# sql-load
## When to use
- Load a flat dataset (CSV / Parquet / JSON / Excel) into a SQL database. Either uses an existing configured database co…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “When to invoke / Supported backends / Procedure” and keep inference separate from source facts.
- read files, write/modify files, read environment variables; may access external network resources; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "sql-load" {
input -> user goal + target files + boundaries + acceptance criteria
context -> When to invoke / Supported backends / Procedure
rules -> SKILL.md triggers / order / output contract
runtime -> Python | read files, write/modify files, read environment variables | may access external network resources
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} SQL Load
Load a flat-file dataset into a SQL database.
When to invoke
- User says "load this into Postgres / MySQL / SQLite", "put this in the database", "upload to my SQL server".
- Dataset is clean and the user wants it queryable via SQL.
Supported backends
- SQLite — file-based, zero config; default for quick local loads.
- PostgreSQL — via
psycopg2orpsycopg[binary]. - MySQL / MariaDB — via
PyMySQLormysql-connector-python. - Microsoft SQL Server — via
pyodbc. - DuckDB — file-based analytics DB; best for Parquet-native workflows.
Procedure
- Determine the connection:
- Existing connection config — check
$CLAUDE_USER_DATA/Claude-Data-Wrangler/config.jsonfor saved database profiles. List them, let the user pick. - New connection — ask the user for: backend, host/port OR file path, database name, username, and how to provide the password (env var name, 1Password reference via
op-vault, or prompt at connection time). Never hard-code passwords in files. Save the non-secret parts of the profile to$CLAUDE_USER_DATA/Claude-Data-Wrangler/config.jsonif the user wants to reuse it.
- Existing connection config — check
- Confirm the target table:
- Table name (default: dataset filename stem, sanitised).
- Schema (for Postgres / MSSQL).
- Action if exists:
fail(default),append,replace,upsert(requires primary key).
- Load the dataset with pandas.
- Map dtypes to SQL types — use the data dictionary if present to pin types; otherwise infer. Default mappings:
int64→BIGINT/INTEGER.float64→DOUBLE PRECISION/REAL.object(string) →TEXT/VARCHAR(n)— size from max length observed, padded.datetime64[ns]→TIMESTAMP.bool→BOOLEAN/BIT. Ask user to confirm for columns where inference is uncertain.
- Create the table via
CREATE TABLE IF NOT EXISTS ...(orCREATE OR REPLACEif requested). Respect primary key / not-null / index requests. - Insert in chunks (default 10k rows) using
to_sql(..., method='multi')or backend-native bulk loaders (COPYfor Postgres,LOAD DATA INFILEfor MySQL) for large files. - Validate — row count
SELECT COUNT(*)matches source; sample a few rows and compare. - Report — table name, row count, load duration, index/PK status.
Connection config format
$CLAUDE_USER_DATA/Claude-Data-Wrangler/config.json:
{
"sql_profiles": {
"local-postgres": {
"backend": "postgresql",
"host": "localhost",
"port": 5432,
"database": "analytics",
"user": "daniel",
"password_ref": {"type": "env", "name": "PGPASSWORD"}
},
"local-sqlite": {
"backend": "sqlite",
"path": "~/Documents/data/warehouse.db"
}
}
}
password_ref options:
{"type": "env", "name": "PGPASSWORD"}— read from env var at connect time.{"type": "op", "reference": "op://Private/postgres/password"}— fetch via 1Password CLI.{"type": "prompt"}— prompt the user each run.
Never write plaintext passwords into this file.
Dependencies
pip install pandas sqlalchemy
# per backend
pip install psycopg[binary] # postgres
pip install pymysql # mysql
pip install pyodbc # mssql
pip install duckdb # duckdb
Edge cases
- Schema drift (file columns != table columns) — report diff; ask user whether to add columns, drop columns, or fail.
- Character encoding — ensure client/server encoding matches dataset encoding; default UTF-8.
- Very large files — use backend-native bulk loaders (
COPY FROM,LOAD DATA) rather thanINSERT. Stream from Parquet directly where possible. - Transactions — wrap the load in a single transaction; if it fails mid-way, the user keeps the prior state.
- PII — if the dataset hasn't been PII-checked (see
pii-flag), warn before loading into a shared database.
Source: danielrosehill/Claude-Data-Wrangler-plugin — distributed by TomeVault.
Decide Fit First
Design Intent
How To Use It
Boundaries And Review