This skill should be used when analyzing HTML/CSS websites for SEO optimization, fixing SEO issues, generating SEO reports, or implementing SEO best practices. Use when the user requests SEO audits, optimization, meta tag improvements, schema markup implementation, sitemap generation, or general search engine optimization tasks.
This skill provides comprehensive SEO optimization capabilities for HTML/CSS websites. It analyzes websites for SEO issues, implements best practices, and generates optimization reports covering all critical SEO aspects including meta tags, heading structure, image optimization, schema markup, mobile optimization, and technical SEO.
When to Use This Skill
Use this skill when the user requests:
- "Analyze my website for SEO issues"
"Optimize this page for SEO"
"Generate an SEO audit report"
"Fix SEO problems on my website"
"Add proper meta tags to my pages"
"Implement schema markup"
"Generate a sitemap"
"Improve my site's search engine rankings"
Any task related to search engine optimization for HTML/CSS websites
Workflow
1. Initial SEO Analysis
Start with comprehensive analysis using the SEO analyzer script:
CODEBLOCK0
This script analyzes HTML files and generates a detailed report covering:
- Title tags (length, presence, uniqueness)
Meta descriptions (length, presence)
Heading structure (H1-H6 hierarchy)
Image alt attributes
Open Graph tags
Twitter Card tags
Schema.org markup
HTML lang attribute
Viewport and charset meta tags
Canonical URLs
Content length
Output Options:
- Default: Human-readable text report with issues, warnings, and good practices
INLINECODE0 : Machine-readable JSON format for programmatic processing
Example Usage:
CODEBLOCK1
2. Review Analysis Results
The analyzer categorizes findings into three levels:
Critical Issues (🔴) - Fix immediately:
- Missing title tags
Missing meta descriptions
Missing H1 headings
Images without alt attributes
Missing HTML lang attribute
Warnings (⚠️) - Fix soon for optimal SEO:
- Suboptimal title/description lengths
Multiple H1 tags
Missing Open Graph or Twitter Card tags
Missing viewport meta tag
Missing schema markup
Heading hierarchy issues
Good Practices (✅) - Already optimized:
- Properly formatted elements
Correct lengths
Present required tags
3. Prioritize and Fix Issues
Address issues in priority order:
Priority 1: Critical Issues
Missing or Poor Title Tags:
<!-- Add unique, descriptive title to <head> -->
<title>Primary Keyword - Secondary Keyword | Brand Name</title>
- Keep 50-60 characters
Include target keywords at the beginning
Make unique for each page
Missing Meta Descriptions:
CODEBLOCK3
Missing H1 or Multiple H1s:
- Ensure exactly ONE H1 per page
H1 should describe the main topic
Should match or relate to title tag
Images Without Alt Text:
CODEBLOCK4
Missing HTML Lang Attribute:
CODEBLOCK5
Priority 2: Important Optimizations
Viewport Meta Tag (critical for mobile SEO):
CODEBLOCK6
Charset Declaration:
CODEBLOCK7
Open Graph Tags (for social media sharing):
CODEBLOCK8
Twitter Card Tags:
CODEBLOCK9
Canonical URL:
CODEBLOCK10
Priority 3: Advanced Optimization
Schema Markup - Refer to references/schema_markup_guide.md for detailed implementation. Common types:
- Organization (homepage)
Article/BlogPosting (blog posts)
LocalBusiness (local businesses)
Breadcrumb (navigation)
FAQ (FAQ pages)
Product (e-commerce)
Example implementation:
CODEBLOCK11
4. Generate or Update Sitemap
After fixing issues, generate an XML sitemap:
CODEBLOCK12
Example:
CODEBLOCK13
The script:
- Automatically finds all HTML files
Generates proper URLs
Includes lastmod dates
Estimates priority and changefreq values
Creates properly formatted XML sitemap
After generation:
1. Upload sitemap.xml to website root
Add reference to robots.txt
Submit to Google Search Console and Bing Webmaster Tools
5. Update robots.txt
Use the template from assets/robots.txt and customize:
CODEBLOCK14
Place robots.txt in website root directory.
6. Verify and Test
After implementing fixes:
Local Testing:
1. Run the SEO analyzer again to verify fixes
Check that all critical issues are resolved
Ensure no new issues were introduced
Online Testing:
1. Deploy changes to production
Test with Google Rich Results Test: https://search.google.com/test/rich-results
Add essential meta tags to all pages (title, description, viewport)
Ensure proper heading structure (one H1 per page)
Add alt text to all images
Implement organization schema on homepage
Generate sitemap: INLINECODE4
Create robots.txt from template
Deploy and submit sitemap to search engines
Pattern 2: Existing Website Audit
For an existing website needing optimization:
1. Run comprehensive analysis: INLINECODE5
Identify and prioritize issues (critical first)
Fix critical issues across all pages
Add missing Open Graph and Twitter Card tags
Implement schema markup for appropriate pages
Regenerate sitemap with updates
Verify fixes with analyzer
Deploy and monitor
Pattern 3: Single Page Optimization
For optimizing a specific page:
1. Analyze specific file: INLINECODE6
Fix identified issues
Optimize title and meta description for target keywords
Ensure proper heading hierarchy
Add appropriate schema markup for page type
Verify with analyzer
Update sitemap if new page
Pattern 4: Blog Post Optimization
For blog posts and articles:
1. Ensure unique title (50-60 chars) with target keyword
Write compelling meta description (150-160 chars)
Use single H1 for article title
Implement proper H2/H3 hierarchy for sections
Add alt text to all images
Implement Article or BlogPosting schema (see references/schema_markup_guide.md)
Add Open Graph and Twitter Card tags for social sharing
Include author information
Add breadcrumb schema for navigation
Reference Materials
Detailed Guides
references/seo_checklist.md:
Comprehensive checklist covering all SEO aspects:
- Title tags and meta descriptions guidelines
Heading structure best practices
Image optimization techniques
URL structure recommendations
Internal linking strategies
Page speed optimization
Mobile optimization requirements
Semantic HTML usage
Complete technical SEO checklist
Reference this for detailed specifications on any SEO element.
references/schema_markup_guide.md:
Complete guide for implementing schema.org structured data:
- JSON-LD implementation (recommended format)
10+ common schema types with examples
Organization, LocalBusiness, Article, BlogPosting, FAQ, Product, etc.
Required properties for each type
Best practices and common mistakes
Validation tools and resources
Reference this when implementing schema markup for any content type.
Scripts
scripts/seo_analyzer.py:
Python script for automated SEO analysis. Analyzes HTML files for common issues and generates detailed reports. Can output text or JSON format. Deterministic and reliable for repeated analysis.
scripts/generate_sitemap.py:
Python script for generating XML sitemaps. Automatically crawls directories, estimates priorities and change frequencies, and generates properly formatted sitemaps ready for submission to search engines.
Assets
assets/robots.txt:
Template robots.txt file with common configurations and comments. Customize for specific needs and place in website root directory.
Key Principles
1. User-First: Optimize for users first, search engines second. Good user experience leads to better SEO.
2. Unique Content: Every page should have unique title, description, and H1. Duplicate content hurts SEO.
3. Mobile-First: Google uses mobile-first indexing. Always include viewport meta tag and ensure mobile responsiveness.
- Analyze HTML/CSS websites for critical and technical SEO issues.
- Generate detailed, prioritized SEO audit reports (human-readable and JSON output).
- Suggest and guide fixes for meta tags, headings, alt attributes, markup, and more.
- Automate sitemap generation, including priority/changefreq estimates.
- Provide robots.txt management templates and instructions.
- Guide schema markup implementation with common use cases and testing resources.