pgsql-ast-parser 12.x
Use pgsql-ast-parser 12.x to parse PostgreSQL SQL into a typed AST, inspect or transform it, and generate SQL. Covers the standalone JavaScript/TypeScript API in resolved version 12.0.2.
- For
pgsql-ast-parser@12.0.2- Verified
- 2026-09-08, 5 examples executed
- Package
@modootoday/pmcp-pgsql-ast-parser@12.0.0
What it covers
- Scope
- Parse statements
- Generate SQL
- Visit an AST
- Transform an AST
- Locations and comments
- Literal and utility helpers
- Deno
- Does not cover
One example from this skill
This is the skill's own text, not a summary of it. It runs: that is what verifying means here.
import assert from 'node:assert/strict';
import { parse, parseFirst } from 'pgsql-ast-parser';
const statements = parse(`BEGIN TRANSACTION;
INSERT INTO my_table VALUES (1, 'two');`);
assert.equal(statements.length, 2);
const statement = parseFirst('SELECT * FROM "my_table";');
assert.ok(statement);
assert.equal(statement.type, 'select');
What it did in the sandbox
Verifying this skill meant installing the package and running code against it with no route out. Nothing was observed. The full ledger lists every package examined, including the ones that never became a skill.
Nothing observed is not a finding of safety. It means one run, under one policy, produced nothing to report.
Getting it
With a subscription:
npx -y @modootoday/pmcp login
npx -y @modootoday/pmcp install @modootoday/pmcp-pgsql-ast-parser
It installs as a dev dependency of your project, and the MCP server finds it there like any other skill.