cadasto/pgsql-coding-plugin/pgsql-lint-setup
Claude Code and agent skill by cadasto/pgsql-coding-plugin
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user runs /pgsql-lint-setup or asks to "set up squawk", "add SQL linting", "lint our Postgres migrations", "add a migration linter to CI", "fail the build on unsafe migrations" or "scaffold .squawk.toml", or asks how to set squawk's pg_version or assume_in_transaction, how to exclude or ignore a squawk rule, how to run squawk in GitHub Actions, or how to check PL/pgSQL functions with plpgsql_check. It writes the reference .squawk.toml (PostgreSQL 18, migration…
Install
npx vskill@latest install cadasto/pgsql-coding-plugin/pgsql-lint-setupSKILL.md
The same SKILL.md was published earlier as cadasto/pgsql-coding-plugin/pgsql-lint-setup.
pgsql-lint-setup: the reference squawk config
Write the block below. It is the same text asreferences/squawk.tomlat the plugin root (besideskills/). To compare with the shipped file, read../../references/squawk.tomlfrom this skill's directory. On Claude Code that file is also${CLAUDE_PLUGIN_ROOT}/references/squawk.toml. Do not Glob the user's repository for it.
Scope: write squawk's config into a repository and report how to run it, in one interaction. squawk lints migration files for statements that block reads or writes or break running clients (squawk rules).
Deterministic backstop: squawk itself; this skill only configures it.
$ARGUMENTS is an optional directory on Claude Code. On Cursor, argument-hint, allowed-tools and $ARGUMENTS are not applied: take an optional directory from the user's message. Default on both hosts is the repository root. Call that directory $ROOT below.
Steps
- Do not overwrite an existing config. squawk walks up from the current directory to find
.squawk.toml(squawk CLI), so check$ROOTand its parents. If one exists, show how it differs from the block below and ask before changing anything. - Find the migration files and the runner. Glob
**/*.sqlunder folders such asmigrations/ordb/migrations/. A-- +goose Upline marks goose (goose annotations);{version}_{title}.up.sqland.down.sqlpairs mark golang-migrate (golang-migrate MIGRATIONS.md). Both wrap a file in a transaction, so keepassume_in_transaction = true(the block's comment says when not to). - Write `$ROOT/.squawk.toml` from the block below. Set
pg_versionas its comment says. - List goose files marked `-- +goose NO TRANSACTION` that lack `-- squawk-disable-assume-in-transaction`. Report them; do not edit migration files in this command.
- Run it once when `squawk` is on PATH:
squawk 'migrations/*.sql', with the glob quoted. Report the count of findings; fixing them ispgsql-migrations. - Report the commands under Running squawk and the plpgsql_check line.
Config to write
Running squawk
- Install with
npm install -g squawk-cli,pip install squawk-cli, or a binary from the releases page (squawk quick start). Pin an exact version in CI and bump it on purpose, so a new squawk rule cannot fail an unrelated pull request. - Run locally:
squawk 'migrations/*.sql'; for golang-migrate,squawk 'migrations/*.up.sql', since the down files drop what the up files add. squawk exits non-zero when it reports any violation (reporter source). - Ignore a finding where it occurs:
-- squawk-ignore <rule-id>on the line before the statement, or-- squawk-ignore-file <rule-id>for a whole file (squawk CLI). A goose file'sDownpart is linted too; mark an intended drop there. Opt-in rules are switched on withincluded_rules. - GitHub Actions: the action installs
squawk-clifrom npm atversion(defaultlatest) and only comments on the pull request unlessfail-on-violationsis"true"(squawk-action):
PL/pgSQL functions
squawk does not check function bodies. plpgsql_check is a server extension that checks PL/pgSQL bodies against the catalog: unknown columns, wrong types, unused variables, a missing RETURN, and, with security_warnings => true, EXECUTE open to SQL injection (plpgsql_check). Install it in the development or CI database, then:
The README has queries that check every function and trigger function at once. The Postgres Language Server also lints migrations, with rules inspired by squawk; its CLI is postgres-language-server check <file> and its config postgres-language-server.jsonc (getting started). Keep squawk as the CI gate so the advice in pgsql-migrations matches the tool.
Sources
- squawk CLI and
.squawk.tomlkeys (pg_version,assume_in_transaction,excluded_rules,included_rules,excluded_paths): <https://squawkhq.com/docs/cli> (checked 2026-10-27; squawk v2.70.0, released 2026-10-15) - squawk quick start and rules: <https://squawkhq.com/docs/>, <https://squawkhq.com/docs/rules> (checked 2026-10-27)
- squawk source at v2.70.0, opt-in rules, default
pg_version, theprefer-repackversion gate, exit code: <https://github.com/sbdchd/squawk/tree/v2.70.0/crates> (checked 2026-10-27) - squawk-action inputs: <https://github.com/sbdchd/squawk-action/blob/main/action.yml> (checked 2026-10-27; action v2.2.0)
- goose annotations: <https://pressly.github.io/goose/documentation/annotations/> (checked 2026-10-27)
- golang-migrate file naming and PostgreSQL driver: <https://github.com/golang-migrate/migrate/blob/master/MIGRATIONS.md>, <https://github.com/golang-migrate/migrate/blob/master/database/postgres/README.md> (checked 2026-10-27)
- plpgsql_check README, PostgreSQL 14 to 20 supported: <https://github.com/okbob/plpgsql_check> (checked 2026-10-27; v2.10.16)
- Postgres Language Server getting started: <https://pg-language-server.com/latest/getting_started/> (checked 2026-10-27; v0.28.2)
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/pgsql-lint-setup/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cadasto/pgsql-coding-plugin/pgsql-lint-setup)