ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

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.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/andrelandgraf/neon-postgres-egress-optimizer
Or

What This Skill Does

The neon-postgres-egress-optimizer is a specialized agent skill designed to help developers identify and mitigate excessive data transfer costs (egress) between a Neon Postgres database and their application. High egress bills are frequently caused by 'hidden' data transfer patterns, such as fetching entire tables when only a few columns are needed, missing pagination in API endpoints, or querying large JSONB blobs repeatedly. This skill automates the detection process by utilizing the pg_stat_statements extension to analyze database query execution metrics. It guides you through the diagnostic process, helps you identify the most 'expensive' queries in terms of data volume, and provides actionable advice on how to refactor your application-side code to reduce your monthly database costs.

Installation

You can install this skill directly via the OpenClaw CLI using the following command: clawhub install openclaw/skills/skills/andrelandgraf/neon-postgres-egress-optimizer Once installed, the agent will have access to the diagnostic procedures and query templates necessary to analyze your database performance and egress patterns.

Use Cases

  • Cost Reduction: Use this when you notice a sudden spike in your Neon database billing and need to isolate the offending query patterns.
  • Database Performance Audits: Use this during regular maintenance to ensure that your application is not over-fetching data, which is a common source of both high latency and high network egress.
  • Code Review: Use this when introducing new features that perform heavy data retrieval to ensure they follow efficient query patterns.
  • Optimization Tasks: Use this whenever your team decides to move from 'select *' to explicit field selection to minimize network overhead.

Example Prompts

  1. "My Neon database bill has doubled this month. Can you help me find out which queries are causing high egress?"
  2. "I think our API is over-fetching data from Postgres. Can you analyze our current query patterns to find where we can reduce data transfer?"
  3. "Why are our network transfer costs so high? I want to optimize our queries to send less data from the database to our backend."

Tips & Limitations

  • Stats Reset: Remember that Neon compute scaling can reset pg_stat_statements. Ensure your application has been running for a representative duration before relying on these metrics.
  • JSONB Blobs: Be particularly mindful of wide rows. If you store large unstructured data in JSONB columns, querying those columns frequently is the fastest way to balloon your egress bill.
  • Index Coverage: While this tool focuses on egress, often the best way to reduce egress is to use better indexing to avoid sequential scans, though the primary goal here remains reducing the volume of payload data transmitted.
  • Scope: This skill provides diagnostic guidance; implementation of changes (refactoring SQL or ORM calls) must be performed by the developer.

Metadata

Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-andrelandgraf-neon-postgres-egress-optimizer": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#postgres#neon#egress#cost-optimization#database
Safety Score: 4/5

Flags: code-execution