---
name: intent-atlas
description: Connect to the Intent Atlas API to run site diagnostics (Intent Atlas Site Checker, Site Fixer, Site Planner), inspect and execute Agent Page Build Queues (agent_page_queue.json), order SEO page builds page-by-page or wave-by-wave, download finished deliverables (report.md, writers_guide.md, content.md, build_guide.md), and build or update pages on the user's website.
---

# Intent Atlas — Customer API & Autonomous Site Builder Skill

Use this skill whenever the user asks you to audit their site with Intent Atlas, fix thin/bloated pages, plan a Hub & Spoke site structure, execute an `agent_build_playbook.md` or `agent_page_queue.json`, order new pages, or build/update pages from Intent Atlas deliverables.

---

## 1. Authentication & Setup

Credentials are stored in `~/.config/intent-atlas/credentials.env`:
- `ATLAS_API_KEY`: Your scoped Intent Atlas seat key (`ak_...`)
- `ATLAS_API_URL`: API base URL (default: `https://clients.intentatlas.ai`)

### Connect or Verify Your Account
If `~/.config/intent-atlas/credentials.env` does not exist yet, run the installer or device login flow:
```bash
curl -fsSL https://clients.intentatlas.ai/agent-installer.sh | sh
```
Or verify an existing connection:
```bash
atlas-client whoami
```

---

## 2. CLI Commands (`atlas-client`)

The `atlas-client` CLI (`~/.local/bin/atlas-client` or `node ~/.intent-atlas/bin/atlas-client.mjs`) wraps all Intent Atlas API endpoints:

### A. Site Diagnostics & Planning Tools (3 Deliverable Depth Levels)

Both **Site Fixer** and **Site Planner** support `--level essential|architect|agent_ready` (default: `agent_ready`):
- **Level 1 (`essential`)**: Core report (`site_fixer_report.md` or `site_planner_report.md`) with What to Build, explicit **What NOT to Build** guardrails, and Publishing Velocity Schedule (plus `redirects-301.conf` and `purge-sitemap.xml` for Site Fixer).
- **Level 2 (`architect`)**: Everything in Level 1 PLUS `internal_linking_blueprint.md` (Header/Mega-Menu, 4-Column Siloed Footer, Breadcrumbs, and exact anchor text & section placement matrix) and `tech_seo_and_schema.md` (URL slug rules, canonicals, `robots.txt`, XML sitemap segmentation, and copy-paste JSON-LD `@graph` Schema templates).
- **Level 3 (`agent_ready` — Default)**: Everything in Levels 1 & 2 PLUS `agent_build_playbook.md` (Agent-Executable Site Build Playbook) and `agent_page_queue.json` + `agent_page_queue.md` (Wave-by-Wave ordered page build queue with exact `atlas-client` commands).

1. **Intent Atlas Site Checker (Audit Whether a Site is Healthy or Broken)**
   ```bash
   atlas-client site-checker <domain> --topic "<core topic>" --out ./reports/site-checker
   ```
   - Calls `POST /v1/tools/grade-site`
   - Saves `site_checker_report.md` and `grade.json` with URL-by-URL classifications (`Core Pillar`, `Supporting Sub-Page`, `Deep Sub-Page`, `Thin Leaf`, `Utility Noise`).

