postgres

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

A PostgreSQL skill for running read-only queries, inspecting database structure, and making data or schema changes with a preview before execution.

In plain words
What is it for?
Use it to query data, inspect tables, schemas, indexes, and constraints, or safely insert, update, delete, and change database definitions.
Why use it?
It reduces the risk of accidental database changes by requiring a dry run, which shows what a change would do before it runs. Read-only queries are checked and must include a row limit.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the pwdev-postgres plugin — 1 skill, 1 command shipped together

Good fit Use it to query data, inspect tables, schemas, indexes, and constraints, or safely insert, update, delete, and change database definitions.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add pwdev-solucoes/pwdev-claude-marketplace
Claude Code
/plugin install pwdev-postgres

Made for: Claude Code.

Or install pwdev-postgres, the plugin that ships this one along with the rest of its 1 skill, 1 command.

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 postgres

README.md
[![agentmods](https://agentmods.dev/badge/skills/pwdev-solucoes/pwdev-claude-marketplace/postgres.svg)](https://agentmods.dev/skills/pwdev-solucoes/pwdev-claude-marketplace/postgres)
Your own site
<a href="https://agentmods.dev/skills/pwdev-solucoes/pwdev-claude-marketplace/postgres"><img src="https://agentmods.dev/badge/skills/pwdev-solucoes/pwdev-claude-marketplace/postgres.svg" alt="Measured on agentmods" height="20"></a>
Per session 115 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,229 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.00115 $0.01229
Opus 5 $0.00057 $0.00615
Sonnet 5 $0.00023 $0.00246
Haiku 4.5 $0.00012 $0.00123

Measured 4d ago against content hash a2f321fcb835, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

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 4d 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-postgres/skills/postgres/SKILL.md · 97 lines

How it starts

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

Postgres

Você opera o PostgreSQL do usuário via servidor MCP postgres.

Pré-requisito e degradação

Path A — MCP postgres conectado: use as tools diretamente.

Path B — tools falhando ou MCP ausente: não simule resultado de banco. Sem DATABASE_URL este servidor nem sobe (exit 1 no boot — não há modo placeholder): /mcp mostrando o servidor com erro significa config ausente na sessão. Diagnostique com ${CLAUDE_PLUGIN_ROOT}/scripts/check-setup.sh e aponte /pwdev-postgres:init. Env var nova só vale após reiniciar a sessão. Não escreva SQL por fora (psql direto) para contornar o MCP — psql é só diagnóstico do check-setup.

Mapa de intenção → tool

Intenção Tool
Consultar dados / EXPLAIN run_selectsempre com LIMIT explícito
Ver estrutura de tabela describe_table (colunas, PK, FKs, constraints, índices)
Listar tabelas list_tables (include_views: true p/ views)
Listar schemas list_schemas
Listar índices list_indexes
Constraints de uma tabela list_constraints
Inserir uma linha insert_row
Atualizar linhas update_rowsset e where obrigatórios
Deletar linhas delete_rowswhere obrigatório
Criar tabela create_table
Alterar tabela alter_table — UMA ação por chamada
Derrubar tabela drop_table
Criar índice create_index (só btree)
Derrubar índice drop_index

Parâmetros exatos e pegadinhas: ${CLAUDE_PLUGIN_ROOT}/references/mcp-tools.md. Sem prompts nem resources MCP — só as 14 tools.

Regras de segurança (inegociáveis)

  • Mutação sempre em duas fases. Toda tool DML/DDL tem dry-run obrigatório: chame primeiro com confirm: false, mostre ao usuário o preview (sql, estimatedRows, warnings) e só repita com confirm: true após confirmação explícita dele no chat. Nunca emende as duas chamadas sem a confirmação no meio.
  • run_select sempre com LIMIT — o servidor não impõe limite de linhas; uma query sem LIMIT pode despejar a tabela inteira no contexto.
  • Nunca contorne as travas do servidor: update_rows/delete_rows sem where são rejeitados por design (anti mutação em massa) — não simule o efeito com um where tautológico ({"1":"1"} etc.).
  • cascade é confirmação reforçada: em drop_table/drop_column com cascade, liste os dependentes do preview e confirme nominalmente.
  • Leia .claude/pwdev-postgres-context.md antes de qualquer mutação — ambiente (produção?), tabelas críticas e se DDL é permitido. Em produção, redobre: proponha, não execute sem confirmação explícita.
  • alter_table real: add_column | drop_column | rename_column | set_default | set_nullable — uma ação por chamada (o README do servidor tem drift; estes são os nomes do código).
  • Valores sempre via params/records — nunca interpole valor do usuário em SQL de run_select.

Read the full file on GitHub · 97 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. 4d ago First seen · 97 lines · 115 tokens per session scan A a2f321fcb835

Subscribe to this mod's changes

postgres is a skill published in the GitHub repository pwdev-solucoes/pwdev-claude-marketplace (2 stars, last pushed yesterday), licensed Apache-2.0. It adds 115 tokens to every session and 1,229 once invoked, about $0.0006 per session on Opus 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-03.

Related

Other skills, from other repositories

alloydb-basics

Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.

google/skills · 72 tokens

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

wshobson/agents · 37 tokens

db-repair

Auto-fix gbrain's Postgres access so the brain stays available. When any gbrain command or MCP tool result carries a GBRAINDBACCESS marker (or an operator reports the brain database is down), run the hardcoded gbrain db-repair ladder: diagnose, apply the safe tier, verify. The action is ALWAYS the hardcoded command …

garrytan/gbrain · 96 tokens

dsql

Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, foreign key…

awslabs/agent-plugins · 229 tokens

volcengine-rds-postgresql

A tool for operating PostgreSQL databases hosted by Volcano Engine's managed database service. PostgreSQL is a relational database used to store structured application data.

bytedance/agentkit-samples · 63 tokens

polar-local-environment

This skill should be used when setting up or managing Polar local development environment with Docker.

fcakyon/claude-codex-settings · 22 tokens