blog-cannibalizationlisted
Install: claude install-skill gaznilmuzammil12-prog/seo-skills-by-gaznil
# 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 and H1 into 1-gram, 2-gram, and 3-gram phrases
2. Score each phrase by frequency across title + H2s + first paragraph
3. Select the top-scoring 2-3 word phrase as the primary keyword
4. Record secondary keywords from H2 headings
### Step 3: Cluster by Similarity
Group posts into clusters using these matching rules (in priority order):
1. **Exact match** - ident