load-to-postgres

load-to-postgres is a skill for Claude Code from danielrosehill/Claude-Taxonomy-Creation-Plugin. It costs 37 tokens per session (879 once invoked), scanned A, original, MIT.

A loader that puts a taxonomy—a list of coded items such as countries or categories—into a PostgreSQL database. It can create the database table and read the taxonomy from a CSV or JSON file.

In plain words
What is it for?
Creating a PostgreSQL table from taxonomy data, importing CSV or JSON files, and replacing, updating, or appending rows while recording the operation.
Why use it?
It removes the need to design the table and write import SQL by hand. You can choose whether existing rows are replaced, updated, or kept alongside new rows.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the taxonomy-creation plugin — 9 skills shipped together

Good fit Creating a PostgreSQL table from taxonomy data, importing CSV or JSON files, and replacing, updating, or appending rows while recording the operation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/danielrosehill/claude-taxonomy-creation-plugin/load-to-postgres
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add danielrosehill/Claude-Taxonomy-Creation-Plugin --skill load-to-postgres
Clone the repo
git clone --depth 1 https://github.com/danielrosehill/Claude-Taxonomy-Creation-Plugin

Made for: Claude Code.

Or install taxonomy-creation, the plugin that ships this one along with the rest of its 9 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for load-to-postgres

README.md
[![agentmods](https://agentmods.dev/badge/skills/danielrosehill/claude-taxonomy-creation-plugin/load-to-postgres.svg)](https://agentmods.dev/skills/danielrosehill/claude-taxonomy-creation-plugin/load-to-postgres)
Your own site
<a href="https://agentmods.dev/skills/danielrosehill/claude-taxonomy-creation-plugin/load-to-postgres"><img src="https://agentmods.dev/badge/skills/danielrosehill/claude-taxonomy-creation-plugin/load-to-postgres.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 879 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.00879
Opus 5 $0.00018 $0.00439
Sonnet 5 $0.00007 $0.00176
Haiku 4.5 $0.00004 $0.00088

Measured 7d ago against content hash a4d111fb2eaa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

load-to-postgres scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/load-to-postgres/SKILL.md · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Load Taxonomy to Postgres

Load a generated CSV/JSON taxonomy into a Postgres database. Generate DDL, choose load mode, execute with logging.

When to use

  • "Load this taxonomy into my Postgres database"
  • "I want to upsert the countries table into Postgres"
  • "Create a Postgres table and load the taxonomy"

Inputs to gather

  • Connection: DSN string (postgresql://user:pass@host:port/dbname) or rely on PG* env vars (PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE).
  • Table name: What to call the table in Postgres.
  • Schema: Default public; override if needed.
  • Taxonomy file path: Absolute path to CSV or auto-discover from data/<name>/<name>.csv.
  • Load mode: replace (TRUNCATE + load), upsert (INSERT … ON CONFLICT DO UPDATE), append (INSERT only).

Procedure

  1. Generate DDL: Inspect the taxonomy CSV columns; infer types:
    • codeVARCHAR(32) or VARCHAR(64), PRIMARY KEY.
    • label / nameVARCHAR(255).
    • Numeric IDs → INTEGER or BIGINT.
    • metadata / JSON fields → JSONB.
    • parent_codeVARCHAR(32) with FOREIGN KEY constraint (DEFERRABLE INITIALLY DEFERRED if hierarchical).
    • Timestamps → TIMESTAMPTZ DEFAULT now().
    • Add created_at TIMESTAMPTZ DEFAULT now() and updated_at TIMESTAMPTZ DEFAULT now() if not present.
  2. Show the user the generated DDL before executing. Ask for confirmation if adding/modifying columns.
  3. Choose load path:
    • For large files (>10k rows): Use \copy via psql (fast, streaming).
    • For small files: Row-by-row INSERT via psycopg2 (Python) for full type control and error reporting.
  4. Handle load mode:
    • replace: TRUNCATE TABLE <table> CASCADE; \copy <table> FROM '<csv_path>' WITH (FORMAT csv, HEADER, DELIMITER ',');
    • upsert: INSERT INTO <table> (columns) SELECT * FROM (columns from CSV) ON CONFLICT (code) DO UPDATE SET (columns) = EXCLUDED.(columns);
    • append: \copy <table> FROM '<csv_path>' WITH (FORMAT csv, HEADER, DELIMITER ','); (assumes table exists).
  5. Hierarchical handling: If parent_code column exists and has FK constraints, either (a) load with SET CONSTRAINTS ALL DEFERRED and re-enable after, or (b) use topological ordering (load roots first).
  6. Log the operation: Write to state/loads/<timestamp>-<schema>.<table>.log:
    • Timestamp, mode, table, row count, status (success/error), any conflict count (for upsert).
    • Include the exact SQL command executed (sanitized — no password).
  7. Report to user: Row count loaded, any conflicts (upsert), confirmation of success.

Read the full file on GitHub · 58 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 58 lines · 37 tokens per session scan A a4d111fb2eaa

Subscribe to this mod's changes

load-to-postgres is a skill published in the GitHub repository danielrosehill/Claude-Taxonomy-Creation-Plugin (3 stars, last pushed 4mo ago), licensed MIT. It adds 37 tokens to every session and 879 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

alloydb-basics

Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.

google/skills · 72 tokens

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

wshobson/agents · 37 tokens

db-repair

Auto-fix gbrain's Postgres access so the brain stays available. When any gbrain command or MCP tool result carries a GBRAINDBACCESS marker (or an operator reports the brain database is down), run the hardcoded gbrain db-repair ladder: diagnose, apply the safe tier, verify. The action is ALWAYS the hardcoded command …

garrytan/gbrain · 96 tokens

dsql

Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, foreign key…

awslabs/agent-plugins · 229 tokens

volcengine-rds-postgresql

A tool for operating PostgreSQL databases hosted by Volcano Engine's managed database service. PostgreSQL is a relational database used to store structured application data.

bytedance/agentkit-samples · 63 tokens

polar-local-environment

This skill should be used when setting up or managing Polar local development environment with Docker.

fcakyon/claude-codex-settings · 22 tokens