com um clique
database-postgresql
// PostgreSQL database inspection and queries. Use when investigating table schemas, running queries, checking locks, replication status, or long-running queries.
// PostgreSQL database inspection and queries. Use when investigating table schemas, running queries, checking locks, replication status, or long-running queries.
AWS service troubleshooting patterns. Use for EC2, ECS, Lambda, CloudWatch, RDS issues.
Search and read Confluence documentation. Use when looking for internal docs, knowledge base articles, runbooks, or team documentation stored in Confluence.
Correlate incidents with recent deployments and code changes. Use when investigating if a deployment caused an issue, finding what changed, or identifying the commit that introduced a bug.
GitHub code search, file reading, PR review, branch/file management, and commit operations. Use when you need to search code patterns, read repository files, review pull requests, create branches, commit files, or open PRs.
Kubernetes debugging methodology and scripts. Use for pod crashes, CrashLoopBackOff, OOMKilled, deployment issues, resource problems, or container failures.
Jira issue tracking and project management. Use for creating, searching, updating, and commenting on Jira issues. Supports JQL queries for advanced searching.
| name | database-postgresql |
| description | PostgreSQL database inspection and queries. Use when investigating table schemas, running queries, checking locks, replication status, or long-running queries. |
| allowed-tools | Bash(python *) |
IMPORTANT: Uses DATABASE_URL or individual POSTGRES_HOST/POSTGRES_PORT/POSTGRES_DATABASE/POSTGRES_USER/POSTGRES_PASSWORD environment variables.
Configuration environment variables you CAN check (non-secret):
POSTGRES_HOST - Database hostPOSTGRES_PORT - Database port (default: 5432)POSTGRES_DATABASE - Database namePOSTGRES_SCHEMA - Default schema (default: public)Understand the schema before running queries.
LIST TABLES → DESCRIBE TABLE → EXECUTE QUERY → CHECK HEALTH
All scripts are in .claude/skills/database-postgresql/scripts/
python .claude/skills/database-postgresql/scripts/list_tables.py [--schema public]
python .claude/skills/database-postgresql/scripts/describe_table.py --table TABLE_NAME [--schema public]
python .claude/skills/database-postgresql/scripts/execute_query.py --query "SELECT * FROM users WHERE created_at > now() - interval '1 hour'" [--limit 100]
python .claude/skills/database-postgresql/scripts/list_indexes.py [--table TABLE_NAME] [--schema public]
python .claude/skills/database-postgresql/scripts/get_table_sizes.py [--table TABLE_NAME] [--schema public]
python .claude/skills/database-postgresql/scripts/get_locks.py
python .claude/skills/database-postgresql/scripts/get_replication_status.py
python .claude/skills/database-postgresql/scripts/get_long_running_queries.py [--min-duration 60]
1. get_locks.py (find blocking relationships)
2. get_long_running_queries.py --min-duration 30
3. execute_query.py --query "SELECT * FROM pg_stat_activity WHERE state = 'active'"
1. get_replication_status.py (check lag_bytes/lag_seconds)
2. get_long_running_queries.py (queries blocking replication)
1. get_table_sizes.py (find largest tables)
2. list_indexes.py --table <table> (check index health)
3. describe_table.py --table <table>