What problem does it solve?
This Skill eliminates the tedious and error-prone manual maintenance of generated TypeScript code, AST type definitions, and PostgreSQL keyword lists for the pgsql-parser monorepo, which must stay in sync with PostgreSQL version updates, new SQL fixtures, and source keyword changes.
Core Features & Use Cases
- Protobuf-Based Code Generation: Automatically generate package-specific TypeScript AST helpers, runtime schemas, and traversal utilities from a single PostgreSQL protobuf definition for all core pgsql-parser packages.
- Automated Type Inference: Generate narrowed TypeScript union types for AST nodes by analyzing actual usage patterns across the project's SQL test fixtures, replacing generic Node types with precise, type-safe alternatives.
- Keyword and Deparser Generation: Extract typed PostgreSQL keyword sets from official PostgreSQL source headers and generate version-specific AST deparsers to support query deparsing for older PostgreSQL releases.
- Use Case: When upgrading pgsql-parser to support a new PostgreSQL version, use this Skill to automatically regenerate all package artifacts, updated type definitions, and new keyword sets with a single set of documented commands.
Quick Start
Use the code-generation skill to automatically regenerate all TypeScript code, narrowed AST types, and PostgreSQL keyword lists after updating the protobuf fixture or adding new SQL test fixtures.