← Back to the skills catalog

Skill Detail

Setup Blog SEO Foundation

stable

Set up a reusable blog, SEO, and discovery foundation for a Next.js App Router project: site constants, reusable metadata helpers, MDX content collections, Zod frontmatter validation, blog index/detail routes, article JSON-LD, CSP and security headers in `next.config.ts`, `llms.txt`, RSS, sitemap, robots, and Open Graph image resolution. Use when creating or refactoring a content-driven site or blog that needs consistent metadata, crawlable outputs, and contributor rules documented in `AGENTS.md` and/or `README.md`.

7 files
View on GitHub

Install

npx skills add dqstartupbuild/skills/library/seo-setup

README Preview

Overview

Open README

Setup Blog SEO Foundation Skill

A highly opinionated, reusable infrastructure for Next.js App Router projects that provides a battle-tested foundation for blog content, SEO optimization, and discovery.

🚀 Overview

This skill automates the setup of a professional content delivery system. It ensures clean separation of concerns between site constants, content logic, metadata generation, and security headers, resulting in a high-performance, crawlable, and secure site.

Key Features

  • MDX Pipeline: Powered by @content-collections/core with Zod validation.
  • Metadata Engine: Centralized helpers for titles, descriptions, canonicals, and OG images.
  • Security Headers: Managed CSP and security headers configuration in next.config.ts.
  • Discovery Layer: Automated sitemap.ts, robots.ts, RSS feeds (feed.xml), and llms.txt.
  • Premium SEO: Integrated JSON-LD (Schema.org) for articles and landing pages.

📦 Installation

To add this skill to all your local agents (Claude Code, Cursor, Windsurf, etc.), run the following command:

npx skills add https://github.com/dqstartupbuild/skills/library/seo-setup

🛠️ Usage

This skill should be invoked when:

  1. Starting a new project: Setting up the architectural bones for content and SEO.
  2. Adding a blog: Integrating MDX-based article collections.
  3. SEO Refactoring: Moving from ad-hoc metadata to a structured, helper-driven system.

Triggering the Skill

The agent will automatically recognize your intent when you ask to "set up a blog," "configure SEO," or "add security headers to a Next.js app."

🧩 Architectural Principles

  • Single Source of Truth: All site constants (URLs, brand names) live in lib/site.ts.
  • Thin Pages: Routing components should remain minimal, delegating logic to query helpers (lib/content/queries.ts).
  • Standardized Metadata: Strict enforcement of character lengths (Titles: 50-70, Descriptions: 110-170) and absolute canonical URLs.

📂 Repository Structure

  • SKILL.md: The primary instruction file for the AI agent.
  • references/: Specialized playbooks for each architectural layer.
    • implementation-checklist.md: The ordered sequence for successful setup.
    • source-map.md: Recommended file structure and responsibility split.
    • content-contract.md: Frontmatter schema and editorial rules.
    • security-and-discovery.md: CSP, security headers, and crawler optimization.

README.md

1
# Setup Blog SEO Foundation Skill
2
 
3
A highly opinionated, reusable infrastructure for Next.js App Router projects that provides a battle-tested foundation for blog content, SEO optimization, and discovery.
4
 
5
## 🚀 Overview
6
 
7
This skill automates the setup of a professional content delivery system. It ensures clean separation of concerns between site constants, content logic, metadata generation, and security headers, resulting in a high-performance, crawlable, and secure site.
8
 
9
### Key Features
10
- **MDX Pipeline**: Powered by `@content-collections/core` with Zod validation.
11
- **Metadata Engine**: Centralized helpers for titles, descriptions, canonicals, and OG images.
12
- **Security Headers**: Managed CSP and security headers configuration in `next.config.ts`.
13
- **Discovery Layer**: Automated `sitemap.ts`, `robots.ts`, RSS feeds (`feed.xml`), and `llms.txt`.
14
- **Premium SEO**: Integrated JSON-LD (Schema.org) for articles and landing pages.
15
 
16
## 📦 Installation
17
 
18
To add this skill to all your local agents (Claude Code, Cursor, Windsurf, etc.), run the following command:
19
 
20
```bash
21
npx skills add https://github.com/dqstartupbuild/skills/library/seo-setup
22
```
23
 
24
## 🛠️ Usage
25
 
26
This skill should be invoked when:
27
1. **Starting a new project**: Setting up the architectural bones for content and SEO.
28
2. **Adding a blog**: Integrating MDX-based article collections.
29
3. **SEO Refactoring**: Moving from ad-hoc metadata to a structured, helper-driven system.
30
 
31
### Triggering the Skill
32
The agent will automatically recognize your intent when you ask to "set up a blog," "configure SEO," or "add security headers to a Next.js app."
33
 
34
## 🧩 Architectural Principles
35
 
36
- **Single Source of Truth**: All site constants (URLs, brand names) live in `lib/site.ts`.
37
- **Thin Pages**: Routing components should remain minimal, delegating logic to query helpers (`lib/content/queries.ts`).
38
- **Standardized Metadata**: Strict enforcement of character lengths (Titles: 50-70, Descriptions: 110-170) and absolute canonical URLs.
39
 
40
## 📂 Repository Structure
41
 
42
- `SKILL.md`: The primary instruction file for the AI agent.
43
- `references/`: Specialized playbooks for each architectural layer.
44
  - `implementation-checklist.md`: The ordered sequence for successful setup.
45
  - `source-map.md`: Recommended file structure and responsibility split.
46
  - `content-contract.md`: Frontmatter schema and editorial rules.
47
  - `security-and-discovery.md`: CSP, security headers, and crawler optimization.
48