lisbeth718/pseo-skills/pseo-scale

Claude Code and agent skill by lisbeth718/pseo-skills

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Architect programmatic SEO systems for 10K-100K+ pages with database-backed data layers, data sufficiency gating, incremental validation, crawl budget management, content enrichment pipelines, and edge delivery. Use when scaling beyond 10K pages, when builds are OOMing, when Google is not indexing all pages, or when the current in-memory architecture has hit its limits.

Install

npx vskill@latest install lisbeth718/pseo-skills/pseo-scale

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as lisbeth718/pseo-skills/pseo-scale.

pSEO Scale Architecture

Scope parameter

ValueSections
database1
gating2
enrichment3
validation4
crawl5
monitoring6
cdn7, 8
alleverything

Architect pSEO systems that work at 10K-100K+ pages. The patterns in the other pseo-* skills are correct at 1K-10K. Beyond 10K, in-memory data layers, full-corpus validation, and single-deploy rollouts break down. This skill provides the architecture changes needed at scale.

Scale Tiers

TierPagesData LayerValidationRolloutSitemap
Tiny< 100JSON/files, in-memoryFull pairwiseSingle deploySingle file
Small100-1KJSON/files, in-memoryFull pairwise1-4 weeks in batches of 50-200Single file
Medium1K-10KFiles or DB, two-tier memoryFingerprint-based4-8 weeks in batchesIndex + children
Large10K-50KDatabase requiredIncremental + samplingCategory-by-categoryIndex + chunked
Very Large50K-100K+Database + cache layerDelta-only + periodic fullISR + sitemap wavesIndex + streaming

Rollout pacing in this table is an operational heuristic shared with pseo-performance, not a Google rule.

This skill focuses on the Large and Very Large tiers. If the project is under 10K pages, the standard pseo-* skills are sufficient.

1. Database-Backed Data Layer

At 10K+ pages, JSON files and in-memory arrays stop working. The data layer must move to a database with proper indexing.

Why In-Memory Breaks
Pages PageIndex in memory Full content (if loaded)
1K ~1MB ~100-500MB
10K ~10MB ~1-5GB (OOM)
50K ~50MB (borderline) ~5-25GB (impossible)
100K ~100MB ~10-50GB (impossible)

At 50K+, even holding all PageIndex records in memory is borderline. At 100K, getAllSlugs() returning an array of 100K objects takes ~100MB and seconds to deserialize. You need cursor-based iteration.

Database Requirements

Minimum schema:

sql
CREATE TABLE pages (
id SERIAL PRIMARY KEY,
slug TEXT UNIQUE NOT NULL,
canonical_path TEXT UNIQUE NOT NULL,
title TEXT NOT NULL,
h1 TEXT NOT NULL,
meta_description TEXT NOT NULL,
category TEXT NOT NULL,
subcategory TEXT,
status TEXT DEFAULT 'published',
monthly_traffic INTEGER DEFAULT 0, -- from analytics/GSC; used to rank pre-build and cache warming
last_modified TIMESTAMPTZ NOT NULL,
published_at TIMESTAMPTZ,
-- Heavy fields (only loaded per-page)
intro_text TEXT,
body_content TEXT,
faqs JSONB,
related_slugs TEXT[],
featured_image JSONB,
-- Scale fields
data_sufficiency_score REAL, -- see section 2
content_hash TEXT, -- for incremental validation
last_validated TIMESTAMPTZ
);
-- Required indexes for pSEO queries
CREATE INDEX idx_pages_category ON pages(category);
CREATE INDEX idx_pages_status ON pages(status) WHERE status = 'published';
CREATE INDEX idx_pages_slug ON pages(slug);
CREATE INDEX idx_pages_last_modified ON pages(last_modified DESC);
CREATE INDEX idx_pages_sufficiency ON pages(data_sufficiency_score);
CREATE INDEX idx_pages_category_status ON pages(category, status);

