SEO Rank Watch: AI-Driven SEO Optimization Prompt and Workflow for Unattended Websites
A prompt and execution framework for automating continuous Google SEO improvements with AI agents on completely unattended websites.
Skill Name: SEO Rank Watch
Primary Goal: Continuously improve Google search rankings for target web properties. Identify keywords close to ranking #1, implement a targeted improvement satisfying user search intent, and observe for 7 days. Repeat until position #1 is achieved.

Data Architecture & State Files
The workflow relies on three core JSON files:
data/seo/watchwords.json— Monitored keyword list, target landing pages, and optimization priority.data/seo/rank-history.json— Historical rank tracking (append-only; never rewrite historical rows).data/seo/improvement-log.json— Action audit logs, current status, and scheduled review dates.
State Machine
active— Ready for candidate evaluation and optimization.observing— Under a mandatory 7-day post-optimization cooldown.achieved— Ranked #1; monitored without active changes.
Execution Workflow
1. Measure Current Rankings
Measure benchmark positions using Google Search Console (GSC):
node .claude/skills/seo-rank-watch/scripts/fetch_gsc_ranks.mjs \
--repo <REPO_PATH> --append
- Retrieve average position, impressions, and clicks from GSC, then compare against prior records.
- Use WebSearch only when GSC is unavailable or for real-time same-day sanity checks. GSC data remains the single source of truth.
rank: null + impressions 0does not necessarily mean unindexed; verify via search when appropriate.
2. Review Completed 7-Day Observations
Filter keywords where nextReviewDate <= Today.
- Evaluate performance using the trailing 7-day GSC window rather than a 28-day moving average:
node .claude/skills/seo-rank-watch/scripts/fetch_gsc_ranks.mjs \
--repo <REPO_PATH> --days 7
- Evaluation Rules:
- Reached #1 → Transition state to
achieved. - Improved but not yet #1 → Revert to
activefor the next iterative cycle. - No noticeable effect → Revert to
activewith a mandatory directive to apply a different optimization strategy next time.
- Reached #1 → Transition state to
- Write evaluation verdicts to
improvement-log.json.
3. Select Exactly One Keyword for Today
Exclude keywords in observing or achieved state, and select only 1 keyword following this priority order:
- Ranked positions 2–10 with verified impressions (closest to #1).
- Ranked positions 11–20 with higher impression volumes.
- Previously improved keywords that stalled / had no effect.
- High-priority
rank: nullterms. - High-potential unmonitored queries discovered in GSC reports.
Note: If no qualified candidate exists, terminate after rank reporting. Never force optimizations without clear intent.
4. Search Intent Gap Analysis
Before modifying any source code or content:
- State clearly in 1–2 sentences: "Who is searching, and what specific problem are they trying to solve?"
- Examine the top 1–3 ranking competitor pages.
- Compare competitor coverage with your target page.
- Identify missing essential information as the actionable content "gap".
Guiding Rule: Never bloat word count for the sake of SEO. Deliver precisely what the searcher wants to know.
5. Execute Single-Target Optimization
Implement changes strictly addressing the identified gap:
- Improve
title,description, introduction hook, or FAQ sections. - Add missing factual data, examples, or structural depth.
- Enhance internal links between articles, hub pages, and detail views.
Constraints:
- Modify only 1 keyword/page per execution run.
- Do not make unapproved
noindexchanges or drastic architecture overhauls.
6. Log Changes and Lock 7-Day Cooldown
Record the action in improvement-log.json:
{
"keyword": "target keyword",
"targetPath": "/path/to/page",
"status": "observing",
"nextReviewDate": "YYYY-MM-DD (Today + 7 days)",
"actions": [
{
"date": "YYYY-MM-DD",
"rankAtAction": 4.2,
"needs": "Analyzed user search intent",
"done": "Concrete optimizations applied"
}
]
}
- Commit
data/seo/*.jsonto Git. - Never re-optimize any keyword in
observingstate before itsnextReviewDate.
Guardrails
- Do not scrape Google SERP directly; use official GSC APIs or dedicated search tools.
- Limit each run to a single keyword optimization.
- Enforce the 7-day observation cooldown strictly.
- Never alter past data in
rank-history.json. - Do not commit secrets, API keys, or credentials.
- When in doubt or without clear targets, take no action.