2. **Intent Atlas Site Fixer (For Broken/Penalized Sites — 3-Bucket Recovery, 301s & Agent Rebuild Queue)**
   ```bash
   atlas-client site-fixer <domain> --topic "<core topic>" --tier standard --level agent_ready --out ./reports/site-fixer
   ```
   - Calls `POST /v1/tools/plan-recovery`
   - Saves:
     - `site_fixer_report.md`: Complete 3-Bucket Recovery Plan + What NOT to Build guardrails + Publishing Velocity Schedule
     - `redirects-301.conf`: Ready-to-paste Apache `.htaccess`, Nginx `301`, and `410 Gone` rules
     - `purge-sitemap.xml`: 14-day Google Search Console fast-flush XML sitemap
     - `internal_linking_blueprint.md`: Nav/Footer/Breadcrumb architecture + surviving & rebuild internal link matrix (`architect` & `agent_ready`)
      - `tech_seo_and_schema.md`: Technical SEO rules + JSON-LD `@graph` Schema templates (`architect` & `agent_ready`)
      - `cms_and_rollout_guide.md`: CMS Execution, URL Migration & Safe Publishing Rollout Guide (WordPress, Shopify, Webflow, Next.js/Astro, and 3-Wave Deployment Checklists)
      - `agent_build_playbook.md`, `agent_page_queue.md`, & `agent_page_queue.json`: Step-by-step agent execution instructions and ordered build queue (`agent_ready`)

3. **Intent Atlas Site Planner (For Healthy or New Sites — Hub & Spoke Blueprint, Link Map & Agent Build Queue)**
   ```bash
   atlas-client site-planner <domain> --niche "<market or niche>" --tier standard --level agent_ready --out ./reports/site-planner
   ```
   - Calls `POST /v1/tools/plan-site` (alias: `atlas-client hub-spoke`; supports `--archetype service|local-national|ecom|saas|affiliate|info`, `--states NY,CA,TX`, `--services "Plumbing,Drain Cleaning"`)
   - Saves:
     - `site_planner_report.md` (and `hub_and_spoke_plan.md`): Core Pillars (`Hubs`), Supporting Sub-Pages (`Spokes`), **What NOT to Build** guardrails, and Publishing Velocity Schedule
     - `internal_linking_blueprint.md`: Header/Mega-Menu, 4-Column Siloed Footer, Breadcrumbs, and Hub↔Spoke anchor matrix (`architect` & `agent_ready`)
     - `tech_seo_and_schema.md`: Technical SEO specifications + JSON-LD `@graph` Schema templates (`architect` & `agent_ready`)
     - `cms_and_rollout_guide.md`: CMS Execution, URL Migration & Safe Publishing Rollout Guide (WordPress, Shopify, Webflow, Next.js/Astro, and 3-Wave Deployment Checklists)
     - `agent_build_playbook.md`, `agent_page_queue.md`, & `agent_page_queue.json`: Agent Site Build Playbook and ordered wave-by-wave page queue (`agent_ready`)

---

### B. Executing `agent_page_queue.json` & Ordering Authority Page Builds

0. **Check Page Build Credit Balance (`credits` / `balance`)**
   ```bash
   atlas-client credits
   # Alias:
   atlas-client balance
   ```
   - Displays your workspace's available `page_credits` balance and per-page credit rates (`budget`: 35 credits, `standard`: 65 credits, `premium`: 100 credits, `ultra`: 200 credits).

1. **Inspect Queue Progress (`queue-status`)**
   ```bash
   atlas-client queue-status ./agent_page_queue.json
   ```
   - Shows total pages, Wave 1 / Wave 2 / Wave 3 progress, and the next pending page to order.

2. **Order the Next Page in the Queue (`order-next`)**
   ```bash
   atlas-client order-next ./agent_page_queue.json
   # Optional overrides:
   atlas-client order-next ./agent_page_queue.json --tier premium --wave 1
   ```
   - Reads `agent_page_queue.json`, orders the next pending page via `POST /v1/content`, records `status: "ordered"` and `call_id` inside `agent_page_queue.json`, and prints the status & pull commands.

3. **Order a Single Page Build Directly (`order-page` — `budget`, `standard`, `premium`, or `ultra`)**
   ```bash
   atlas-client order-page \
     --keyword "<target keyword>" \
     --url "/target-slug/" \
     --domain "<domain>" \
     --tier premium \
     --type provider \
     --country us \
     --about "<1-2 sentences describing the business, services, pricing, and location>"
   ```
   - Add `--fan-out` when ordering a Core Pillar + Supporting Sub-Page fan-out bundle.
   - Calls `POST /v1/content` and returns a `call_id` (`ct_...`).

