Neon Performance Analyzer
Identify and fix slow Postgres queries automatically using Neon's branching workflow. Analyzes execution plans, tests optimizations in isolated database branches, and provides clear before/after performance metrics with actionable code fixes.
- Type
- Subagent
- Repository
- github/awesome-copilot
- GitHub stars
- 39.4k
- License
- MIT
- Repo last updated
- Sep 27, 2026
- Source file
- agents/neon-optimization-analyzer.agent.md
What Neon Performance Analyzer is
Neon Performance Analyzer is a subagent published in the github/awesome-copilot repository on GitHub, which has about 39.4k stars. The repository describes itself as: “Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Neon Performance Analyzer and get back a compact result.
How to install Neon Performance Analyzer
Claude Code
- Download neon-optimization-analyzer.agent.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from agents/neon-optimization-analyzer.agent.md, shared under the repository's MIT license. Read the full file on GitHub.
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_at in 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%'
…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
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Neon Performance Analyzer?
Neon Performance Analyzer is a subagent for Claude Code and Claude Cowork from the github/awesome-copilot repository on GitHub. Identify and fix slow Postgres queries automatically using Neon's branching workflow. Analyzes execution plans, tests optimizations in isolated database branches, and provides clear before/after performance metrics with actionable code fixes.
How do I install Neon Performance Analyzer in Claude Code?
Download neon-optimization-analyzer.agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use Neon Performance Analyzer in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is Neon Performance Analyzer safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Rust MCP Expert Expert assistant for Rust MCP server development using the rmcp SDK with tokio async runtime Subagent · github/awesome-copilot
- Salesforce Expert Agent Provide expert Salesforce Platform guidance, including Apex Enterprise Patterns, LWC, integration, and Aura-to-LWC migration. Subagent · github/awesome-copilot
- Scientific Paper Research Research agent that searches scientific papers and retrieves structured experimental data from full-text studies using the BGPT MCP server. Subagent · github/awesome-copilot
- SE: DevOps/CI DevOps specialist for CI/CD pipelines, deployment debugging, and GitOps workflows focused on making deployments boring and reliable Subagent · github/awesome-copilot
- .NET Upgrade Perform janitorial tasks on C#/.NET code including cleanup, modernization, and tech debt remediation. Subagent · github/awesome-copilot
- Neon Migration Specialist Safe Postgres migrations with zero-downtime using Neon's branching workflow. Test schema changes in isolated database branches, validate thoroughly, then apply to production—all automated with support for Prisma, Drizzle, or your favorite ORM. Subagent · github/awesome-copilot
- Next.js Expert Expert Next.js 16 developer specializing in App Router, Server Components, Cache Components, Turbopack, and modern React patterns with TypeScript Subagent · github/awesome-copilot
- Neo4j Docker Client Generator AI agent that generates simple, high-quality Python Neo4j client libraries from GitHub issues with proper best practices Subagent · github/awesome-copilot