# Blog Cannibalization

Detect keyword cannibalization across blog posts by extracting primary keywords from...

- Repository: https://github.com/AgriciDaniel/claude-blog (2608 stars)
- Category: Writing
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add AgriciDaniel/claude-blog --skill blog-cannibalization -g -a claude-code -y`
Codex: `npx skills add AgriciDaniel/claude-blog --skill blog-cannibalization -g -a codex -y`
Cursor: `npx skills add AgriciDaniel/claude-blog --skill blog-cannibalization -g -a cursor -y`
Gemini CLI: `npx skills add AgriciDaniel/claude-blog --skill blog-cannibalization -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add AgriciDaniel/claude-blog`

## Description

Detect keyword cannibalization across blog posts by extracting primary keywords from titles and headings, clustering semantically similar targets, and flagging posts competing for the same search intent. Supports local-only mode (grep-based) and DataForSEO API mode (Page Intersection endpoint at ~$0.01/call). Outputs severity-scored report with merge or differentiate recommendations. Use when user says "cannibalization", "keyword overlap", "competing pages", "duplicate keywords", "cannibalize".

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Blog Cannibalization - Keyword Overlap Detection

Detect when multiple blog posts compete for the same search keywords. Two modes:
local-only analysis (default) and DataForSEO API mode for SERP-level data.

## Two Modes

| Mode | Flag | Cost | Data Source |
|------|------|------|-------------|
| Local | (default) | Free | File content analysis via Grep/Read |
| API | `--api` | ~$0.01/call | DataForSEO Page Intersection + Ranked Keywords |

Local mode works without any API keys. API mode requires DataForSEO credentials
set as environment variables: `DATAFORSEO_LOGIN` and `DATAFORSEO_PASSWORD`.

## Local Mode Workflow

### Step 1: Scan Blog Files

Use Glob to find all content files in the target directory:
- Patterns: `**/*.md`, `**/*.mdx`, `**/*.html`
- Skip files in `node_modules/`, `.git/`, `drafts/`

### Step 2: Extract Primary Keywords

For each file, read and extract keyword signals from:
- **Title tag** or H1 heading (highest weight)
- **H2 headings** (medium weight)
- **First paragraph** (supporting signal)
- **Meta description** if present in frontmatter

Primary keyword extraction method:
1. Tokenize title, H1, H2s, meta description, and first paragraph into 1-gram,
   2-gram, and 3-gram phrases.
2. Normalize deterministically: lowercase, remove locale-aware stop words,
   lemmatize or stem consistently, preserve product names, and keep intent
   modifiers such as "best", "pricing", "vs", "review", "template", and year.
3. Score sections separately: title/H1 highest, meta description and H2s medium,
   first paragraph supporting.
4. Select the top-scoring 2-3 word phrase as the primary keyword and record
   secondary keywords from H2 headings.

### Step 3: Cluster by Similarity

Group posts into clusters using these matching rules (in priority order):

The rest: https://github.com/AgriciDaniel/claude-blog/blob/HEAD/brain/.raw/sources/claude-blog-skill/skills/blog-cannibalization/SKILL.md
