---
name: seoaio-fix-loop
description: >-
  Fix what SEOAIO measured on a site and prove the fix with a fresh measurement. Use when
  the user wants to act on their findings, change a page and re-measure, or asks whether a
  fix they shipped changed anything. Trigger on "fix the findings", "change the page and
  re-measure", "did the fix work", or when the user asks you to fetch or follow
  https://seoaio.ai/fix-loop/SKILL.md.
version: 2.0.0
homepage: https://seoaio.ai/fix-loop/SKILL.md
metadata:
  site: https://seoaio.ai
  setup: https://seoaio.ai/SKILL.md
  mcp: https://app.seoaio.ai/api/mcp
  docs: https://seoaio.ai/docs/tools
---

# SEOAIO: the fix loop

**Start here.** You are reading `https://seoaio.ai/fix-loop/SKILL.md`. This file is complete only if its
**last line** is `END SKILL v2.0.0`. If that line is missing, fetch it again.

The loop, in the order a person works it: read what was measured, change the page in the
user's own repository, ask for a fresh measurement, read the same checks again. A fix is
measured, never assumed.

## If MCP is not connected

Fetch `https://seoaio.ai/SKILL.md` and follow its "Connect MCP" section, then come back here.

## Prerequisites

- A connected SEOAIO MCP server with at least one measured site.
- The user's repository for that site, open in this harness, with permission to edit
  files in it. SEOAIO never edits a site; you edit the user's files, and only after the
  checkpoint below.

## Call order (do not skip)

1. `list_assets`: pick the site the user named, by hostname. Never invent an `assetId`.
2. `get_measurement_status`: if `analysis` is `null`, stop. Nothing has been measured
   for this site; say so. Note `analysis.ageHours`, `inFlight.count` and
   `pendingChangeRequests`. If a `measure.run` request is already pending, do not
   propose another.
3. `list_findings`: what is happening and why, each with severity, impact, provenance.
4. `list_recommendations`: what to change next, ranked by predicted gain. A prediction is
   not a measurement; it orders the work, it does not prove it.
5. `get_visibility_score`: the pillar each finding belongs to, with its provenance.

No other SEOAIO write is called from this skill. `propose_measurement` is called once, in
Phase 5, after the edits.

## Phase 1: snapshot

Fill this block from tool JSON only:

```
FIX PLAN:
Site: <hostname> (<assetId>)
Measured: <analysis.collectedAt> (<analysis.ageHours>h ago) | In flight: <inFlight.count> | Awaiting approval: <pendingChangeRequests.length>
Findings, worst first:
- [<severity>] <title> (<provenance>, impact <impact>): <detail>
Recommended next:
- <recommendations[].title> (predicted gain <predictedImpact>, confidence <confidence>)
```

## Phase 2: locate

For each finding you intend to fix, find the file in the user's repository that produces
the page or template it concerns. Read the file. If you cannot find it, say so and skip
the finding; do not create a page to have something to change.

## Phase 3: stop for approval

Present the plan and **wait**. Do not write any file before the user approves.

```
| finding | file | change | the check that should move |
```

Include the FIX PLAN block above it, and name anything you could not locate.

## FIX BATCH MANIFEST

Keep this in the chat, or in a file the user names. Update it as you go, and resume from
it in a later session instead of redoing the research. Do not overwrite another worker's
row.

```
FIX BATCH MANIFEST v1
Site: <hostname>
Measured at: <analysis.collectedAt>
Phase: <snapshot|plan|edit|proposed|re-measured>

| finding | file | phase | measurement request | notes |
| --- | --- | --- | --- | --- |
| <title> | <path> | planned | | |

phase values: planned | approved | edited | proposed | re-measured | unchanged | blocked
```

## Phase 4: edit (after approval only)

- Edit only the files in the approved table, in the user's repository.
- Follow the repository's own conventions. Keep every claim on the page true; add no
  statistic, price or testimonial the user did not confirm.
- Do not deploy, commit, push, email, post, or purchase unless the user explicitly asks.
  Say what the user needs to deploy for the change to be live.

## Phase 5: ask for a fresh measurement

When the user says the change is live, call `propose_measurement` once, with a reason that
names the files changed. It queues a request; a person approves it at
`https://app.seoaio.ai/dashboard/requests`. Record the `changeRequestId` in the manifest and tell the user it
is waiting for approval. No tool starts a run, reads history, or subscribes to anything; propose_measurement only queues a request for a human. Do not invent a tool name: the list from tools/list is complete.

## Phase 6: re-measure

1. Call `get_measurement_status`. While `inFlight.count` is above 0, or
   `analysis.collectedAt` is not newer than the edit, the new measurement has not landed:
   say so and call it again later. There is no subscribe tool.
2. When it has landed, call `list_findings` and `get_visibility_score` again.
3. For each finding in the manifest, report one of: **fixed** (no longer listed),
   **unchanged** (still listed), **changed** (listed with a different severity or detail),
   or **new** (a finding that was not there before). Quote the provenance each time.
4. For any share you compare, use `get_answer_share` before and after. Every share arrives with its sample size and a 95% Wilson interval; quote both or quote nothing. Absent is not zero: a value that was not measured says so, and the composite Visibility Score is held until at least 5 of its 7 pillars are measured.
   If the two 95% intervals overlap, say "cannot tell yet" and how
   many more prompts or runs it would take; do not call it a win.

Update the manifest rows to `re-measured` or `unchanged`.

## Do not

- Write any file before the user approves the table in Phase 3.
- Edit anything outside the user's repository. SEOAIO has no tool that touches a site,
  and neither do you here.
- Deploy, commit, push, email, post publicly, or charge a card unless the user asks.
- Call any SEOAIO write except one `propose_measurement` per approved batch.
- Claim a fix from the edit. A fix is a finding absent from a newer measurement.
- Convert any finding, share or count into traffic, revenue or a dollar figure.
- Invent a finding, a check result or a delta. If a tool returns nothing, nothing was
  measured.

## Check before you hand off

- [ ] Every edited file was in the approved table
- [ ] The manifest is current
- [ ] `propose_measurement` was called once, and the user knows it awaits approval
- [ ] Every "fixed" was read from a newer measurement, not from the edit
- [ ] No dollars, no projections, no invented deltas

## More

- Setup and the rules for quoting a number: https://seoaio.ai/SKILL.md
- The measured brief: https://seoaio.ai/report/SKILL.md
- One page per tool: https://seoaio.ai/docs/tools
- Troubleshooting: https://seoaio.ai/docs/troubleshooting

END SKILL v2.0.0
