# PostgreSQL Script Verifier: Native Parsing, Real Execution & Repeatability

> Native PostgreSQL parsing, real PGlite execution, catalog evidence, and isolated SQL assertions for pre-migration acceptance

PostgreSQL Script Verifier: Native Parsing, Real Execution & Repeatability is a paid AI agent skill on Agensi by june  gaines, in Data & Databases. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9.99 (one-time purchase)
- Creator: [june  gaines](https://www.agensi.io/creators/june-gaines)
- Category: [Data & Databases](https://www.agensi.io/skills/data-databases)
- Version: 2.0.0
- Last updated: 2026-12-01
- Security: scan passed (2026-12-01); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/postgresql-script-verifier-native-parsing-real-execution-repeatability
- Tags: postgresql, sql, database, migration, testing, developer-tools

## About this skill

### PostgreSQL Script Verifier: Native Parsing, Real Execution & Repeatability

#### What it is

Verify PostgreSQL scripts without installing a PostgreSQL server. The skill parses each file with the native PostgreSQL 17 parser, executes DDL, PL/pgSQL, seed data, and smoke tests in PGlite, and produces reproducible Markdown and JSON evidence.

#### Built for

- Developers accepting a database bootstrap, migration, or schema package.
- Agents that need stronger evidence than reading SQL and guessing.
- Teams checking syntax, object dependencies, constraints, triggers, functions, and seed data before committing a migration.
- CI and delivery workflows that need to know whether an initialization package can run twice.
- Users who need machine-readable smoke-test evidence alongside a human-readable report.

#### Problems it catches

- SQL syntax errors with file, line, and column diagnostics.
- PL/pgSQL bodies that fail only when the function is created or executed.
- Broken object order, foreign-key dependencies, trigger definitions, and constraint assumptions.
- Seed data that violates NOT NULL, CHECK, UNIQUE, or primary-key constraints.
- Initialization packages that work on the first run and fail on the second.
- Assertion queries with accidental writes that would otherwise contaminate later checks.

#### Two evidence layers

1. `libpg-query 17.8.3` uses the native PostgreSQL 17 parser and reports statement types.
2. PGlite executes the package statement by statement in a real PostgreSQL-compatible WASM engine and records the first failure with SQLSTATE, file, line, and SQL preview.

#### Capabilities

- Native PostgreSQL parser diagnostics.
- Real execution of DDL, PL/pgSQL, seed data, and smoke tests.
- Two full runs by default for repeatability checks.
- Catalog snapshots for tables, views, sequences, constraints, functions, triggers, indexes, and row counts.
- JSON-defined assertions with `equals`, `contains`, `matches`, `truthy`, `min`, and `max`.
- Exactly one assertion condition per check.
- Every assertion runs in its own read-only transaction; writes are rejected with SQLSTATE `25006`.
- Markdown report and structured JSON evidence.
- Exit code `0` for pass, `2` for verification failure, and `1` for configuration errors.

#### Quick start

```bash
python scripts/setup_deps.py
python scripts/verify.py \
  examples/01_schema.sql \
  examples/02_seed.sql \
  examples/03_smoke.sql \
  --schema app \
  --checks examples/checks.json \
  --lang en \
  --report report.md \
  --json-report report.json
```

The npm dependency installation requires network access. Parsing, execution, and report generation run offline after installation.

#### Requirements

- Python 3.10 or later.
- Node.js 18 or later.
- npm access during dependency installation.
- No PostgreSQL server and no runtime network access.
- Windows, macOS, or Linux.

#### Privacy

- Does not connect to a production database.
- Does not upload SQL, schema details, or reports.
- Contains no telemetry, advertising, or remote logging.
- PGlite data lives in process memory and disappears when the process exits.
- Temporary request and response files are created in the current project directory and deleted after execution.
- Reports are written only to user-selected paths and use input basenames rather than absolute paths.

#### Limits

- PGlite is not a full PostgreSQL server.
- It does not validate concurrency, lock contention, connection pooling, authentication, replication, backup and restore, server tuning, or performance limits.
- Contrib extensions, `LISTEN/NOTIFY`, and server-specific configuration have limited coverage.
- Run the same scripts against a version-pinned staging PostgreSQL instance before a production migration.
- The skill does not modify or fix user SQL. It parses, executes, and reports evidence.

#### Why not a static SQL checker

A static checker can flag suspicious patterns. This skill goes further: it records how far the package executed, which database objects were actually created, and whether SQL assertions passed. That is still not production approval, but it is substantially stronger evidence than reading code.

## Requires

- Python 3.10 or later
- Node.js 18 or later
- npm

Dependencies are installed locally with npm; parsing, execution, and reporting then run offline.

## Known limitations

PGlite is not a full PostgreSQL server. This tool does not validate concurrency, lock contention, connection pooling, authentication, replication, backup and restore, server tuning, performance limits, full contrib coverage, or LISTEN/NOTIFY; use a version-pinned staging PostgreSQL instance before production migration.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the PostgreSQL Script Verifier: Native Parsing, Real Execution & Repeatability skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does PostgreSQL Script Verifier: Native Parsing, Real Execution & Repeatability do?

Native PostgreSQL parsing, real PGlite execution, catalog evidence, and isolated SQL assertions for pre-migration acceptance

### Which AI agents support PostgreSQL Script Verifier: Native Parsing, Real Execution & Repeatability?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use PostgreSQL Script Verifier: Native Parsing, Real Execution & Repeatability?

Connect your AI agent to Agensi through MCP, then ask it to use PostgreSQL Script Verifier: Native Parsing, Real Execution & Repeatability on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
