GitHunt
MA

maciekpaszkiewicz/keyword-mapper

πŸ—ΊοΈ Autonomous SEO keyword research & URL mapping agent for Claude Code. Fetches sitemap, queries DataForSEO, maps keywords to URLs with anti-cannibalization.

πŸ—ΊοΈ Keyword Mapper β€” Claude Code Agent

Autonomous SEO keyword research & URL mapping agent for Claude Code. Fetches your sitemap, queries DataForSEO, analyzes competitors, and produces a complete keyword-to-URL map with anti-cannibalization β€” all in one prompt.


✨ What It Does

Phase Description
1. URL Recon Parses your XML sitemap (or crawls JS-rendered SPAs via crawl4ai) and extracts clean page URLs
2. Data Ingestion Queries DataForSEO for ranked keywords, keyword ideas, competitor domains, content gaps, search intent & keyword difficulty
3. Deterministic Mapping Maps Primary KW β†’ URL (1:1, no duplicates), assigns Secondary KWs, validates intent match, runs anti-cannibalization checks
4. Gap Analysis Suggests additional keywords for weak pages, proposes new pages for uncovered transactional/commercial queries

Output Sections

  • A. Complete Keyword β†’ URL map (every sitemap URL included)
  • B. 20-30 additional keyword suggestions for existing URLs
  • C. Content gap β€” new page proposals with slug, H1, title & meta description
  • D. Competitor analysis matrix
  • E. Strategic SEO recommendations with priority levels

πŸš€ Quick Start

Prerequisites

  • Claude Code (Claude's CLI agent)
  • DataForSEO MCP server configured (dfs-mcp)
  • crawl4ai MCP server (optional, for JS-rendered sites)

Installation

Copy the agent file into your Claude Code agents directory:

# Create the agents directory if it doesn't exist
mkdir -p .claude/agents

# Copy the agent
cp keyword-mapper.md .claude/agents/keyword-mapper.md

Usage

Invoke the agent in Claude Code with @keyword-mapper:

@keyword-mapper

Biznes: Sklep internetowy z alkomatorami profesjonalnymi dla firm i policji.
Sprzedajemy alkomaty Lion, Promiler, AlkoHit. DziaΕ‚amy w Polsce.

Sitemap: https://example.com/sitemap.xml

Konkurenci: promiler.pl, alko-tester.pl, alkotest.pl
Filtr: KD max 60, Volume min 200, jΔ™zyk pl, lokalizacja Polska

The agent will produce a keyword-map-{domain}.md file in your working directory.


βš™οΈ Configuration

Parameter Default Description
KD max 70 Maximum keyword difficulty
Volume min 100 Minimum monthly search volume
JΔ™zyk pl Language code
Lokalizacja Polska (2616) DataForSEO location code
Konkurenci auto-detected Competitor domains for gap analysis

πŸ”§ Required MCP Tools

The agent uses these MCP tool endpoints:

Tool Purpose
WebFetch Fetching sitemap XML
Bash Saving output to file
crawl4ai β†’ crawl Crawling JS-rendered pages
crawl4ai β†’ map Mapping site topology
dfs-mcp β†’ ranked_keywords Current domain rankings
dfs-mcp β†’ keyword_ideas Seed keyword expansion
dfs-mcp β†’ related_keywords Related keyword discovery
dfs-mcp β†’ search_intent Intent classification
dfs-mcp β†’ competitors_domain Competitor detection
dfs-mcp β†’ domain_intersection Content gap analysis
dfs-mcp β†’ bulk_keyword_difficulty KD scoring
dfs-mcp β†’ serp_organic_live_advanced Live SERP data

πŸ“‹ Output Example

The agent generates a Markdown dashboard:

# πŸ—ΊοΈ Keyword Map – example.com | 2026-02-17

## Podsumowanie
| Metric              | WartoΕ›Δ‡               |
|---------------------|-----------------------|
| URL-e przeanalizowane | 87                  |
| URL-e zmapowane     | 72                    |
| Frazy uΕΌyte Ε‚Δ…cznie | 215                   |
| Content gaps        | 12                    |
| Top konkurent       | rival.pl (45 fraz)    |

## A. Mapa Keyword β†’ URL
| URL | Primary KW (Vol) | Secondary KWs (Vol) | Intent | KD | Pozycja |
|-----|-------------------|---------------------|--------|----|---------|
| /   | alkomaty (1200)   | alkomat (800)       | Komercyjna | 34 | 5  |
| ... | ...               | ...                 | ...    | ...| ...     |

🌍 Language

The agent's interface and output are in Polish πŸ‡΅πŸ‡± β€” designed for the Polish SEO market. It uses Polish intent labels (Transakcyjna, Komercyjna, Informacyjna, Nawigacyjna) and defaults to Polish language/location settings in DataForSEO.


πŸ“„ License

MIT License β€” see LICENSE for details.


🀝 Contributing

  1. Fork the repo
  2. Create your feature branch (git checkout -b feature/my-improvement)
  3. Commit your changes (git commit -m 'Add my improvement')
  4. Push to the branch (git push origin feature/my-improvement)
  5. Open a Pull Request

Made with ❀️ for SEO professionals using Claude Code.