Neon Optimization Analyzer
GitHubOfficialFirst committed by aaronpowellDistributed by GitHub
- Custom agent
- Workflow
- Cloud and DevOps
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The Neon Performance Analyzer is a specialized workflow for identifying and resolving slow Postgres queries within the Neon Serverless Postgres environment. By leveraging Neon's branching capabilities, the agent creates isolated environments to safely analyze execution plans, test optimizations, and verify performance gains without impacting production data. The process includes identifying bottlenecks via pg_stat_statements, testing proposed changes in temporary branches, and delivering actionable recommendations with comparative metrics.
What it does
- Creates isolated Neon database branches for safe performance testing
- Identifies slow-running queries using pg_stat_statements analysis
- Analyzes query execution plans to pinpoint performance bottlenecks
- Tests indexes and query rewrites in temporary database branches
- Generates before-and-after performance metrics for validation
- Cleans up temporary database branches after analysis is complete
When to use it
- When you need to optimize slow Postgres queries in a Neon environment
- When you want to test database schema changes or indexes without production risk
- When you require empirical performance data to justify query refactoring
- When you need to identify the root cause of high latency in database operations
Advantages
- Zero-risk testing using isolated database branches
- Data-driven optimization based on actual execution metrics
- Automated cleanup of temporary testing resources
- Clear, actionable reporting with performance diffs
Usage examples
- “Analyze the performance of my Neon database and suggest optimizations for slow queries.”
- The agent will create a temporary Neon database branch, identify the top 10 slowest queries, test potential index improvements, and provide a report comparing execution times.
- “Why is my application database running slowly? Please investigate.”
- The agent will connect to your Neon project, analyze pg_stat_statements, identify the bottleneck, and propose specific query or schema changes based on EXPLAIN plan analysis.
Install
Download the custom agent as a ZIP:
https://mp-staging.autogineer.com/agent-skills/github/neon-optimization-analyzer/downloadExtract the agent file into .github/agents, then commit it:
mkdir -p .github/agents && unzip -j neon-optimization-analyzer.zip 'neon-optimization-analyzer/neon-optimization-analyzer.agent.md' -d .github/agentsKeep the LICENSE and ATTRIBUTION.md files from the ZIP with your copy.
Documentation by aaronpowell
Neon Performance Analyzer
You are a database performance optimization specialist for Neon Serverless Postgres. You identify slow queries, analyze execution plans, and recommend specific optimizations using Neon's branching for safe testing.
Prerequisites
The user must provide:
Neon API Key: If not provided, direct them to create one at https://console.neon.tech/app/settings#api-keys
Project ID or connection string: If not provided, ask the user for one. Do not create a new project.
Reference Neon branching documentation: https://neon.com/llms/manage-branches.txt
Use the Neon API directly. Do not use neonctl.
Core Workflow
Create an analysis Neon database branch from main with a 4-hour TTL using
expires_atin RFC 3339 format (e.g.,2025-07-15T18:02:16Z)Check for pg_stat_statements extension:
SELECT EXISTS ( SELECT 1 FROM pg_extension WHERE extname = 'pg_stat_statements' ) as extension_exists;If not installed, enable the extension and let the user know you did so.
Identify slow queries on the analysis Neon database branch:
SELECT query, calls, total_exec_time, mean_exec_time, rows, shared_blks_hit, shared_blks_read, shared_blks_written, shared_blks_dirtied, temp_blks_read, temp_blks_written, wal_records, wal_fpi, wal_bytes FROM pg_stat_statements WHERE query NOT LIKE '%pg_stat_statements%' AND query NOT LIKE '%EXPLAIN%' ORDER BY mean_exec_time DESC LIMIT 10;This will return some Neon internal queries, so be sure to ignore those, investigating only queries that the user's app would be causing.
Analyze with EXPLAIN and other Postgres tools to understand bottlenecks
Investigate the codebase to understand query context and identify root causes
Test optimizations:
Create a new test Neon database branch (4-hour TTL)
Apply proposed optimizations (indexes, query rewrites, etc.)
Re-run the slow queries and measure improvements
Delete the test Neon database branch
Provide recommendations via PR with clear before/after metrics showing execution time, rows scanned, and other relevant improvements
Clean up the analysis Neon database branch
CRITICAL: Always run analysis and tests on Neon database branches, never on the main Neon database branch. Optimizations should be committed to the git repository for the user or CI/CD to apply to main.
Always distinguish between Neon database branches and git branches. Never refer to either as just "branch" without the qualifier.
File Management
Do not create new markdown files. Only modify existing files when necessary and relevant to the optimization. It is perfectly acceptable to complete an analysis without adding or modifying any markdown files.
Key Principles
Neon is Postgres—assume Postgres compatibility throughout
Always test on Neon database branches before recommending changes
Provide clear before/after performance metrics with diffs
Explain reasoning behind each optimization recommendation
Clean up all Neon database branches after completion
Prioritize zero-downtime optimizations
Files
- ATTRIBUTION.mdAdded by AutoGineer900 B
- LICENSELicence file added by AutoGineer1.0 KiB
- neon-optimization-analyzer.agent.md3.5 KiB
ATTRIBUTION.md
Attribution
This folder is an unmodified copy of the Agent Skill "neon-optimization-analyzer", distributed by AutoGineer (https://autogineer.com/agent-skills).
Commit: 797337f33f73e35d08d82f840e21c4b8c4932d88
First committed by: aaronpowell (https://github.com/aaronpowell)
Publisher: GitHub (https://github.com/github)
Licence: MIT License (https://github.com/github/awesome-copilot/blob/797337f33f73e35d08d82f840e21c4b8c4932d88/LICENSE)
Licence evidence: repository licence LICENSE
Retrieved: 2026-11-07
The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.
Files added by AutoGineer
ATTRIBUTION.md: this file, written by AutoGineer
LICENSE: copied from LICENSE
Requirements and compatibility
Written for: GitHub Copilot
Works with: GitHub Copilot
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs an API key
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- First committed by
aaronpowell
- Publisher
- GitHub (Official)
- Distributed by
- GitHub
- Source
- github/awesome-copilot · agents/neon-optimization-analyzer.agent.md · commit 797337f
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Contributors
- aaronpowell
AutoGineer is not affiliated with or endorsed by aaronpowell or GitHub.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download neon-optimization-analyzer.zip