Categories table:

sql
CREATE TABLE categories (
slug TEXT PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
parent_slug TEXT REFERENCES categories(slug),
page_count INT DEFAULT 0,
last_modified TIMESTAMPTZ
);

Redirects table:

sql
CREATE TABLE redirects (
source TEXT PRIMARY KEY,
destination TEXT NOT NULL,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE INDEX idx_redirects_destination ON redirects(destination);
Data Layer API at Scale

The pseo-data API contract changes at scale:

typescript
// getAllSlugs() must support cursor-based iteration at 50K+
async function* getAllSlugsCursor(): AsyncGenerator<{ slug: string; category: string }> {
let cursor: string | null = null;
while (true) {
// pg Pool: query() returns { rows }, not an array
const { rows } = await pool.query(
`SELECT slug, category FROM pages
WHERE status = 'published'
${cursor ? `AND slug > $1` : ''}
ORDER BY slug LIMIT 1000`,
cursor ? [cursor] : []
);
if (rows.length === 0) break;
for (const row of rows) yield row;
cursor = rows[rows.length - 1].slug;
}
}
// getPagesByCategory() must use DB pagination, not in-memory slicing.
// limit is REQUIRED: a hidden default silently truncates sitemaps and hubs.
async function getPagesByCategory(
category: string,
opts: { limit: number; offset?: number }
): Promise<PageIndex[]> {
const { rows } = await pool.query(
`SELECT slug, title, h1, meta_description, canonical_path, category, last_modified
FROM pages
WHERE category = $1 AND status = 'published'
ORDER BY title
LIMIT $2 OFFSET $3`,
[category, opts.limit, opts.offset ?? 0]
);
return rows;
}
// getRelatedPages() needs a precomputed index or efficient query
async function getRelatedPages(slug: string, limit = 5): Promise<PageIndex[]> {
// Option A: Use related_slugs array from the page record
// Option B: Same category + shared tags query
// Option C: Precomputed relatedness table (best at 50K+)
const { rows } = await pool.query(
`SELECT p.slug, p.title, p.h1, p.meta_description, p.canonical_path,
p.category, p.last_modified
FROM pages p
JOIN pages source ON source.slug = $1
WHERE p.category = source.category
AND p.slug != $1
AND p.status = 'published'
ORDER BY p.last_modified DESC
LIMIT $2`,
[slug, limit]
);
return rows;
}
Connection Pooling

At build time with parallel page generation, you need connection pooling:

typescript
import { Pool } from "pg";
const pool = new Pool({
max: 10, // limit concurrent connections during build
idleTimeoutMillis: 30000,
connectionTimeoutMillis: 5000,
});

ORM alternative: If using Prisma or Drizzle, configure connection pool limits in the ORM config. Default pool sizes are often too high for build processes.

See references/database-patterns.md for full patterns by database type.

See references/vercel-optimization.md for Vercel-specific build cost and ISR optimization strategies.

2. Data Sufficiency Gating

At 100K pages, many combinations will produce thin content. Gate page generation BEFORE build time - don't create pages that will fail quality checks.

Sufficiency Score

Compute a score per potential page based on available data:

typescript
function computeSufficiencyScore(record: RawRecord): number {
let score = 0;
const weights = {
hasTitle: 10,
hasDescription: 10, // > 50 chars
hasBodyContent: 20, // > 200 words
hasRealUserQuestions: 15, // >= 3 questions sourced from real user data (support tickets, GSC queries, forums)
hasUniqueAttributes: 15, // >= 3 non-null structured attributes
hasImage: 5,
hasCategory: 10,
hasNumericData: 10, // stats, ratings, prices
hasSourceCitation: 5, // data provenance for E-E-A-T
};
if (record.title?.length > 10) score += weights.hasTitle;
if (record.description?.length > 50) score += weights.hasDescription;
if (wordCount(record.bodyContent) > 200) score += weights.hasBodyContent;
if (record.userQuestions?.length >= 3) score += weights.hasRealUserQuestions;
// ... etc
return score; // 0-100
}
Gating Thresholds
ScoreAction
80-100Generate page - sufficient data
60-79Generate page with enrichment flag - mark for content pipeline
40-59Hold - do not generate until data is enriched
0-39Reject - insufficient data, do not generate

Store the score in the database (data_sufficiency_score column) so you can:

  • Query how many pages are gated vs. ready
  • Track enrichment progress over time
  • Re-score after data enrichment
  • Gate at build time: WHERE data_sufficiency_score >= 60 AND status = 'published'
Combination Gating

For combination pages (service × city, product × use-case), both dimensions must have sufficient data:

typescript
function gateCombination(dimA: RawRecord, dimB: RawRecord): boolean {
// Both dimensions must independently clear a minimum bar
const scoreA = computeSufficiencyScore(dimA);
const scoreB = computeSufficiencyScore(dimB);
// The combination itself must produce enough unique content
// that it's not just "dimA text + dimB text" pasted together
const combinationHasUniqueContent =
dimA.attributes?.length >= 2 &&
dimB.attributes?.length >= 2;
return scoreA >= 40 && scoreB >= 40 && combinationHasUniqueContent;
}

This is the most important scale pattern. 500 services × 200 cities = 100K combinations, but maybe only 15K have enough data for a quality page. Generate only the 15K.

3. Content Enrichment Pipeline

At 100K pages, you can't manually write intros and descriptions. You need an automated enrichment pipeline with quality controls.

Pipeline Architecture
Raw data (DB/CMS/API)
│
▼
Data sufficiency scoring ──→ Reject/hold insufficient records
│
▼
Automated enrichment ──→ Generate intros and summaries from structured data
│
▼
Quality sampling ──→ Human reviews a random sample (5-10%) per batch
│
▼
Publish gate ──→ Only records with score >= 60 and enrichment complete
│
▼
Page generation
Enrichment Sources (non-LLM)

Before reaching for LLM generation, exhaust structured data enrichment:

  • Template composition from multiple fields: Combine 3+ data fields into prose. Not "Best {service} in {city}" but structured sentences using attributes, stats, and category context.
  • Aggregation: Roll up child data into parent summaries (category stats, comparison tables, top-N lists)
  • Cross-referencing: Enrich records by joining data sources (product + reviews, service + location demographics, listing + category averages)
  • Comparison data: Auto-generate comparison sections from sibling records in the same category
LLM-Assisted Enrichment

If structured enrichment is insufficient, LLM-assisted generation is acceptable under strict conditions:

  1. Never generate the entire page content - LLM fills gaps in an otherwise data-driven page
  2. Always ground in real data - the LLM prompt includes the record's actual attributes, stats, and context
  3. Human review sampling - review 5-10% of LLM-generated content per batch before publishing
  4. Store the generation metadata - track which fields were LLM-generated vs. sourced from data
  5. Apply quality guard after enrichment - run pseo-quality-guard on enriched content before publishing
  6. Regenerate periodically - stale LLM content should be refreshed when underlying data changes

Google's position (2026): Using generative AI is not a violation by itself, but generating many pages "without adding value for users" may violate the scaled content abuse policy, "no matter how it's created". Google asks you to manually fact-check and review all AI-generated content, including titles, meta descriptions, structured data and alt text. The Quality Rater Guidelines (Sep 2025, sections 4.6.5 and 4.6.6) rate pages Lowest when main content is auto or AI generated with little effort, originality or added value.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Installs
1
Repository stars
42
Repository forks
7
7-day trend score
21

Installs come from the vskill CLI. Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 22 Apr 2026, 7 months ago.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/lisbeth718/pseo-skills/pseo-scale/badge)](https://verified-skill.com/skills/lisbeth718/pseo-skills/pseo-scale)

Something wrong with this skill or its page? Tell us.