تخطَّ إلى المحتوى
وكيل فرعيمستورد

neon-optimization-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.

وصف مستورد لم يراجعه محرر بعد

جاء هذا العنصر من مستودعه الأصلي وفحصناه آلياً فقط، ولم يكتب له محرر وصفاً عربياً بعد. اقرأ محتواه بنفسك قبل أن تعتمد عليه. ولا تُفهرس هذه الصفحة في محركات البحث حتى تُراجَع.

التنزيل

الملفات: 1 · الحجم: 4.6 ك.ب

نزّل ملف ZIP

يحمل الملف ترخيص المصدر الأصلي.

التثبيت

بعد التنزيل، شغّل الأمر في الطرفية. يسأل unzip قبل أن يستبدل أي ملف موجود.

  • لهذا المشروع

    يوضع في: .claude/agents/

    mkdir -p .claude/agents && unzip ~/Downloads/neon-optimization-analyzer.zip -d .claude/agents

  • لحسابك على الجهاز كله

    يوضع في: ~/.claude/agents/

    mkdir -p ~/.claude/agents && unzip ~/Downloads/neon-optimization-analyzer.zip -d ~/.claude/agents

التعليمات

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:

Reference Neon branching documentation: https://neon.com/llms/manage-branches.txt

Use the Neon API directly. Do not use neonctl.

Core Workflow

  1. 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)
  2. 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.
  3. 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.
  4. Analyze with EXPLAIN and other Postgres tools to understand bottlenecks
  5. Investigate the codebase to understand query context and identify root causes
  6. 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
  7. Provide recommendations via PR with clear before/after metrics showing execution time, rows scanned, and other relevant improvements
  8. 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

الملفات

  • LICENSE1 ك.ب
  • neon-optimization-analyzer.md3.5 ك.ب

ما وجده الفحص الآلي

فحصنا الملفات آلياً وقت الاستيراد. هذا ما نبّه إليه الفحص، ولا يعني أن العنصر ضار ولا أنه سليم: اقرأه بنفسك.

  • يحتاج مراجعةأدوات مسموحة بلا حدود

    في الملف cli-tool/components/agents/data-ai/neon-optimization-analyzer.md

التعليقات (0)

لا تعليقات بعد. كن أول من يعلّق.

سجّل الدخول لتعلّق. التعليق من المستوى 1 (عضو).

أبلغ

عناصر مشابهة

  • وكيل فرعيمستورد

    agent-orchestration-context-manager

    Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running pro

    MITالملفات: 1

  • وكيل فرعيمستورد

    arm-migration

    Arm Cloud Migration Assistant accelerates moving x86 workloads to Arm infrastructure. It scans the repository for architecture assumptions, portability issues, container base image and dependency incompatibilities, and recommends Arm-optimi

    MITالملفات: 1

  • وكيل فرعيمستورد

    cloud-migration-specialist

    Cloud migration and infrastructure modernization specialist. Use PROACTIVELY for on-premise to cloud migrations, containerization, serverless adoption, and cloud-native transformations.

    MITالملفات: 1

  • وكيل فرعيمستورد

    code-tour

    Expert agent for creating and maintaining VSCode CodeTour files with comprehensive schema support and best practices

    MITالملفات: 1

  • وكيل فرعيمستورد

    context-management-context-manager

    Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running pro

    MITالملفات: 1

  • وكيل فرعيمستورد

    database-admin

    Expert database administrator specializing in modern cloud databases, automation, and reliability engineering. Masters AWS/Azure/GCP/OCI database services, Infrastructure as Code, high availability, disaster recovery, performance optimizati

    MITالملفات: 1