1. Habit
  2. Habits
  3. SEO loop
Marco PatzeltClaude Ambassador · Software Engineer · Forward Deployed

SEO loop

Rank new pages every 21 days.

Every 21 days the loop reads its task board, pulls search data, writes one page per finding, lets a second agent grade it, and opens a pull request.

Paste this into your agent. It sets everything up for you.

Read https://gethabit.dev/loops/seo-loop.md and install this loop in my project. Show me the files first.

Works inClaude CodeCodexCursor

FROM A CLIENT SITE

The SEO skill, as a habit.

It ran on its own every 21 days. Nobody typed a prompt.

Impressions
29,068
#1 on Google
12
Clicks
340
Search terms
837
Impressions a day · 3 months

Google Search Console, 23.07. to 22.10.2026 · 3 months

Acts on its own. Answers to reality. Answers to you.

  1. Trigger

    01 acts

    It acts on its own.

    • > { every 21 days }
    • > { 0 6 */21 * * }
    • > { runs in Claude Code routine or GitHub Actions }
  2. Verification

    02 proves

    It answers to reality, not to “looks done”.

    • > { build passes }
    • > { title ≤ 60 chars }
    • > { description ≤ 155 chars }
    • > { no new noindex }
    • > { if a check fails, it tries again }

    ↳ hard check + second grader

  3. Memory

    03 answers

    It answers to you.

    • > { task board }
    • > { loops/seo-loop/board.md }

    ↳ next run reads: open tasks and pages due for a 21-day check

One run, step by step.

The same steps, every run. Each one leaves a line in the log, so you can see what happened.

Run log

8 steps
  1. Check the board

    Read open tasks and pages that are due for their 21-day check.

  2. Analyze

    Pull search data and see who ranks for each target term.

  3. Create tasks

    One task per finding. Skip what the board already has.

  4. Gate

    If the page exists or the task is a duplicate, stop here.

  5. Build

    Write the page into the repo with title, description and links.

  6. Critic

    A second agent with fresh context grades it. Below 17 of 20, rewrite once.

  7. Ship

    Open a pull request. A human merges.

  8. Verify after 21 days

    Read Search Console. Ranked but no clicks? The task reopens.

  • > { stop: Stops after 3 tasks per run. }
  • > { next run: every 21 days }

Nothing goes out without your yes.

What this habit may write, call and send. Everything else is off.

Your OK
It asks you before anything goes out.
Sends
nothing
Writes
Only in src/content/**, loops/seo-loop/**
Talks to
api.dataforseo.com, searchconsole.googleapis.com
  • > { nothing is sent without your yes }

SEO loop, answered.

Does it publish by itself?

No. It opens a pull request. You merge.

Is it free?

Yes. The skills are open source and Habit is free. The habit runs where your agent already runs.

Rank new pages every 21 days.

It runs on its own. You keep the final say.

Paste this into your agent. It sets everything up for you.

Read https://gethabit.dev/loops/seo-loop.md and install this loop in my project. Show me the files first.

Free · No account · Undo in one line

Copying didn't work here. Select the line and copy it by hand.