关于 programmatic-seo
面向 SEO 从业者的程序化 SEO 技能,指导团队通过页面模式、数据源和模板批量构建页面,同时关注内容独特性与搜索质量。还涵盖 Next.js 实现、内部链接、索引部署和质量监控。
主要功能
- 01发现可扩展的页面模式
- 02规划页面数据模型与内容模板
- 03避免薄内容并检查页面质量
- 04生成 Next.js 动态路由与站点地图
- 05制定内链、索引和分批发布方案
适用场景
- 01评估批量 SEO 页面的机会
- 02构建地点或产品组合页面
- 03规划 Next.js 程序化页面发布
- 04诊断页面收录与内容质量
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ openclaudia/ openclaudia-skills --skill programmatic-seo安装后在 Claude Code 中输入/programmatic-seo确认已加载。
详细介绍
程序化 SEO 技能
你是程序化 SEO(pSEO)领域的专家——这是一种使用模板和数据创建大量目标页面的策略。帮助用户识别页面模式、构建模板并大规模部署,同时避免因内容单薄而受到惩罚。
什么是程序化 SEO?
程序化 SEO 通过组合以下内容大规模创建页面:
- 页面模板(布局 + 结构)
- 数据源(数据库、API、CSV)
- 动态内容(每个页面独有,而不只是替换变量)
- SEO 优化(元标签、内部链接、结构化数据)
成功的 pSEO 示例:
- Zapier:“如何将 {App A} 连接到 {App B}”(超过 15 万个页面)
- Nomad List:“适合数字游民的 {City}”(超过 1000 个城市页面)
- Wise:“{Currency A} 兑换 {Currency B} 汇率”(超过 1 万个页面)
- G2:“{Software} 评价”(超过 10 万个产品页面)
- Tripadvisor:“{city} 最佳 {type}”(数百万个页面)
流程
第 1 步:确定页面模式
帮助用户找到 pSEO 机会。寻找符合以下模式的内容:
模式公式:{修饰词} + {核心词} + {限定词}
| 模式类型 | 公式 | 示例 | 潜在规模 |
|---|---|---|---|
| 地点 + 服务 | “{service} in {city}” | “plumber in Austin” | 城市数 x 服务数 |
| 比较 | “{product A} vs {product B}” | “Notion vs Asana” | nC2 种组合 |
| 集成 | “{tool A} + {tool B} integration” | “Slack Salesforce integration” | 工具数 x 工具数 |
| 模板/示例 | “{type} template” | “invoice template” | 类型数 |
| 统计数据 | “{topic} statistics {year}” | “remote work statistics 2025” | 主题数 x 年份数 |
| 术语表 | “What is {term}” | “What is APR” | 术语数 |
| 最佳/热门 | “Best {product} for {use case}” | “Best CRM for startups” | 产品数 x 用途数 |
| 评测 | “{product} review” | “Airtable review” | 产品数 |
| 替代品 | “{product} alternatives” | “Slack alternatives” | 产品数 |
| 费用/定价 | “How much does {service} cost” | “How much does a website cost” | 服务数 |
评估 pSEO 机会是否优质的标准:
- 模式至少可生成 100 个页面
- 每种组合都有可衡量的搜索量(即使每月只有 10–50 次,规模化后也可以)
- 你能够为每个页面生成真正有用且独特的内容
- 数据可获取(API、数据库、网页抓取)
- 竞争对手尚未凭借更优质的数据占据主导地位
- 页面满足真实的用户意图(而非只是堆砌关键词)
第 2 步:构建数据源
定义为页面提供数据支持的数据模型:
// Example: City + Service pages
interface PageData {
// URL parameters
slug: string; // "plumber-in-austin-tx"
city: string; // "Austin"
state: string; // "TX"
service: string; // "plumber"
// SEO fields
title: string; // "Best Plumber in Austin, TX | Top 10 for 2025"
metaDescription: string; // "Find the best plumber in Austin, TX..."
h1: string; // "Best Plumber in Austin, TX"
// Dynamic content
providers: Provider[]; // Local providers data
avgCost: number; // Average cost in this market
reviewCount: number; // Total reviews aggregated
faqs: FAQ[]; // Location-specific FAQs
// Related pages (internal linking)
nearbyPages: string[]; // Nearby cities
relatedServices: string[]; // Related services
}
可考虑的数据源:
- 公共 API(政府数据、Wikipedia、行业数据库)
- 网页抓取(需获得许可并遵守 robots.txt)
- 用户生成内容(评价、贡献)
- 针对每个实体生成的 AI 独特分析
- 授权数据(付费数据提供商)
- 内部产品数据(适用于 SaaS/电子商务)
第 3 步:创建页面模板
构建能够生成高质量、独特页面的模板。关键原则:每个页面都必须能独立提供价值。
模板结构
## Page Template: {Pattern Name}
### Above the Fold
- H1: {dynamic title}
- Key stat or hook: {dynamic data point}
- Quick summary: 2-3 sentences with unique data
- CTA (if commercial intent)
### Main Content Section 1: Overview
- {Entity}-specific introduction (NOT generic)
- Unique data point 1: {dynamic}
- Unique data point 2: {dynamic}
- Contextual explanation
### Main Content Section 2: Detailed Analysis
- Comparison table or detailed breakdown
- {Entity}-specific insights
- Data visualizations if applicable
### Main Content Section 3: Practical Information
- How-to or action steps
- Costs, timing, or specifications
- Location-specific or entity-specific details
### Related Content
- Internal links to related pages (same cluster)
- Links to parent/pillar page
- Links to sibling pages
### FAQ Section
- 3-5 questions specific to this entity
- Answers with unique data points
### Schema Markup
- Appropriate structured data for page type
避免内容单薄
**pSEO 面临的首要风险是内容单薄。**每个页面都必须通过以下检查:
| 检查项 | 要求 | 方法 |
|---|---|---|
| 内容独特性 | 超过 60% 的可见文本为此页面独有 | 动态数据、独特分析、UGC |
| 内容深度充足 | 每个页面包含超过 500 字的实质性内容 | 模板章节 + 动态内容 |
| 数据独特性 | 至少有 2 个此实体独有的数据点 | API 数据、计算结果、汇总数据 |
| 对访客有用 | 页面完整解答搜索者的疑问 | 匹配搜索意图 |
| 不显得像自动生成 | 阅读自然,不像模板 | 多样的句式结构、上下文 |
| 内部价值 | 与其他相关页面互相链接 | 相关页面版块、面包屑导航 |
| 视觉内容 | 至少有 1 张独特或相关图片 | 地图、图表、实体图片 |
第 4 步:Next.js 实现
动态路由(App Router)
// app/[service]/[city]/page.tsx
import { Metadata } from 'next';
import { notFound } from 'next/navigation';
import { getPageData, getAllPages } from '@/lib/pseo-data';
interface Props {
params: { service: string; city: string };
}
// Generate static paths at build time
export async function generateStaticParams() {
const pages = await getAllPages();
return pages.map((page) => ({
service: page.serviceSlug,
city: page.citySlug,
}));
}
// Dynamic meta tags
export async function generateMetadata({ params }: Props): Promise<Metadata> {
const data = await getPageData(params.service, params.city);
if (!data) return {};
return {
title: data.title,
description: data.metaDescription,
alternates: {
canonical: `https://example.com/${params.service}/${params.city}`,
},
openGraph: {
title: data.ogTitle,
description: data.ogDescription,
url: `https://example.com/${params.service}/${params.city}`,
type: 'website',
},
};
}
export default async function Page({ params }: Props) {
const data = await getPageData(params.service, params.city);
if (!data) notFound();
const jsonLd = {
'@context': 'https://schema.org',
'@type': 'WebPage',
name: data.title,
description: data.metaDescription,
// ... additional schema
};
return (
<>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
{/* Page component tree */}
</>
);
}
站点地图生成
// app/sitemap.ts
import { MetadataRoute } from 'next';
import { getAllPages } from '@/lib/pseo-data';
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const pages = await getAllPages();
return pages.map((page) => ({
url: `https://example.com/${page.serviceSlug}/${page.citySlug}`,
lastModified: page.updatedAt,
changeFrequency: 'monthly',
priority: 0.7,
}));
}
对于较大的站点地图(50,000 个以上的 URL),请使用站点地图索引:
// app/sitemap.xml/route.ts
import { getAllPageCount } from '@/lib/pseo-data';
export async function GET() {
const totalPages = await getAllPageCount();
const sitemapCount = Math.ceil(totalPages / 50000);
const sitemaps = Array.from({ length: sitemapCount }, (_, i) =>
`<sitemap><loc>https://example.com/sitemap-${i}.xml</loc></sitemap>`
).join('');
return new Response(
`<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
${sitemaps}
</sitemapindex>`,
{ headers: { 'Content-Type': 'application/xml' } }
);
}
Robots.txt 管理
// app/robots.ts
import { MetadataRoute } from 'next';
export default function robots(): MetadataRoute.Robots {
return {
rules: [
{
userAgent: '*',
allow: '/',
disallow: ['/api/', '/admin/'],
},
],
sitemap: 'https://example.com/sitemap.xml',
};
}
第 5 步:内部链接策略
内部链接对程序化 SEO 至关重要。请实施以下模式:
1. 中心辐射式:
Hub: /services/plumber/
|- /plumber/austin-tx
|- /plumber/dallas-tx
|- /plumber/houston-tx
2. 同级链接: 每个城市页面都链接到 5-10 个提供相同服务的附近城市页面。
3. 跨类别链接: 每个城市页面都链接到同一城市中的其他服务。
4. 面包屑导航:
Home > Services > Plumber > Austin, TX
5. 页脚/侧边栏链接: 热门页面和类别索引。
实施模式:
// Internal linking component
function RelatedPages({ currentSlug, relatedPages }) {
return (
<section>
<h2>Related Pages</h2>
<div className="grid grid-cols-2 md:grid-cols-3 gap-4">
{relatedPages.map((page) => (
<Link
key={page.slug}
href={`/${page.slug}`}
className="text-blue-600 hover:underline"
>
{page.title}
</Link>
))}
</div>
</section>
);
}
第 6 步:索引管理
部署数千个页面时,请谨慎管理索引:
逐步推出:
- 先部署 50-100 个页面
- 在 Google Search Console 中监控索引情况
- 检查“已发现 - 尚未编入索引”和“已抓取 - 尚未编入索引”
- 如果索引率 > 80%,则继续分批部署,每批 500-1000 个
- 如果索引率 < 50%,则在部署更多页面前提升页面质量
索引信号:
- 将站点地图提交到 Google Search Console
- 使用 IndexNow API(Bing、Yandex)加快发现速度
- 从现有高权威页面添加内部链接
- 在社交媒体上分享初始页面,以发送抓取信号
质量阈值:
- 如果 Google 索引的页面 < 30%,你的模板很可能生成了单薄内容
- 如果页面被编入索引后又被移除,说明内容质量处于边缘水平
- 在 GSC 中监控程序化 SEO 页面的“网页体验”和“核心网页指标”
第 7 步:元标记公式
使用以下公式批量生成元标记:
标题标签公式(50-60 个字符):
"{Primary Keyword} in {Location} | {Brand}"
"Best {Service} in {City}, {State} ({Year})"
"{Product A} vs {Product B}: {Differentiator}"
"{Number} Best {Category} for {Use Case} ({Year})"
"How Much Does {Service} Cost in {City}? ({Year} Pricing)"
元描述公式(150-160 个字符):
"Find the best {service} in {city}. Compare {X} local providers, read {Y} reviews, and get free quotes. Average cost: ${Z}."
"Detailed comparison of {A} vs {B}. See features, pricing, pros/cons, and which is better for {use case}."
"{X} best {category} for {audience}. We analyzed {Y} options based on {criteria}. Updated for {year}."
H1 公式:
"Best {Service} in {City}, {State}"
"{Product A} vs {Product B}: Complete Comparison"
"{Number} Best {Category} for {Use Case}"
输出
为用户提供程序化 SEO 帮助时,请交付:
- 机会分析 - 模式、预计页面数量、流量潜力
- 数据模型 - 页面数据的 TypeScript 接口
- 页面模板 - 包含所有部分的完整模板
- 示例页面 - 2-3 个完整渲染的示例页面
- 实施计划 - 用于路由、站点地图和 robots.txt 的 Next.js 代码
- 内部链接策略 - 页面之间的关联方式
- 索引计划 - 推出时间表和监控指标
- 质量检查清单 - 每个页面的质量标准
常见问题
- 模板堆砌: 只是在相同文本中替换城市名称 = 单薄内容惩罚
- 缺少独有数据: 不包含特定实体数据点的页面没有任何价值
- 过度生成: 为搜索量为零的组合创建页面会浪费抓取预算
- 忽略关键词蚕食: 内容重叠的页面会相互竞争。每个页面对应一个关键词。
- 没有内部链接: 孤立页面不会被抓取或获得排名
- 一次性全部部署: 一夜之间部署 100K 个页面看起来不自然。请分批部署。
- 忽略 noindex: 有些页面可能不值得被索引。对低质量或重复的组合使用
noindex。
评论
支持 Markdown