Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

neon-postgres-egress-optimizer

Skill by sickn33

Diagnoses and fixes excessive Postgres egress in a codebase. It is aimed at developers and teams on Postgres, especially Neon, who see unexpected network transfer bills.

  • Score 89
  • 51k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install neon-postgres-egress-optimizer

Built from the published package, never by AI.

git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agentic-awesome-skills/skills/neon-postgres-egress-optimizer ~/.claude/skills/neon-postgres-egress-optimizer

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install neon-postgres-egress-optimizer in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The neon-postgres-egress-optimizer skill guides an assistant through finding and fixing application query patterns that cause excessive Postgres network transfer, known as egress. It starts by reading pg_stat_statements to rank queries by rows returned and call counts, then checks the codebase for unbounded or wide SELECTs, repeated reads, and application-side aggregation.

Fixes include selecting only needed columns, adding LIMIT and pagination, caching frequently called static queries, pushing aggregates into SQL, and splitting JOINs that repeat parent data. The skill also covers verification steps and a neon.ts configuration for cheaper non-production branches. It is aimed at developers and teams using Postgres, particularly Neon, who see unexpected egress bills.

Written from the project's SKILL.md and checked against it.

What it can do

  • Diagnose top egress queriesRanks queries by total rows, rows per call and call frequency using pg_stat_statements.
  • Check codebase queriesReviews queries for unused columns, missing pagination, frequent static reads and app-side aggregation.
  • Fix unused columnsReplaces SELECT * with only the columns the response needs.
  • Add paginationAdds LIMIT and OFFSET to unbounded list queries and suggests documenting the parameters.
  • Push aggregation into SQLMoves averages, counts and sums from application loops into GROUP BY queries.
  • Split duplicating JOINsReplaces a JOIN that repeats parent data with two separate queries.
  • Configure non-production branchesShows a neon.ts config with TTL, scale-to-zero and autoscaling limits for dev and preview branches.

What you need

  • Access to the Postgres database
  • pg_stat_statements extension, which may need CREATE EXTENSION on Neon
  • npm to install @neon/config for neon.ts
  • Neon CLI for neon config apply

Try asking

  • Find the queries causing the most egress in my Postgres stats
  • Review my product list endpoint for missing pagination and unused columns
  • Move the review averages in my app into a SQL GROUP BY query

Good to know

  • pg_stat_statements counts rows, not network bytes, so rankings are hypotheses to check against billing metrics.
  • Stats clear when a Neon compute scales to zero and restarts.
  • Extension creation, stat resets and neon config apply are mutations that need explicit approval.
  • Configured TTL can delete branches, so check the branch and backup policy first.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/neon-postgres-egress-optimizer/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md10 KB

Alternatives to neon-postgres-egress-optimizer

All alternatives →
hugging-face-datasetssickn33
94

Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.

AAA Skill 50k
db-repairgarrytan
94

Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.

AAA Skill 34k
alloydb-basicsgoogle
94

Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.

AAA Skill 26k
clickhouse-logs-queriessupabase
94

Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.

AAA Skill 116k
fix-slow-queriespaperclipai
94

Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.

AAA Skill 119k
prisma-8prisma
94

Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.

AAA Skill 48k

Compare with hugging-face-datasets, db-repair or alloydb-basics

neon-postgres-egress-optimizer: common questions

What causes high Postgres egress according to this skill?

The skill says most high egress bills come from the application fetching more data than it uses. Common causes include SELECT *, unbounded list queries and wide rows.

Can I use this without access to production statistics?

Yes. If no production stats are available, the skill says to analyze the codebase directly, since code-level patterns are often enough to find the worst offenders.

Does the skill change my database automatically?

No. The source says extension creation, statistic resets and neon config apply are mutations that need the matching scope, and that fixes need verification with tests and approval for costly actions.

How do I install neon-postgres-egress-optimizer?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is neon-postgres-egress-optimizer free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is neon-postgres-egress-optimizer safe to use?

It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to neon-postgres-egress-optimizer?

Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.

neon-postgres-egress-optimizer Install

Add to stack

Loading.