What problem does it solve? Managing PostgreSQL user permissions on AWS RDS is error-prone: inherited role grants are hard to audit, GRANT statements miss sequences or future tables, and bloated tables silently waste disk space when autovacuum falls behind. This Skill provides tested SQL queries, scripts, and workflows to audit permissions, grant DML/DDL access correctly, and diagnose vacuum health across all databases on an instance. ## Core Features & Use Cases - Permission Auditing: Inspect role properties, role memberships, database-level access, and table-level privileges using reliable has_table_privilege() queries instead of the unreliable information_schema.role_table_grants view. - DML/DDL Granting: Use the scripts/grant_dml.sql template to grant SELECT/INSERT/UPDATE/DELETE on all existing tables and sequences across non-system schemas, plus default privileges for future tables. - Vacuum & Bloat Analysis: Scan every database with scripts/vacuum-check.sh for dead tuples, stale statistics, and oversized tables, then decide between VACUUM ANALYZE and VACUUM FULL. - Vault Credential Workflow: Source RDS credentials from HashiCorp Vault at connection time so passwords never appear in chat transcripts. - Use Case: A developer reports "permission denied" on a staging table. Audit their role memberships and table privileges, run the grant script via psql -f, and verify access with has_table_privilege() — all without exposing the database password. ## Quick Start Ask the agent to audit a PostgreSQL user's permissions on your RDS instance using credentials stored in Vault, then grant DML access and verify the result.