I ran an audit on my own site yesterday. The audit tool produced six findings. For each one, it offered me a "Copy fix prompt for Claude" button. I clicked it, pasted the prompt, waited 20 seconds for Claude to generate the fix, pasted the answer back into my template.
Six findings. Two minutes of audit, twelve minutes of prompt round-tripping. Half of Claude's answers re-explained what I already knew. The other half were exact copy-paste work a regex could have done in a millisecond.
That's the gap this tool closes.
What the Patch Generator does
The Code-Diff Patch Generator fetches a URL, runs 20 heuristic detections, and — instead of a prompt — emits a unified-diff patch for each finding. Before code on top, after code on bottom, ready to paste into your template.
No LLM round-trip. No API costs. No waiting for the model to re-explain what you already know.
The detections that are actually auto-patchable
Not every SEO fix is mechanical. Some genuinely need judgment — "rewrite this article to cover the missing subtopics" is not a one-line patch. But a surprising number of findings ARE mechanical, and those are what the tool handles:
- Missing
<title>— generates one from the H1 - Missing meta description — generates one from the first paragraph (155 chars capped)
- Missing canonical — builds the canonical from the page URL
- Missing viewport meta — drops in the standard mobile viewport line
- Missing charset — adds
<meta charset="utf-8">as the first child of<head> - Missing
<html lang>— addslang="en"(flag for verification if site is non-English) - Missing Open Graph tags — generates og:title, og:description, og:url, og:type, og:image (+ placeholder dimensions)
- Missing Twitter Card — adds summary_large_image with matching title/description/image
- LCP image has
loading="lazy"— rewrites the tag without the attribute, addsfetchpriority="high" - LCP image missing
fetchpriority— adds it - LCP image missing
width/height— flags with a template showing the pattern - LCP image missing
alt— adds an empty alt as placeholder and prompts you to describe - Missing
BreadcrumbListJSON-LD — generates the full structured data from the URL path - Missing
Article/BlogPostingJSON-LD — generates a complete Article block for blog URLs - Homepage missing
OrganizationJSON-LD — generates the Knowledge Graph seed - Heavy third-party without preconnect — generates the preconnect link tag
- Unused preconnect — marks for deletion (before shows current, after shows
(deleted)) - Missing favicons — emits the standard three-line favicon set
<a href="javascript:">anchors — flags as CSP blockers with a button-plus-addEventListener rewrite- Images missing dimensions — adds placeholder width/height you adjust to real values
- Duplicate or missing H1 — generates the structural correction
- Inline event handlers (onclick=, onload=) — emits the addEventListener migration pattern
Every patch has a confidence tag:
- High — safe to paste as-is (after swapping placeholder URLs/images)
- Medium — review before applying; might need per-page customization
- Low — advisory only; read the rationale before acting
How to use it
- Go to /tools/code-diff-patch-generator/
- Paste your page URL
- Leave schema + performance checkboxes on (default)
- Click Run
- Scroll through patches, grouped by category (SEO, Performance, Accessibility, Schema, Security, Social, Brand, CLS)
- For each patch you want, click Copy patch — that patch goes to your clipboard as Markdown with before/after code fences
- Or click Copy all patches as Markdown at the top to grab every patch at once
The patches use unified-diff-ish formatting (minus lines red, plus lines green) for visual clarity, but the clipboard output is clean Markdown so you can paste into a doc, a Notion page, a Linear ticket, or straight into your code editor.
Why I built this instead of adding more prompts
Every tool on this site emits a fix prompt. That model works for generative changes — "rewrite the intro with more specific claims," "add three paragraphs of content coverage." Claude is great at that.
But 60% of findings aren't generative. They're structural. Adding a canonical link isn't a creative act. Adding a BreadcrumbList JSON-LD block from a URL path isn't a creative act. Removing loading="lazy" from the LCP image isn't a creative act.
For structural fixes, routing through an LLM is waste. Waste of time, waste of tokens, waste of determinism (the LLM might forget a closing bracket). The patch should be generated deterministically in the tool and handed to you.
That's what this does.
What it doesn't do (and when prompts still win)
A few things the Patch Generator deliberately does not attempt, because they need judgment:
- Content rewrites. If your meta description is bad, no algorithm knows your brand voice. The tool will suggest a description pulled from the first paragraph as a placeholder, but the final version is yours.
- Image dimensions. The tool doesn't fetch every image to read its natural dimensions — that would be a 30-second scan per page. It tells you which images lack dimensions and gives you the template.
- Alt text. The tool adds
alt=""for LCP candidates but leaves the descriptive text to you. An auto-generated alt is worse than none. - Organization / brand identity. The tool generates placeholder Organization schema with "Your Organization Name" — you fill in the real name, sameAs URLs, and logo path.
- Content strategy. "You have no Article schema on this blog post" is auto-fixable. "Your blog posts are too short to rank" is not.
For those, the old fix-prompt flow still wins. Mega SEO Analyzer v2 keeps the prompt builder right alongside the patch generator.
The unexpected upside: patch batches become a deployment PR
I didn't plan this, but once you have patches as unified diffs, you can paste all of them into a single commit message, open a PR with title "SEO + perf hardening — batch 1," and ship 20 fixes in one deploy. Turns out unified-diff output is already the format every code review system understands.
If a future version adds GitHub OAuth, the tool could auto-open the PR. For now, manual copy-paste into your editor is one click away from shipping.
Pair it with the related stack
- Mega SEO Analyzer v2 — run the orchestrator first, get the full posture report, then feed the problem URLs into the Patch Generator for one-shot fixes.
- Internal Link Equity Flow — the link-graph visualizer in the same release. Patches can't fix an orphan page; you need to SEE which hubs should link to it.
- Mega SEO v2 blog post — the paid-tool-parity argument that includes this as a companion.
- Performance tool stack — the 10 performance audits you run BEFORE patching.
- Lighthouse fixes story — the real Lighthouse audit that drove some of the patch rules.
Related reading
- Mega SEO Analyzer v2 — Clearscope-adjacent in browser
- Internal Link Equity Flow — Sitebulb-adjacent in browser
- Every new performance audit tool for 2026
- Every new security audit tool for 2026
Fact-check notes and sources
- Unified diff format specification: GNU Diffutils manual.
- Structured data schema.org types used: Article, BreadcrumbList, Organization, BlogPosting.
- Google rich results requirements: Google Search Central structured-data gallery.
- Core Web Vitals metrics referenced: web.dev Vitals guide.
- Open Graph protocol spec: ogp.me.
- Twitter Cards / summary_large_image: X Developer Platform Cards.
- WCAG 1.1.1 (Non-text Content) — alt attribute requirement: W3C WCAG 2.1.
- Fetch Priority spec: web.dev Fetch Priority.
This post is informational, not SEO-consulting or engineering advice. Mentions of Claude, OpenAI, Google, Sitebulb, Ahrefs, SEMrush, and similar products are nominative fair use. No affiliation is implied. Run patches only on sites you own or have written authorization to modify.