neon-postgres-egress-optimizer
Diagnose and fix excessive Postgres egress (network data transfer) in a codebase. Use when a user mentions high database bills, unexpected data transfer costs, network transfer charges, egress spikes, "why is my Neon bill so high", "database costs jumped", SELECT * optimization, query overfetching, reduce Neon costs, optimize database usage, or wants to reduce data sent from their database to their application. Also use when reviewing query patterns for cost efficiency, even if the user doesn't explicitly mention egress or data transfer.
Install
With your agent
Install OMGSkills skill "neondatabase/agent-skills:neon-postgres-egress-optimizer" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.
Manual command
git clone https://github.com/neondatabase/agent-skills /tmp/agent-skills && ln -s /tmp/agent-skills/skills/neon-postgres-egress-optimizer ~/.claude/skills/neon-postgres-egress-optimizer
From README
Postgres Egress Optimizer Guide the user through diagnosing and fixing application-side query patterns that cause excessive data transfer (egress) from their Postgres database. Most high egress bills come from the application fetching more data than it uses. Work the four steps in order: diagnose which queries transfer the most data, analyze the codebase behind them, fix the anti-patterns, then verify nothing broke and the transfer actually dropped. Step 1: Diagnose Identify which queries transfer the most data. The primary tool is the pgstatstatements extension. Check if pgstatstatements is available If this errors, the extension needs to be created: On Neon the extension is available by default, but it may still need this CREATE EXTENSION step. Handle empty stats Stats are cleared when a Neon compute scales to zero and restarts.
More from this repo
neon-postgres
Guides and best practices for working with Lakebase Postgres on Neon: connections, pooled vs direct, schema migrations,...
neon
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions,...
neon-ai-gateway
One API and one credential for frontier and open-source LLMs and embedding models, built into your Neon branch and...
