quality-gates-postgres

quality-gates-postgres is a skill for Claude Code from pwdev-solucoes/pwdev-claude-marketplace. It costs 57 tokens per session (1,976 once invoked), scanned A, original, Apache-2.0.

A set of repeatable quality checks for PostgreSQL databases, the database system used to store structured application data. It validates migrations, the scripts that change database structure, schemas, constraints, indexes, and query plans in an isolated temporary database.

In plain words
What is it for?
Use it to check PostgreSQL migrations, structure, rules, indexes, and representative query plans in CI.
Why use it?
It catches schema drift, broken database changes, and query-plan regressions before they reach a shared or production database. It does not replace operational database administration such as backups or incident response.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the pwdev-devops plugin — 24 skills, 5 commands, 4 agents shipped together

Good fit Use it to check PostgreSQL migrations, structure, rules, indexes, and representative query plans in CI.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pwdev-solucoes/pwdev-claude-marketplace/quality-gates-postgres
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pwdev-solucoes/pwdev-claude-marketplace --skill quality-gates-postgres
Clone the repo
git clone --depth 1 https://github.com/pwdev-solucoes/pwdev-claude-marketplace

Made for: Claude Code.

Or install pwdev-devops, the plugin that ships this one along with the rest of its 24 skills, 5 commands, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for quality-gates-postgres

README.md
[![agentmods](https://agentmods.dev/badge/skills/pwdev-solucoes/pwdev-claude-marketplace/quality-gates-postgres/github.svg)](https://agentmods.dev/skills/pwdev-solucoes/pwdev-claude-marketplace/quality-gates-postgres)
Your own site
<a href="https://agentmods.dev/skills/pwdev-solucoes/pwdev-claude-marketplace/quality-gates-postgres"><img src="https://agentmods.dev/badge/skills/pwdev-solucoes/pwdev-claude-marketplace/quality-gates-postgres/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for quality-gates-postgres

Your own site · 80×15
<a href="https://agentmods.dev/skills/pwdev-solucoes/pwdev-claude-marketplace/quality-gates-postgres"><img src="https://agentmods.dev/badge/skills/pwdev-solucoes/pwdev-claude-marketplace/quality-gates-postgres.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,976 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.01976
Opus 5.5 $0.00023 $0.00790
Sonnet 5.5 $0.00011 $0.00395
Haiku 4.5 $0.00006 $0.00198

Measured 1mo ago against content hash cf88a726aa49, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

quality-gates-postgres scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/pwdev-devops/skills/quality-gates-postgres/SKILL.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Quality Gates para PostgreSQL

Você projeta gates de CI reproduzíveis para artefatos PostgreSQL. O escopo é validar migrations, schema, constraints, índices e planos de consulta em banco efêmero e exclusivo. Esta skill não opera bancos compartilhados ou de produção e não substitui postgres-dba em backup, restore, replicação, manutenção, tuning operacional ou resposta a incidentes.

Levantamento obrigatório

Antes de recomendar um gate, registre:

  1. versão exata do PostgreSQL e imagem fixada por digest, locale, encoding, timezone, extensões e parâmetros de servidor que alteram DDL ou o planner;
  2. ferramenta e ordem de migrations, estado inicial suportado, política declarada de rollback e comandos já existentes no projeto;
  3. schema esperado, namespaces incluídos, objetos deliberadamente ignorados e método versionado de normalização do dump;
  4. constraints e índices críticos, consultas representativas, fixtures fixas, estatísticas controladas e orçamento de feedback;
  5. dono, saída esperada, condição de falha, tempo limite e procedimento de exceção de cada gate.

Se faltarem dados, proponha execução observacional. Não invente cardinalidades, índices, metas de latência ou compatibilidade de rollback e não consulte produção para completar fixtures.

Ambiente efêmero obrigatório

Cada execução cria uma instância PostgreSQL descartável e exclusiva, a partir de imagem por digest, sem conexão com redes ou credenciais de ambientes reais. Crie os bancos necessários do zero, aplique apenas artefatos do commit avaliado, colete evidências e descarte o ambiente ao fim. Fixe locale, encoding, timezone, extensões, configuração e seed. Falha ao iniciar a instância ou obter um artefato fixado é falha de infraestrutura: não aprove o gate e não altere a baseline.

Matriz de gates e contratos

Categoria Verificador preferencial Entradas determinísticas Saída e regra bloqueante
Migrations runner existente do projeto e psql com ON_ERROR_STOP=1 PostgreSQL por digest, ferramenta fixada, migrations ordenadas, estado inicial, extensões e configuração versionados código de saída e log sanitizado; bloqueia falha ao migrar do zero ou a partir de cada estado suportado e, somente se o contrato exigir reversibilidade, falha no ciclo forward/rollback/forward
Schema drift pg_dump --schema-only da mesma versão do servidor, seguido de normalizador local versionado migrations do commit, schema canônico, opções de dump, namespaces, exclusões e normalizador fixados diff normalizado; bloqueia qualquer divergência não aprovada entre o schema reconstruído e o snapshot canônico
Constraints pgTAP ou testes SQL transacionais do projeto schema migrado, fixtures mínimas versionadas e casos positivos/negativos por regra TAP/JUnit ou resultado SQL estruturado; bloqueia constraint ausente, inválida, NOT VALID não declarada ou caso positivo/negativo com resultado inesperado
Índices consultas aos catálogos pg_catalog e testes SQL schema migrado, especificação versionada de tabela, colunas/expressões, ordem, predicado, unicidade, método e opclasses resultado ordenado e diff; bloqueia índice crítico ausente, inválido ou diferente da especificação e índice redundante novo segundo regra local aprovada
Planos de consulta EXPLAIN (FORMAT JSON, COSTS true, ANALYZE false, TIMING false, SUMMARY false) consultas e parâmetros versionados, fixtures fixas com cardinalidade conhecida, ANALYZE determinístico no banco efêmero, versão/configuração do PostgreSQL e estatísticas controladas JSON normalizado; bloqueia violação estrutural aprovada, como nó proibido em consulta crítica, perda do índice esperado ou aumento do custo estimado além do orçamento versionado

Read the full file on GitHub · 130 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 130 lines · 57 tokens per session scan A cf88a726aa49

Subscribe to this mod's changes

quality-gates-postgres is a skill published in the GitHub repository pwdev-solucoes/pwdev-claude-marketplace (3 stars, last pushed 10d ago), licensed Apache-2.0. It adds 57 tokens to every session and 1,976 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-16.