DEV Community

Cover image for Embedding Claude-SEO Skills into Next.js 16: An Open-Source Technical Audit Blueprint
Sameer Hassan
Sameer Hassan

Posted on

Embedding Claude-SEO Skills into Next.js 16: An Open-Source Technical Audit Blueprint

The popular AgriciDaniel/claude-seo project demonstrated that modern AI models, when equipped with specialized domain prompts and systematic heuristics, can execute SEO audits comparable to senior technical consultants.

However, running these prompts manually through a chat window has major friction:

  • You have to manually scrape your HTML, clean it, and paste it into the chat prompt.
  • You do not get live PageSpeed Core Web Vitals telemetry.
  • You cannot automate it into your CI/CD deployment pipeline or schedule recurring scans.
  • The model cannot visually inspect your rendered viewport.

In ⚑ PLYXO (CRO β€’ SEO β€’ AIO β€’ AEO β€’ GEO), we took this concept to the next level by natively porting the entire Claude-SEO Skills suite directly into a production full-stack Next.js 16 + React 19 + TypeScript application.

Here is the architectural blueprint of how it works.


1. The Embedded Claude-SEO Skills Matrix

We codified the 6 core pillars of Claude-SEO into programmatic diagnostic modules:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚               PLYXO EMBEDDED CLAUDE-SEO SKILLS PIPELINE                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1. βš™οΈ Technical SEO      β”‚ 2. πŸ“ Content E-E-A-Tβ”‚ 3. πŸ“ Schema/JSON-LD β”‚
β”‚ β€’ Sitemaps & robots.txt  β”‚ β€’ Lexical Diversity  β”‚ β€’ Schema.org parsing β”‚
β”‚ β€’ Canonical directives   β”‚ β€’ Flesch-Kincaid easeβ”‚ β€’ FAQ/Article types  β”‚
β”‚ β€’ Hydration & SSR state  β”‚ β€’ Thin-content check β”‚ β€’ OpenGraph/Twitter  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 4. πŸ€– AI / AEO / GEO     β”‚ 5. πŸ”‘ Semantic Gap   β”‚ 6. πŸ”— Link Integrity β”‚
β”‚ β€’ Perplexity Citations   β”‚ β€’ Search Intent classβ”‚ β€’ Dead 404 crawler   β”‚
β”‚ β€’ Knowledge Graph tokens β”‚ β€’ Keyword cannibal   β”‚ β€’ Internal pagerank  β”‚
β”‚ β€’ Direct-Answer density  β”‚ β€’ Competitor gaps    β”‚ β€’ Redirect loop trap β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Enter fullscreen mode Exit fullscreen mode

2. Next.js 16 Server-Side Diagnostic Architecture

In Next.js 16 with Turbopack, we execute deep audits via asynchronous server actions and Node.js worker threads to keep UI responses sub-second:

Browser Client (React 19)
      β”‚
      β”‚ 1. Trigger Audit (URL: example.com)
      β–Ό
Next.js 16 Server Action (src/actions/audit.ts)
      β”‚
      β”œβ”€β”€> Worker A: Parallel SSR Scraper (SSRF-protected)
      β”‚
      β”œβ”€β”€> Worker B: Google PageSpeed Insights API (LCP, CLS, INP)
      β”‚
      └──> Worker C: Structured Schema & JSON-LD Validator
               β”‚
               β–Ό Aggregate Telemetry Payload
               β”‚
      LLM Reasoning Pipeline (Google Gemini 2.0 / Claude API)
               β”‚
               β–Ό Structured JSON Output (Zod Schema Validation)
               β”‚
Persisted to PostgreSQL via Drizzle ORM
      β”‚
      β–Ό
Real-Time Telemetry Streamed to React 19 Client via React Server Components
Enter fullscreen mode Exit fullscreen mode

3. Real Code: The Schema & JSON-LD Diagnostic Parser

Here is a look at the TypeScript parsing engine that extracts and validates Schema.org entities from raw HTML before passing them to the AI reasoning model:

import * as cheerio from 'cheerio';
import { z } from 'zod';

export interface SchemaValidationResult {
  hasJsonLd: boolean;
  schemasFound: string[];
  syntaxErrors: string[];
  missingRequiredFields: Record<string, string[]>;
}

export function auditSchemaMarkup(htmlContent: string): SchemaValidationResult {
  const $ = cheerio.load(htmlContent);
  const jsonLdScripts = $('script[type="application/ld+json"]');

  const result: SchemaValidationResult = {
    hasJsonLd: jsonLdScripts.length > 0,
    schemasFound: [],
    syntaxErrors: [],
    missingRequiredFields: {}
  };

  jsonLdScripts.each((_, el) => {
    const rawContent = $(el).html()?.trim();
    if (!rawContent) return;

    try {
      const parsed = JSON.parse(rawContent);
      const schemaType = parsed['@type'] || 'Unknown';
      result.schemasFound.push(schemaType);

      // Validate critical fields for Article & Product types
      if (schemaType === 'Article' || schemaType === 'BlogPosting') {
        const required = ['headline', 'datePublished', 'author', 'publisher'];
        const missing = required.filter(field => !parsed[field]);
        if (missing.length > 0) {
          result.missingRequiredFields[schemaType] = missing;
        }
      }
    } catch (err: any) {
      result.syntaxErrors.push(`Malformed JSON-LD syntax: ${err.message}`);
    }
  });

  return result;
}
Enter fullscreen mode Exit fullscreen mode

4. Structured Output with Zod Schema Validation

When querying LLMs for technical SEO diagnosis, hallucinated unstructured responses ruin reliability. We enforce strict JSON schema contracts using Zod:

import { z } from 'zod';

export const TechnicalSeoAuditSchema = z.object({
  score: z.number().min(0).max(100),
  criticalIssues: z.array(
    z.object({
      id: z.string(),
      title: z.string(),
      severity: z.enum(['CRITICAL', 'WARNING', 'INFO']),
      description: z.string(),
      codeFixRecommendation: z.string().optional(),
    })
  ),
  coreWebVitalsImpact: z.object({
    lcpImpactMs: z.number(),
    clsImpactDelta: z.number(),
    inpDelayMs: z.number()
  }),
  aeoReadinessSummary: z.string()
});
Enter fullscreen mode Exit fullscreen mode

Because the output is strongly typed, the Next.js frontend renders instant interactive diagnostic badges, copyable code diffs, and exportable PDF audit reports without any JSON parsing errors.


5. Check Out the Open-Source Repo

Everything mentioned hereβ€”from the schema parsers to the multi-tier crawlers and Next.js 16 UIβ€”is completely open-source under the FSL-1.1-MIT license.

πŸ‘‰ View the full repository: pixelfogg/Plyxo-CRO-SEO-AIO-AEO-GEO

Coming up in Day 4: **The Mathematics of Visual Friction* β€” how we calculate real projected dollar revenue loss from UI bounding-box inspect telemetry.*

Top comments (0)