SuperAPI AI Directory

apply-edits

Coding & development

View repository

Updated 10-16 06:44

About this skill

Apply browser edits

Process reports from the slop-off MCP server and apply them to the source.

Mode

  • Default (loop): call wait_for_report (timeout_seconds: 60), apply the report, briefly report what was done, and then immediately call wait_for_report again. Keep repeating this until the user says to stop ("stop", "done", or gives another command).
    • Timeout without a report? Just call wait_for_report again, without comment. After ~10 empty timeouts in a row: ask the user once whether you should keep waiting.
    • At the start, announce once: "I'm waiting for browser edits — say 'stop' when you're done."
  • Argument once: process exactly one report and stop.
  • Argument latest: call get_latest_report (do not wait), apply, stop.
  • Argument list: call list_reports , show the queue, ask which one.

Apply edits

The report contains per-URL sections with Before/After HTML pairs and a CSS selector as a hint.

  1. For each edit, find the source file that renders that page/HTML: search for distinctive text from the Before block (literal strings first, then fuzzy). The URL indicates which route/page; the selector where in the DOM.
  2. Replace the Before content with the After content. Preserve existing formatting, indentation and templating (translate HTML changes to the template/JSX/component if the source is not plain HTML).
  3. Not found? Report it explicitly with the closest match — never silently guess or skip. Then just continue with the loop.
  4. Placeholder, href and other attribute changes are attribute edits; adjust only that attribute.

Per processed report

  • Run a quick check if the project has one (typecheck/lint; no full build per report in loop mode).
  • Summarize in 1-3 lines: which files, which edits, what failed.
  • Go straight back to waiting.