Agent skill

Faasjs Pg

by faasjs in faasjs/faasjs

A skill your agent uses when working with @faasjs/pg or PostgreSQL in FaasJS: Tables declaration merging, QueryBuilder, select aliases, parameterized sql expressions, raw SQL, numeric/decimal/bigint…

MITAuto-check passedDatabases

Install Faasjs Pg

skills CLI
$ npx skills add faasjs/faasjs --skill faasjs-pg -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install faasjs/faasjs faasjs-pg --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/faasjs/faasjs.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/faasjs-pg .claude/skills/faasjs-pg && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
faasjs-pg
GitHub stars
121
Token cost
~718 tokens
SKILL.md length
283 words
Files
7 (incl. references)
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when working with @faasjs/pg or PostgreSQL in FaasJS: Tables declaration merging, QueryBuilder, select aliases, parameterized sql expressions, raw SQL, numeric/decimal/bigint…

  • Works in 6 steps: Keep table declarations, migrations,… → Prefer typed QueryBuilder clauses before… → Parameterize raw SQL values and keep… → …
  • Working with @faasjs/pg
  • SKILL.md covers Default Workflow, Load These References, Gotchas and Validation
  • Calls npx

What it does

Faasjs Pg is an agent skill from faasjs/faasjs. Use when working with @faasjs/pg or PostgreSQL in FaasJS: Tables declaration merging, QueryBuilder, select aliases, parameterized sql expressions, raw SQL, numeric/decimal/bigint boundaries, transaction isolation and read-only modes, row locks, concurrency, migrations, SchemaBuilder, TableBuilder, faasjs-pg CLI, PgVitestPlugin, shared migration snapshots, per-file test database isolation, and database type tests.

