
Programmatic Seo
Plan large-scale comparison and variable URL sets from JSON templates before generating SEO landing pages.
Overview
Programmatic SEO is an agent skill for the Launch phase that generates URL patterns and page slug inventories from JSON templates for scaled organic pages.
Install
npx skills add https://github.com/alirezarezvani/claude-skills --skill programmatic-seoWhat is this skill?
- Python url_pattern_generator.py expands template variables via Cartesian product
- JSON config: template string, variables map, optional base_url
- Skips self-comparison combos when variable values would duplicate in one URL
- CLI supports demo mode, data file input, and --json output for agent pipelines
- 3 CLI modes: demo, data.json input, --json output
Adoption & trust: 526 installs on skills.sh; 17.5k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You have dozens of keyword or entity combinations but no systematic URL list, so programmatic pages would ship with collisions or missing routes.
Who is it for?
Indie SaaS and content sites planning comparison, directory, or long-tail landing grids from structured data.
Skip if: Single-page brands with no template matrix, or teams that need on-page copy and schema generation in the same step.
When should I use this skill?
Use when planning template-based programmatic SEO pages and you need URL combinations from a data source config.
What do I get? / Deliverables
You export a deduplicated URL catalog from template plus variables, ready to feed page generators, CMS imports, or sitemap builds.
- URL list with slugs derived from template variables
- Optional JSON export for downstream build pipelines
Recommended Skills
Journey fit
Programmatic SEO is a go-to-market motion: turning structured data into indexable URLs after the product exists. The url_pattern_generator expands template slugs and base paths—the core planning step for template-based organic pages.
How it compares
Use this slug planner instead of manual spreadsheets when scaling SEO templates—not a full CMS or rank-tracking suite.
Common Questions / FAQ
Who is programmatic-seo for?
Solo builders and growth-minded devs automating large SEO page sets who want agent-friendly URL planning from JSON configs.
When should I use programmatic-seo?
Use it in Launch SEO when you are defining programmatic routes—comparison URLs, geo or feature permutations—before generating HTML or MDX at scale.
Is programmatic-seo safe to install?
The bundled script runs locally on your JSON inputs; review the Security Audits panel on this Prism page and inspect the Python file before running untrusted configs.
SKILL.md
READMESKILL.md - Programmatic Seo
#!/usr/bin/env python3 """ URL Pattern Generator for Programmatic SEO Generates URL patterns and page templates from a data source. Helps plan template-based page generation at scale. Usage: python3 url_pattern_generator.py # Demo mode python3 url_pattern_generator.py data.json # From data file python3 url_pattern_generator.py data.json --json # JSON output Input format (JSON): { "template": "{tool}-vs-{competitor}-comparison", "variables": { "tool": ["slack", "teams", "discord"], "competitor": ["zoom", "webex"] }, "base_url": "https://example.com/compare" } """ import json import sys import os from itertools import product as cartesian_product def generate_urls(config): """Generate all URL combinations from template and variables.""" template = config["template"] variables = config["variables"] base_url = config.get("base_url", "https://example.com") var_names = list(variables.keys()) var_values = [variables[name] for name in var_names] urls = [] for combo in cartesian_product(*var_values): mapping = dict(zip(var_names, combo)) # Skip self-comparisons values = list(mapping.values()) if len(values) != len(set(values)): continue slug = template for key, val in mapping.items(): slug = slug.replace("{" + key + "}", str(val).lower().replace(" ", "-")) url = f"{base_url}/{slug}" urls.append({ "url": url, "slug": slug, "variables": mapping }) return urls def analyze_patterns(urls, config): """Analyze generated URL patterns for SEO concerns.""" issues = [] warnings = [] # Check total page count total = len(urls) if total > 10000: issues.append(f"Generating {total:,} pages — risk of thin content penalty. Consider narrowing variables.") elif total > 1000: warnings.append(f"Generating {total:,} pages — ensure each has unique, substantial content.") # Check URL length long_urls = [u for u in urls if len(u["url"]) > 75] if long_urls: warnings.append(f"{len(long_urls)} URLs exceed 75 chars — may truncate in SERPs.") # Check for potential duplicate intent template = config["template"] var_names = list(config["variables"].keys()) if len(var_names) >= 2: # Check if swapped variables create duplicate intent # e.g., "slack-vs-zoom" and "zoom-vs-slack" seen_pairs = set() dupes = 0 for u in urls: vals = tuple(sorted(u["variables"].values())) if vals in seen_pairs: dupes += 1 seen_pairs.add(vals) if dupes > 0: warnings.append(f"{dupes} URL pairs may have duplicate search intent (e.g., 'A vs B' and 'B vs A'). Consider canonicalizing.") # Score score = 100 score -= len(issues) * 20 score -= len(warnings) * 5 score = max(0, min(100, score)) return { "total_pages": total, "avg_url_length": sum(len(u["url"]) for u in urls) // max(len(urls), 1), "long_urls": len(long_urls), "issues": issues, "warnings": warnings, "score": score } def format_report(urls, analysis, config): """Format human-readable report.""" lines = [] lines.append("") lines.append("=" * 60) lines.append(" PROGRAMMATIC SEO — URL PATTERN REPORT") lines.append("=" * 60) lines.append("") lines.append(f" Template: {config['template']}") lines.append(f" Base URL: {config.get('base_url', 'https://example.com')}") lines.append(f" Variables: {len(config['variables'])} ({', '.join(config['variables'].keys())})") lines.append(f" Total Pages: {analysis['total_pages']:,}") lines.append(f" Avg URL Len: {analysis['avg_url_length']} chars") lines.append("") # Score score = analysis["score"] bar_filled = score // 5 bar = "