4. **Check Job / Order Status**
   ```bash
   atlas-client status <call_id>
   atlas-client jobs
   ```

5. **Download Finished Deliverables for a Page**
   ```bash
   atlas-client pull <call_id> --out ./deliverables/<page-slug>
   ```
   Downloads the client deliverables into `./deliverables/<page-slug>/`:
   - `report.md` — **Search & Page Strategy Report** (searcher intent, competitor analysis, buyer questions, section plan)
   - `writers_guide.md` — **Writer's Guide** (research dossier and section-by-section writing instructions)
   - `content.md` — **Finished Page Copy** (ready-to-publish Markdown copy with headings, tables, and FAQ sections)
   - `build_guide.md` — **Developer & Designer Build Guide** (layout hierarchy, interactive tables/calculators, conversion placement, and schema markup)
   - `issues.md` — **Business Fact Placeholders** (lists any `{{PLACEHOLDER}}` tokens in `content.md` where specific business facts like phone number, license number, or exact pricing need to be filled in)

---

## 3. How to Build or Update Pages on the Customer's Site

When building or updating a site from Intent Atlas deliverables:
1. **Follow `agent_build_playbook.md` and `agent_page_queue.json` wave by wave:**
   - **Wave 1**: Build or update the Homepage and Core Pillars first, plus global Header, 4-Column Siloed Footer, and Breadcrumb components from `internal_linking_blueprint.md`.
   - **Wave 2**: Build primary Supporting Sub-Pages (`Spokes`) and wire up bidirectional Hub ↔ Spoke links.
   - **Wave 3**: Build remaining Supporting Sub-Pages and Deep Sub-Pages.
2. **Enforce Anti-Bloat Guardrails (`do_not_create_subpages_for`):**
   - Never create separate standalone URLs for topics listed in `do_not_create_subpages_for` or the **What NOT to Build** table. Keep those topics as `75–120w` sections (with `#section-anchor` IDs) inside their parent page.
3. **Read `content.md`, `build_guide.md`, and `tech_seo_and_schema.md` together:**
   - Resolve any `{{PLACEHOLDER}}` tokens listed in `issues.md` using verified facts from the user's codebase or by asking the user.
   - Inject the JSON-LD `@graph` Schema markup from `tech_seo_and_schema.md` using the page's `schema_types`.
4. **When executing a Site Fixer plan (`site_fixer_report.md`):**
   - Always add the absorbed `75–120w` sections (with their `#section-anchor` IDs) to the surviving **Bucket 1** parent pages **before** activating the **Bucket 2** `301` redirects in `redirects-301.conf`.
   - Deploy `purge-sitemap.xml` and remind the user to submit it in Google Search Console for 14–21 days.

---

## 4. Direct REST API Reference

All endpoints accept `Authorization: Bearer $ATLAS_API_KEY` and `Content-Type: application/json`:
- `GET  /v1/health` — Check API health and authenticated seat name
- `GET  /v1/tools/credits?client=<name>` — Check workspace `page_credits` balance
- `POST /v1/tools/grade-site` — Body: `{ "domain": "example.com", "core_topic": "..." }`
- `POST /v1/tools/plan-recovery` — Body: `{ "domain": "example.com", "core_topic": "...", "target_tier": "standard", "domain_type": "auction", "level": "agent_ready" }`
- `POST /v1/tools/plan-site` — Body: `{ "domain": "example.com", "niche": "...", "target_tier": "standard", "domain_type": "auction", "level": "agent_ready" }`
- `POST /v1/content` — Body: `{ "client": "...", "site": "example.com", "project": "site-build", "tier": "premium", "keyword": "...", "country": "us", "page_type": "provider", "page_statement": "..." }`
- `GET  /v1/content/<call_id>` — Poll call status and retrieve outputs
- `GET  /v1/reports/<call_id>/<file>` — Download `report.md`, `writers_guide.md`, `content.md`, `build_guide.md`, `issues.md`, or `bundle.zip`
