feat: add PostgreSQL client, seed, and cloud function skills #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds agent skills for Constructive PostgreSQL tooling and cloud function development:
constructive-functions — Documents how to build and deploy Knative-style HTTP cloud functions, including the handler pattern, PGPM integration, database access with pg-cache, Docker builds, and Kubernetes deployment.
graphql-codegen — Documents the
@constructive-io/graphql-codegenpackage for generating type-safe GraphQL SDKs (React Query hooks or Prisma-like ORM client) from database schemas.pgsql-client — Documents PostgreSQL client utilities including ephemeral database creation, DbAdmin operations, PgClient query helpers, and RLS context management.
pgsql-seed — Documents seeding utilities for CSV, JSON, SQL data loading, and pgpm deployment.
pgsql-test-seeding (updated) — Now documents the preferred Direct Load Methods pattern for seeding test data.
Updates Since Last Revision
Added new pgsql-client skill covering:
createEphemeralDb()for temporary databases (testing, code generation, CI)DbAdminfor database administration (create, drop, templates, extensions)PgClientquery helpers with RLS context managementAdded new pgsql-seed skill covering:
loadCsv,loadCsvMap,exportCsv)insertJson,insertJsonMap)loadSql,loadSqlFiles,execSql)deployPgpm,loadPgpm)Updated pgsql-test-seeding skill:
loadPgpm()to seeding methods overviewReview & Testing Checklist for Human
createEphemeralDb()frompgsql-client. Confirm this function exists and the return value matches (name,config,admin,teardown)loadCsv,insertJson,loadSql,deployPgpmexist with documented signaturesdb.loadJson(),db.loadCsv(),db.loadSql(),db.loadPgpm()are available directly onPgTestClientdb.user.findMany(),db.mutation.login()patterns match actual generated codeimport { getPgPool, close } from 'pg-cache'Suggested test: Try using
createEphemeralDb()to create a temporary database, deploy a pgpm module withdeployPgpm(), and verify the seeding methods work as documented.Notes
A separate PR was created for the pgsql-client README update in the constructive repo: constructive-io/constructive#656
Link to Devin run: https://app.devin.ai/sessions/5edec0c962d04ee9bd15efc58ca2a050
Requested by: @pyramation