Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    nextjs optimisation skill

    1

    Audit and optimize Next.js performance, technical SEO, and serverless compute efficiency.

    Free

    3 usesSecurity scanned
    nextjs optimisation skill

    nextjs optimisation skill

    Example session with this skill installed

    Audit the /products/[id] route. It is slow to load and the SEO tags don't seem to match the JSON-LD schema. Check the client boundaries and metadata.

    • Read your context and instructions
    • Compiled the nextjs optimisation

    I have audited the /products/[id] route. The primary issues were a broad "use client" directive at the layout level and a mismatch between the Product schema @id and the canonical URL.

    Route Audit: /products/[id]

    Component / FeatureStatusObservationRecommended Action
    RenderingDynamicRoute is Opted into dynamic rendering due to headers().Move headers() usage to a specific Client Component.
    Client BoundaryLeakyProductGallery wraps the entire page content.Restrict "use client" to the image carousel only.
    MetadataMismatchMeta description uses excerpt, JSON-LD uses description.Align both fields to use the product.longDescription.
    JSON-LDInvalidMissing @id for the Offer node.Add absolute @id using the canonical URL hash.
    LCP ImageUnoptimizedProduct hero image lacks priority and sizes.Add priority and sizes="(max-width: 768px) 100vw, 50vw".

    Optimized Metadata Implementation

    // app/products/[id]/page.tsx
    export async function generateMetadata({ params }): Promise<Metadata> {
      const product = await getProduct(params.id);
      const canonical = `https://example.com/products/${product.slug}`;
    
      return {
        title: product.name,
        description: product.longDescription,
        alternates: { canonical },
        openGraph: {
          images: [product.mainImage],
        },
      };
    }
    

    Next steps

    1. Apply the narrow client boundary to the ProductGallery component to reduce JS payload by ~45kb.
    2. Deploy the metadata fix and verify the @id alignment in the Schema Markup Validator.
    3. Add the priority property to the hero image to improve LCP.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Technical SEO and performance regressions in Next.js projects often stem from bloated client boundaries, inefficient rendering choices, and fragmented discovery signals. This skill audits and optimizes Next.js applications by aligning architecture, metadata, and core web vitals into a single cohesive system.

    What it does

    • Architecture audit identifies opportunities to move Client Components to Server Components to reduce browser bundles.
    • Discovery alignment synchronizes H1 tags, metadata, canonicals, and JSON-LD schema for search engines and AI crawlers.
    • Performance tuning optimizes LCP media through responsive sizes, preloading, and selective lazy-loading strategies.
    • Compute reduction analyzes route cardinality and middleware to lower serverless execution costs and build times.
    • Structured data implements valid JSON-LD using stable absolute IDs and verifiable entity relationships.

    How it works

    1. Version detection reads package.json and internal Next.js docs to ensure API compatibility for App or Pages router.
    2. Intent classification categorizes the task into discovery, rendering, performance, media, or deployment efficiency.
    3. Strategic implementation applies the least dynamic architecture possible, preferring static generation and prerendered HTML.
    4. Validation layers runs type checking, production build simulations, and rendered-output schema verification.

    Frameworks & tools

    Specifically designed for Next.js (App and Pages Router), React, and TypeScript projects. It targets Core Web Vitals, Schema.org JSON-LD, IndexNow, and common deployment platforms like Vercel or AWS.

    Why this beats prompting it yourself

    Generic prompts often suggest "global" fixes that break site-wide performance or create dynamic rendering bottlenecks. This skill enforces a "least dynamic" rule, ensuring you don't trade build speed for runtime latency or accidentally de-index routes with conflicting robots directives.

    Use cases

    • Auditing an existing route for SEO defects and schema errors.
    • Reducing JavaScript bundles by isolating client-side state.
    • Preparing a site for AI-search visibility through structured entity tagging.
    • Optimizing serverless function execution and image transformation costs.

    Known limitations

    Does not support non-React frameworks. Requires access to package.json for versioning. Lab data is required for performance claims as it cannot access live RUM metrics without external integration.

    Requires package.json for version detection. Cannot generate live performance scores without lab/field data. Limited to Next.js projects.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    3 uses

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    • Free with an Agensi account

    Requires

    Git

    Permissions

    Read Files
    Write Files
    Network Access
    Listed1 month ago

    What's inside

    Frequently Asked Questions

    This skill performs a deep architectural audit to move Client Components to Server Components, optimizes Core Web Vitals (like LCP), and synchronizes technical SEO signals like JSON-LD and canonicals to improve both search engine and AI-crawler visibility.

    It is fully compatible with both the App Router and Pages Router in Next.js, as well as TypeScript and React projects, by detecting your specific version in package.json to ensure API compatibility.

    Unlike generic prompts, this skill enforces a 'least dynamic' rule, preventing common mistakes like creating unnecessary runtime latency or accidentally de-indexing routes with conflicting robots directives.

    The skill focuses on 'Compute Reduction' by analyzing route cardinality and middleware efficiency, which directly lowers serverless execution costs and speeds up your production build times.

    You will receive the full AI agent skill package, including the optimized logic for architectural audits, performance tuning strategies, and automated schema validation protocols tailored for Next.js environments.

    The skill requires access to your project's package.json and source files to audit the code; however, it cannot access live Real User Monitoring (RUM) data and relies on simulated lab data for performance reporting.

    New in Frontend & Web Apps