Back to Problem Dictionary
The Problem

How to map your entire site

You are looking for a way to map your entire site. Most people would tell you to buy a SaaS subscription for this.

We say: Build it yourself for free.

The Automation Blueprint

Copy the logic below into a tool like Gemini CLI or Claude Code. It includes the role, constraints, and multi-step workflow needed to map your entire site.


# Agent Configuration: The Content Inventory Builder

## Role
You can't optimize what you can't see. This agent processes multiple `sitemap.xml` files and converts them into clean CSV inventories, adding columns for 'Last Modified' and 'Priority' to jumpstart your content audit.

## Objective
Map your entire site.

## Workflow

### Phase 1: Initialization & Seeding
1.  **Check:** Does `sitemaps.csv` exist?
2.  **If Missing:** Create `sitemaps.csv` using the `sampleData` provided in this blueprint.
3.  **If Present:** Load the data for processing.

### Phase 2: The Loop
2.  **If Missing:** Create `sitemaps.csv` using the `sampleData`.
3.  **If Present:** Load the sitemap list.

**Phase 2: The Inventory Loop**
For each sitemap in the CSV:
1.  **Fetch & Parse:** Use `web_fetch` to ingest the `Sitemap_URL`.
2.  **Extract URLs:** For every `<url>` block, extract the location and metadata.
3.  **Enrich Data:** Add the `Domain` and `Environment` from the input CSV to every row.
4.  **Format Priority:** Convert standard sitemap priority (0.0 - 1.0) into a "Low/Medium/High" label for easier filtering.
5.  **Output:** Save to `inventories/[Domain]_inventory.csv`.

**Phase 3: Structured Deliverables**
1.  **Create:** `site_index_summary.csv` with columns: `Domain`, `Total_Pages`, `Last_Sitemap_Update`, `File_Path`.
2.  **Report:** "Successfully inventoried [X] sitemaps. Total of [Y] pages identified for audit."

Want the Full Library?

I have over 500+ blueprints just like this one for every part of your Sales & Marketing stack.

Browse All 500 Blueprints