Agent skill · software engineering · aradotso
pgmicro-postgres-sqlite
Use pgmicro — an in-process PostgreSQL reimplementation backed by SQLite-compatible storage, embeddable as a library or CLI
Why this skill is useful
Provides niche commands and usage patterns for embedding PostgreSQL functionality using pgmicro, which the AI wouldn't reliably generate on its own.
What it needs
Requires npm installed locally. About 5k tokens when loaded. Last updated 2026-07-09. 70 stars on the source repository.
What this skill does
pgmicro Skill by ara.so — Daily 2026 Skills collection. pgmicro is an in-process reimplementation of PostgreSQL backed by a SQLite-compatible storage engine. It parses PostgreSQL SQL using the real PostgreSQL parser (libpgquery) and compiles it directly to SQLite VDBE bytecode, executed by Turso. The result is a fast, embeddable, single-file (or in-memory) database that speaks PostgreSQL — no server process required. Key capabilities Full PostgreSQL SQL syntax (via the actual PG parser) SQLite-compatible .db file format (readable by any SQLite tool) JavaScript/TypeScript SDK (WASM-based, runs in Node.js and browsers) PostgreSQL wire protocol server mode (connect with psql, ORMs, etc.) Dialect switching: access the same database with PG or SQLite syntax PostgreSQL system catalog virtual tables (pgclass, pgattribute, pgtype, etc.) Installation CLI (Node.js) JavaScript/TypeScript SDK From source (Rust) CLI usage CLI meta-commands JavaScript/TypeScript SDK Basic usage Parameterized queries Transactions Using with TypeScript types PostgreSQL features supported Server mode with psql / ORMs Architecture overview The .db output file is a standard SQLite database — open it with DB Browser for SQLite, the sqlite3 CLI, or any SQLite library. PostgreSQL system catalog tables (pgclass, pgattribute, pgtype, pgnamespace) are exposed as virtual tables so psql meta-commands like \dt and \d work correctly. Common patterns Per-request ephemeral databases (AI agents, sandboxes) Inspecting the SQLite file directly Schema introspection via pg catalog Troubleshooting SERIAL column not auto-incrementing Ensure you are not explicitly inserting NULL into the id column — insert without the column name and pgmicro will auto-assign. psql meta-commands (\dt, \d) show nothing Make sure you created tables in the public schema (the default). The PostgreSQL catalog virtual tables are populated from actual schema metadata. File database not persisting Pass a real file path, not :memory:. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aradotso/pgmicro-postgres-sqlite