Install
$ agentstack add skill-swapnildahiphale-opensre-database-postgresql ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
PostgreSQL Database
Authentication
IMPORTANT: Credentials are injected automatically by a proxy layer. Do NOT check for POSTGRES_PASSWORD in environment variables - it won't be visible to you. Just run the scripts directly; authentication is handled transparently.
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)
MANDATORY: Schema-First Investigation
Understand the schema before running queries.
LIST TABLES → DESCRIBE TABLE → EXECUTE QUERY → CHECK HEALTH
Available Scripts
All scripts are in .claude/skills/database-postgresql/scripts/
list_tables.py - List Tables (START HERE)
python .claude/skills/database-postgresql/scripts/list_tables.py [--schema public]
describe_table.py - Table Schema Details
python .claude/skills/database-postgresql/scripts/describe_table.py --table TABLE_NAME [--schema public]
execute_query.py - Run SQL Queries
python .claude/skills/database-postgresql/scripts/execute_query.py --query "SELECT * FROM users WHERE created_at > now() - interval '1 hour'" [--limit 100]
list_indexes.py - Index Information
python .claude/skills/database-postgresql/scripts/list_indexes.py [--table TABLE_NAME] [--schema public]
gettablesizes.py - Table Size Analysis
python .claude/skills/database-postgresql/scripts/get_table_sizes.py [--table TABLE_NAME] [--schema public]
get_locks.py - Current Locks & Blocking Queries
python .claude/skills/database-postgresql/scripts/get_locks.py
getreplicationstatus.py - Replication Health
python .claude/skills/database-postgresql/scripts/get_replication_status.py
getlongrunning_queries.py - Long-Running Queries
python .claude/skills/database-postgresql/scripts/get_long_running_queries.py [--min-duration 60]
Investigation Workflow
Lock Contention
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'"
Replication Lag
1. get_replication_status.py (check lag_bytes/lag_seconds)
2. get_long_running_queries.py (queries blocking replication)
Table Growth Investigation
1. get_table_sizes.py (find largest tables)
2. list_indexes.py --table (check index health)
3. describe_table.py --table
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: swapnildahiphale
- Source: swapnildahiphale/OpenSRE
- License: Apache-2.0
- Homepage: https://opensre.in
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.