Catalogue / seo-audit-and-fix
seo-audit-and-fix
Older skill: source not recordedSignedAudits static HTML pages and sites for on-page SEO problems and repairs them in the local files, covering title tags, meta descriptions, heading structure, image alt text, language and viewport declarations, Open Graph and Twitter card tags, canonical links, schema.org JSON-LD structured data, and g…--- name: seo-audit-and-fix description: >- Audits static HTML pages and sites for on-page SEO problems and repairs them in the local files, covering title tags, meta descriptions, heading structure, image alt text, language and viewport declarations, Open Graph and Twitter card tags, canonical links, schema.org JSON-LD structured data, and generation of a sitemap.xml and robots.txt, using a severity-ranked fix order with re-verification afterward. Use when the user asks to audit, review, optimize, or improve the search visibility of an HTML or HTML-CSS website, add meta tags or structured data, or produce a sitemap or robots file. Not for JavaScript apps with no served HTML, keyword research, link building, rank tracking, or server and speed tuning. ---
SEO Audit and Fix
Walk the user from a full on-page audit of their HTML site through prioritized repairs, structured data, and a sitemap plus robots file. Every action happens on files on the user's machine.
The original version of this workflow relied on two bundled Python programs for scanning and sitemap building; this single-file skill ships no scripts, so perform every check by reading the HTML directly. It also does not cover keyword research, link building, rank tracking, or performance profiling.
1. Establish scope
Before touching anything, settle three questions:
- Which files? A single page, or a whole directory tree? For a tree, list every
.htmland.htmfile, skipping hidden folders and dependency folders such as build output and package directories. - What domain? You need the canonical base URL (for example
https://fernwaycoffee.com) only if canonical tags or a sitemap are in scope. - Report or repair? Confirm whether the user wants findings only or edits applied.
2. Audit every page
Read each file and score it against this table. Keep per-file notes; you will report them later.
| Element | Passes when | |---|---| | Title | Present, unique on the site, roughly 50–60 characters | | Meta description | Present, unique, roughly 150–160 characters | | H1 | Exactly one, stating the page's main topic | | Heading outline | No level skipped below the H1 (no H2 straight to H4) | | Image alt | Every image has an alt attribute (empty string allowed for decoration) | | Language | The html element declares the page's real language | | Charset | UTF-8 is declared in the head | | Viewport | A width-based viewport meta tag exists | | Open Graph | og:title, og:description, og:image, og:url all present | | Twitter card | twitter:card plus title, description, image present | | Canonical | Present whenever the page is reachable at more than one URL | | Structured data | JSON-LD matching the page type exists |
Also note the total amount of body text: a page with under about 300 characters of markup is thin and worth flagging.
3. Classify and report
Sort findings into three tiers before changing anything:
- Blockers — missing title, missing description, no H1, images without alt, no language attribute, no viewport. These undermine basic indexing and accessibility, so fix them first.
- Should fix — lengths outside range, multiple H1s, skipped heading levels, missing charset, absent social or structured-data tags, thin content.
- Already good — everything that passes.
Give the user a per-file summary plus site-wide counts. If edits were requested, confirm the planned fix list before editing.
4. Repair blockers first
Titles. Write a unique title per page, about 50–60 characters, most important phrase first, brand name last after a pipe:
<title>Descaling an Espresso Machine in 6 Steps | Fernway Coffee</title>
Descriptions. Summarize the page honestly, work in a natural keyword phrase, and give the searcher a reason to click:
<meta name="description" content="Hard-water scale is the top cause of weak espresso. Follow Fernway's six-step descaling routine to restore pressure and flavor in under an hour.">
H1. Add one if missing by promoting the page's main heading; demote any extra H1s to H2. The H1 should agree with the title's topic.
Alt text. Describe what the image shows or does, at most about 125 characters, never starting with phrases like "image of". Purely decorative images take an explicitly empty alt:
<img src="burr-grinder-inspection.jpg" alt="Roaster Sara checking burr grinder burrs for wear" width="800" height="600" loading="lazy">
Language and mobile basics. Ensure these three lines exist and match reality (use lang="es" for a Spanish page, and so on):
<html lang="en"> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1">
5. Handle the should-fix tier
- Open Graph, with absolute URLs for image and page:
<meta property="og:title" content="Descaling an Espresso Machine in 6 Steps"> <meta property="og:description" content="Restore pressure and flavor with Fernway's six-step routine."> <meta property="og:image" content="https://fernwaycoffee.com/img/descaling-guide.jpg"> <meta property="og:url" content="https://fernwaycoffee.com/guides/descaling"> <meta property="og:type" content="article">
- Twitter card: set
twitter:cardtosummary_large_imageand repeat title, description, and image. - Canonical: add only where a page genuinely has multiple URLs, pointing at the preferred absolute URL.
- Heading outline: restructure so H2 marks sections and H3 marks subsections without gaps.
6. Add structured data
Use JSON-LD only — a script block of type application/ld+json in the head. Choose the type from the page's purpose:
| Page kind | Type | Must include | |---|---|---| | Company home or about | Organization | name, url | | Physical shop or venue | LocalBusiness | name, address | | Article or blog post | Article or BlogPosting | headline, image, datePublished, author, publisher | | Product page | Product | name, image, offers | | FAQ page | FAQPage | mainEntity of Question items | | Breadcrumb trail | BreadcrumbList | itemListElement with positions |
Full example for a local business:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Fernway Coffee Roasters",
"url": "https://fernwaycoffee.com",
"telephone": "+1-503-555-0184",
"priceRange": "$$",
"address": {
"@type": "PostalAddress",
"streetAddress": "48 Alder Lane",
"addressLocality": "Portland",
"addressRegion": "OR",
"postalCode": "97209",
"addressCountry": "US"
},
"geo": { "@type": "GeoCoordinates", "latitude": 45.5231, "longitude": -122.6765 },
"openingHoursSpecification": {
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
"opens": "07:00",
"closes": "18:00"
}
}
</script>Ground rules: every URL must be absolute, dates in ISO 8601 form such as 2025-03-14, article images at least 1200 pixels wide, and only mark up content a visitor can actually see on the page.
7. Build the sitemap
Construct sitemap.xml by hand from your file list: map each index.html to its directory URL, strip the .html extension from other filenames, and join everything onto the base domain. Set lastmod from each file's modification date, assign priority by depth (home 1.0, second level 0.8, third 0.6, deeper 0.4), and use changefreq weekly for blog or news pages, monthly for core pages, yearly for the rest. Sort entries by URL and write the file to the site root:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://fernwaycoffee.com/</loc>
<lastmod>2025-03-14</lastmod>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://fernwaycoffee.com/guides/descaling</loc>
<lastmod>2025-03-11</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
</urlset>8. Write robots.txt
Keep it minimal unless the user has areas to hide:
User-agent: * Allow: / Disallow: /staff-portal/ Disallow: /drafts/ Sitemap: https://fernwaycoffee.com/sitemap.xml
Each Disallow line removes URLs from crawlers' view, so only add entries for sections truly not meant for search, and confirm that list with the user before writing the file.
9. Re-verify
After edits, re-read every changed file and re-score it against the step 2 table. Every blocker should now pass, no new failures should have appeared, and structured data should parse as valid JSON. Report before-and-after counts. For deeper validation, point the user to Google's rich results test and the schema.org validator as steps they run themselves in a browser.
Boundaries
- Never fabricate structured data: no ratings, review counts, prices, or availability that do not appear on the page. Faking it risks a search penalty for the whole site.
- Never deploy the site, publish the changes, or submit the sitemap to any search engine console on your own initiative — those steps change what the public sees and require the user's explicit confirmation.
- Do not stuff keywords into titles, descriptions, or alt text; write for people first.
- Do not rewrite body copy or change a page's wording beyond what the requested SEO fix requires.
| File | Size | SHA-256 |
|---|---|---|
| SKILL.md | 9.5 kB | 8659d81b04e5 |
| examples.json | 2.0 kB | c7d945e9fe24 |
Published verbatim from the pinned commit. Nothing is rewritten.
| Version | Pinned commit | Signed | |
|---|---|---|---|
| 1.0.0 Current | Not recorded | 6 Oct 2026 |
Locking a skill to one version needs Pro.