Its SKILL.md is about 720 tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/guidelines/pg-numeric-boundaries.md`, `references/guidelines/pg-query-builder.md` and `references/guidelines/pg-schema-and-migrations.md`).

It sits in Databases, covering SQL. It works with SQL, PostgreSQL and TypeScript. The repository describes itself as: 🚀 FaasJS is an agent-friendly full-stack TypeScript framework for building predictable, type-safe applications with minimal dependencies. The licence is MIT.

When your agent uses it

  • Working with @faasjs/pg
  • PostgreSQL in FaasJS: Tables declaration merging
  • Parameterized sql expressions
  • Numeric/decimal/bigint boundaries

Example prompts

  • “/faasjs-pg”

Requirements

  • Node.js

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Keep table declarations, migrations, queries, and tests aligned.
  2. Prefer typed QueryBuilder clauses before raw SQL.
  3. Parameterize raw SQL values and keep trusted boundaries explicit.
  4. Keep migrations deterministic, lexically sortable, and reversible where possible.
  5. Pair runtime database assertions with type assertions when query inference is part of the behavior.
  6. Use explicit transactions and concurrency tests when atomicity or row locking matters.

What it can do on your machine

Read from SKILL.md and the folder at commit 8136384. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Faasjs Pg loads about 718 tokens when it runs, and up to ~8.5k if it reads all its reference files. Until then it costs about 107 tokens; SKILL.md has 283 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~107
When it runs · the whole SKILL.md, loaded when a task matches
~718
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from faasjs/faasjs at commit 8136384, republished under its MIT licence (© faasjs). 283 words, ~718 tokens.

Download SKILL.mdSave it as .claude/skills/faasjs-pg/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
faasjs-pg
description
Use when working with @faasjs/pg or PostgreSQL in FaasJS: Tables declaration merging, QueryBuilder, select aliases, parameterized sql expressions, raw SQL, numeric/decimal/bigint boundaries, transaction isolation and read-only modes, row locks, concurrency, migrations, SchemaBuilder, TableBuilder, faasjs-pg CLI, PgVitestPlugin, shared migration snapshots, per-file test database isolation, and database type tests.

FaasJS PostgreSQL

Default Workflow

  1. Keep table declarations, migrations, queries, and tests aligned.
  2. Prefer typed QueryBuilder clauses before raw SQL.
  3. Parameterize raw SQL values and keep trusted boundaries explicit.
  4. Keep migrations deterministic, lexically sortable, and reversible where possible.
  5. Pair runtime database assertions with type assertions when query inference is part of the behavior.
  6. Use explicit transactions and concurrency tests when atomicity or row locking matters.

Load These References

  • Declaration merging on Tables and concrete row shapes: references/guidelines/pg-table-types.md.
  • QueryBuilder, aliases, raw SQL, update expressions, returning, and edge semantics: references/guidelines/pg-query-builder.md.
  • Transaction modes, transaction client lifetime, row locks, retry ownership, and concurrency tests: references/guidelines/pg-transactions-and-locking.md.
  • Exact numeric, decimal, and bigint values across TypeScript and API boundaries: references/guidelines/pg-numeric-boundaries.md.
  • Timestamped migrations, SchemaBuilder, TableBuilder, and schema execution: references/guidelines/pg-schema-and-migrations.md.
  • PgVitestPlugin(), shared migration snapshots, per-file database isolation, DATABASE_URL, and expectTypeOf(...): references/guidelines/pg-testing.md.

Gotchas

  • Treat Tables declarations as the source of truth for query inference.
  • Use raw SQL deliberately; move repeated raw SQL back toward shared helpers or builder clauses.
  • Keep write queries and transactions guarded by caller scope and expected failure handling; never let a transaction client escape its callback.
  • Let PgVitestPlugin() own the lazy global setup: it migrates one run-scoped snapshot and gives every database-using test file an isolated clone.
  • When a transaction also calls enqueueJob, load FaasJS API And Jobs and test rollback of both business data and the job row.
  • DATABASE_URL is required for migration and PG integration test commands.

Validation

  • Run npx faasjs-pg migrate when schema changes need migration verification and DATABASE_URL is available.
  • Run focused PG tests with vp test <pattern>.
  • Include expectTypeOf(...) when changing type-sensitive query behavior.
  • Use overlapping real transactions for lock or concurrency behavior; generated SQL assertions alone are insufficient.

© faasjs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in skills/faasjs-pg of faasjs/faasjs.

  • SKILL.md
  • references/guidelines/pg-numeric-boundaries.md
  • references/guidelines/pg-query-builder.md
  • references/guidelines/pg-schema-and-migrations.md
  • references/guidelines/pg-table-types.md
  • references/guidelines/pg-testing.md
  • references/guidelines/pg-transactions-and-locking.md

Open the folder on GitHubat commit 8136384

Compare with similar skills

Faasjs Pg next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Faasjs Pg compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Faasjs Pg this skillfaasjs/faasjs121—~718Automated safety check: PassMIT
Drizzle Ormgrowupanand/ConvoForm1011 repos~2.7kAutomated safety check: PassApache-2.0
Golem Add Postgres TSgolemcloud/golem1.5k—~519Automated safety check: PassCustom licence
Searching DocumentsGAIK-project/gaik-toolkit100—~4.2kAutomated safety check: PassMIT
SQL Database Support for pRESTprest/prest4.6k—~1.6kAutomated safety check: PassMIT
Chdb SQLvemetric/vemetric3941 repos~1.2kAutomated safety check: PassApache-2.0

Similar skills

  • Drizzle Orm

    growupanand/ConvoForm

    Type-safe SQL ORM for TypeScript with zero runtime overhead. An agent skill from growupanand/ConvoForm.

    101 GitHub starsUsed in 1 repo~2.7k tokens
    DatabasesAuto-check passed
  • Golem Add Postgres TS

    golemcloud/golem

    Using golem:rdbms/postgres from a TypeScript Golem agent. An agent skill from golemcloud/golem.

    1.5k GitHub stars~519 tokensUpdated today
    DatabasesAuto-check passed
  • Searching Documents

    GAIK-project/gaik-toolkit

    Builds and debugs retrieval with the gaik toolkit — PgVectorStore, Ranker, FinnishTextProcessor, RelevanceGate — as hybrid search: pgvector similarity plus Postgres full-text, fused by rank, and the…

    100 GitHub stars~4.2k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.

    4.6k GitHub stars~1.6k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Chdb SQL

    vemetric/vemetric

    A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…

    394 GitHub starsUsed in 1 repo~1.2k tokens
    DatabasesAuto-check passed
  • Schema Exploration

    timescale/pg-aiguide

    Explore an existing PostgreSQL database before answering questions about its data or writing SQL.

    1.9k GitHub stars~1.1k tokensUpdated 6 days ago
    DatabasesAuto-check passed

More from faasjs/faasjs

All 8 skills in this repo
  • Faasjs API Jobs

    faasjs/faasjs

    A skill your agent uses when building or reviewing FaasJS backend APIs and jobs: .api.ts files, defineApi, zod params schemas, HttpError, HTTP helpers, middleware/staticHandler, .job.ts files…

    121 GitHub stars~653 tokensUpdated 1 mo ago
    Auto-check passed
  • A skill your agent uses when building or reviewing FaasJS plugins and runtime infrastructure: Plugin lifecycle hooks including concurrent mount and failed-mount retry behavior, InvokeData mutation…

    121 GitHub stars~500 tokensUpdated 1 mo ago
    Auto-check: notes
  • A skill your agent uses when creating, configuring, reviewing, or onboarding a FaasJS project; working with create-faas-app, vp CLI, TypeScript or Vite config, feature folders, file and naming…

    121 GitHub stars~577 tokensUpdated 1 mo ago
    Auto-check passed
  • A skill your agent uses when building or reviewing FaasJS React UI, especially @faasjs/ant-design pages, useFaas, useFaasStream, faas requests, CRUD screens, Table faasData, Description faasData…

    121 GitHub stars~693 tokensUpdated 1 mo ago
    Auto-check passed
  • A skill your agent uses when working in any FaasJS repo and no narrower FaasJS skill is already selected, or when a task spans project conventions, validation gates, security boundaries, and…

    121 GitHub stars~741 tokensUpdated 1 mo ago
    Auto-check passed
  • Faasjs Specs

    faasjs/faasjs

    A skill your agent uses when implementing, reviewing, or verifying normative FaasJS runtime behavior and compatibility for faas.yaml, staged config discovery and merge order, zero-mapping route…

    121 GitHub stars~444 tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Faasjs Pg

What does Faasjs Pg do?

A skill your agent uses when working with @faasjs/pg or PostgreSQL in FaasJS: Tables declaration merging, QueryBuilder, select aliases, parameterized sql expressions, raw SQL, numeric/decimal/bigint…. Faasjs Pg is an agent skill from faasjs/faasjs. Use when working with @faasjs/pg or PostgreSQL in FaasJS: Tables declaration merging, QueryBuilder, select aliases, parameterized sql expressions, raw SQL, numeric/decimal/bigint boundaries, transaction isolation and read-only modes, row locks, concurrency, migrations, SchemaBuilder, TableBuilder, faasjs-pg CLI, PgVitestPlugin, shared migration snapshots, per-file test database isolation, and database type tests.

When should I use Faasjs Pg?

Faasjs Pg fits situations like: working with @faasjs/pg; postgreSQL in FaasJS: Tables declaration merging; parameterized sql expressions; numeric/decimal/bigint boundaries.

How do I install Faasjs Pg in Claude Code?

Run `npx skills add faasjs/faasjs --skill faasjs-pg -a claude-code`. Or copy the skill folder (skills/faasjs-pg in faasjs/faasjs) into .claude/skills/faasjs-pg in your project. Claude Code loads it when a task matches its description.

How do I install Faasjs Pg in Codex?

Run `npx skills add faasjs/faasjs --skill faasjs-pg -a codex`. Or copy the skill folder (skills/faasjs-pg in faasjs/faasjs) into .agents/skills/faasjs-pg in your project. Codex loads it when a task matches its description.

Can I use Faasjs Pg in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add faasjs/faasjs --skill faasjs-pg -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/faasjs-pg, .gemini/skills/faasjs-pg, .github/skills/faasjs-pg and .opencode/skills/faasjs-pg in your project.

What does Faasjs Pg need to run?

Going by SKILL.md and its folder, Faasjs Pg needs the command-line tools its instructions call (npx). Our summary lists: Node.js.

Does Faasjs Pg access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Faasjs Pg safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Faasjs Pg use?

Faasjs Pg is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Faasjs Pg use?

About 718 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.8k tokens, read only when the agent opens those files.

What are the alternatives to Faasjs Pg?

Skills that share tags, products or a category with Faasjs Pg: Drizzle Orm (growupanand/ConvoForm, 101 stars), Golem Add Postgres TS (golemcloud/golem, 1.5k stars), Searching Documents (GAIK-project/gaik-toolkit, 100 stars) and SQL Database Support for pREST (prest/prest, 4.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Faasjs Pg?

faasjs (a GitHub organization) maintains it in faasjs/faasjs, which has 121 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on September 3, 2026.

Source: faasjs/faasjs on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.