All skills
querying-local-postgres
Run read-only SQL against the local PostHog Postgres database and show results with interpretation.
- Part of PostHog/posthog
- 141 installs
- Data · Databases
When to use it
You have a local PostHog Postgres running and need to check why a team, project, or feature-flag row looks wrong, or inspect a slow query's plan.
For example
You say
Use querying-local-postgres to check whether team 42 has duplicate feature-flag rows in posthog_featureflag and show the SQL.
You get
- Read-only SQL query
- Row results
- Brief interpretation
How it works
- Writes are refused; only SELECT, EXPLAIN, and EXPLAIN ANALYZE on SELECT are allowed.
- Connections are forced read-only so accidental writes are rejected.
- Analytics event data lives in ClickHouse, not Postgres.
Before installing
Requires a reachable local Postgres (default postgres://posthog:posthog@localhost:5432/posthog) and the psql client.
More Databases skills
See all- database-optimizer6.5kSpeeds up slow PostgreSQL and MySQL queries through index design, query rewrites and configuration tuning.
- wren1.7kPoints the agent to the Wren CLI workflow for querying 22+ databases and setting up connections.
- generate-mdlExplores an existing database and scaffolds a Wren MDL project with normalized types and YAML definitions.
- plugin-neonManages serverless Postgres projects, branches and queries in your Neon account.
Also in this pack
- react-doctor511Diagnoses and fixes React codebase health issues, including performance problems, security gaps and code quality.
- hogli267Explains the PostHog developer CLI and repo tooling for running, building, testing, and linting.
- clickhouse-migrations266Writes and modifies ClickHouse database migrations following project rules.
- survey-sdk-audit255Audits survey SDK features and version requirements, then implements survey changes across backend, UI, and SDKs.