Index of every page on this site: llms.txt
All skills
nielsmadan avatar

/optimize-seo

@9fbe49f
Run it yourself

Audit and optimize web pages for SEO — meta tags, Open Graph, JSON-LD, structured data. Triggers "optimize SEO", "check SEO", "add meta tags", "SEO audit".

Use this Skill: https://skilld.dev/gh/nielsmadan/agentic-coding/optimize-seo

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈43 tokens for metadata: the name and description. ≈1.3k when used: this file. ≈2k more on demand in 1 file.

Description uses 2.1% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈170 characters, or 2.1%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Optimize SEO

Audit a web page against current SEO best practices (2025-2026) and generate missing or improved elements.

Gotchas

  • On SPAs, SSG sites (Next.js, Gatsby), or template-driven systems, the HTML file may be a build artifact. Fixes applied to generated output are lost on the next build — find the source template instead.
  • Adding meta tags without checking for existing ones creates duplicates. Most parsers use the first match, so the old (wrong) tag wins. Check for existing tags before adding new ones.

Instructions

Step 1: Identify the Target

Determine what to audit:

  • HTML file(s): Read the file(s) directly
  • URL: Use WebFetch to retrieve the page
  • Component/template: Read the source files that produce the page

If the user provides a URL or file, read it. If unclear, ask what page to optimize.

Step 2: Audit

Consult references/seo-checklist.md for the full checklist and reference material.

Run through each category and report issues:

Title & Meta — Check title tag (50-60 chars, keyword near start, unique), meta description (150-160 chars, keyword + CTA), canonical tag, Open Graph tags, Twitter Card tags.

Headings — Single H1 with primary keyword, logical H2/H3 hierarchy, no skipped levels, no heading tags used for styling.

Images — Alt text on all images, explicit width/height, descriptive filenames, WebP format, lazy loading on below-fold images.

Structured Data — Check for existing JSON-LD. Determine appropriate schema type(s) for the page content (Article, FAQ, Product, LocalBusiness, BreadcrumbList, Organization, etc.).

Internal Linking — Descriptive anchor text, no orphan pages, links to related content.

Content — Primary keyword in first 100 words, comprehensive coverage, author attribution, publication/update dates, external authority links.

Technical — HTTPS, canonical URL, no accidental noindex, mobile-friendly markup, no render-blocking resources.

Step 3: Report Issues

Present findings grouped by severity:

  1. Critical — Missing title tag, no H1, accidental noindex, missing canonical, broken structured data
  2. Important — Missing meta description, missing Open Graph, no structured data, missing alt text, no internal links
  3. Improvements — Title too long/short, meta description could be stronger, missing Twitter Card, image optimization opportunities

For each issue: state what's wrong, why it matters, and the fix.

Step 4: Generate Fixes

Generate the actual markup for all issues found:

  • Meta tags — Title, description, canonical, robots
  • Open Graph + Twitter Card — Full tag set
  • Structured data — Complete JSON-LD block(s) using templates from references/seo-checklist.md
  • Image attributes — Alt text, width/height, loading="lazy"
  • Heading restructure — If hierarchy is broken, suggest corrected structure

Apply fixes directly to the file(s) when the user has given edit access. Otherwise, present the generated markup for the user to apply.

Step 5: Validate

After applying fixes:

  • Confirm structured data is valid JSON (parse it)
  • Verify title length is 50-60 characters
  • Verify meta description is 150-160 characters
  • Check that canonical URL is absolute and correct
  • Ensure no duplicate tags were introduced

Examples

Example 1: Audit an HTML file

User says: "optimize SEO on src/pages/about.html"

  1. Read the file
  2. Audit against checklist — find: title too long (72 chars), no meta description, no Open Graph tags, images missing alt text, no structured data
  3. Report issues by severity
  4. Generate and apply: shortened title, meta description, full OG + Twitter tags, Organization JSON-LD, alt text for images

Example 2: Generate structured data

User says: "add schema markup to our product page"

  1. Read the product page
  2. Identify it needs Product + BreadcrumbList schemas
  3. Generate JSON-LD from product details on the page (name, price, image, description, availability)
  4. Add the <script type="application/ld+json"> block to <head>

Example 3: Audit a URL

User says: "check SEO on https://example.com/blog/post"

  1. WebFetch the URL
  2. Full audit against checklist
  3. Report all issues with severity
  4. Provide copy-paste markup fixes

Troubleshooting

Page has no <head> section

Cause: Single-page app or component that doesn't control the HTML document. Solution: Identify where the <head> is managed (layout file, _app.tsx, index.html) and apply meta tags there. For structured data, JSON-LD can go anywhere in <body>.

Structured data conflicts with existing markup

Cause: Page already has partial or outdated schema. Solution: Merge with existing schema rather than duplicating. Remove deprecated schema types. Validate the combined result.

Dynamic content (SPA/React/Next.js)

Cause: Meta tags need to be set per-route, not just in a static HTML file. Solution: Use the framework's head management (Next.js <Head>, React Helmet, Vue Meta) to set tags per page. Ensure SSR/SSG renders meta tags in the initial HTML response.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning9d4 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    The skill is generally safe and focused on SEO optimization tasks. It has a low risk of indirect prompt injection because it processes external content from web pages and files that could contain malicious instructions.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: MEDIUM · 1 issue

  • Runlayer8mo

    2 files scanned · No issues

Signed by skilld at 9fbe49f. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 2 months ago

README badge

README badge for nielsmadan/agentic-coding/optimize-seo