feat: Import 35+ skills, merge duplicates, add openclaw installer
Major updates: - Added 35+ new skills from awesome-opencode-skills and antigravity repos - Merged SEO skills into seo-master - Merged architecture skills into architecture - Merged security skills into security-auditor and security-coder - Merged testing skills into testing-master and testing-patterns - Merged pentesting skills into pentesting - Renamed website-creator to thai-frontend-dev - Replaced skill-creator with github version - Removed Chutes references (use MiniMax API instead) - Added install-openclaw-skills.sh for cross-platform installation - Updated .env.example with MiniMax API credentials
This commit is contained in:
165
skills/seo-master/SKILL.md
Normal file
165
skills/seo-master/SKILL.md
Normal file
@@ -0,0 +1,165 @@
|
||||
---
|
||||
name: seo-master
|
||||
description: |
|
||||
Master SEO skill combining audit, planning, technical SEO, schema markup,
|
||||
content writing, fundamentals, and competitive analysis.
|
||||
Use when: SEO audit, SEO strategy, content optimization, technical SEO, schema markup.
|
||||
---
|
||||
|
||||
# SEO Master
|
||||
|
||||
Comprehensive SEO skill combining: audit, planning, technical SEO, schema markup, content writing, fundamentals, and geo targeting.
|
||||
|
||||
---
|
||||
|
||||
## Quick Reference
|
||||
|
||||
| Task | Use Section |
|
||||
|------|-------------|
|
||||
| Diagnose SEO issues | **SEO Audit** |
|
||||
| Build SEO strategy | **Strategic Planning** |
|
||||
| Fix technical issues | **Technical SEO** |
|
||||
| Add structured data | **Schema Markup** |
|
||||
| Write SEO content | **Content Writing** |
|
||||
| Learn SEO basics | **Fundamentals** |
|
||||
|
||||
---
|
||||
|
||||
## SEO Audit
|
||||
|
||||
**When to Use:** Diagnosing SEO issues affecting crawlability, indexation, rankings.
|
||||
|
||||
### Scope Gate (Ask First)
|
||||
1. **Business Context** - Site type, goals, target markets
|
||||
2. **SEO Focus** - Full site or specific sections?
|
||||
3. **Data Access** - GSC, Analytics, known issues?
|
||||
|
||||
### Audit Framework (Priority Order)
|
||||
1. **Crawlability & Indexation** - Can search engines access and index the site?
|
||||
2. **Technical Foundations** - Speed, stability, accessibility
|
||||
3. **On-Page Optimization** - Each page optimized for intent?
|
||||
4. **Content Quality & E-E-A-T** - Does content deserve to rank?
|
||||
5. **Authority & Signals** - Trust and relevance demonstration
|
||||
|
||||
---
|
||||
|
||||
## Strategic Planning
|
||||
|
||||
**When to Use:** Building SEO strategy for new or existing sites.
|
||||
|
||||
### Process
|
||||
1. **Discovery** - Business type, audience, competitors, goals, KPIs
|
||||
2. **Competitive Analysis** - Top 5 competitors, content strategy, keyword gaps
|
||||
3. **Architecture Design** - URL hierarchy, content pillars, internal linking
|
||||
4. **Content Strategy** - Topic clusters, content calendar
|
||||
5. **Implementation Roadmap** - Phased approach with milestones
|
||||
|
||||
---
|
||||
|
||||
## Technical SEO
|
||||
|
||||
**When to Use:** Technical SEO review for crawlability, performance, rendering.
|
||||
|
||||
### Categories
|
||||
1. **Crawlability** - robots.txt, XML sitemap, noindex tags
|
||||
2. **Indexability** - Canonicals, hreflang, pagination
|
||||
3. **Performance** - Core Web Vitals (LCP < 2.5s, INP < 200ms, CLS < 0.1)
|
||||
4. **Mobile** - Responsive design, mobile-first indexing
|
||||
5. **Security** - HTTPS, mixed content
|
||||
6. **URLs** - Clean URLs, proper redirects
|
||||
7. **JavaScript** - Rendering issues, hydration
|
||||
|
||||
---
|
||||
|
||||
## Schema Markup
|
||||
|
||||
**When to Use:** Detecting, validating, or generating Schema.org structured data.
|
||||
|
||||
### Common Schema Types
|
||||
- `Organization` - Business info
|
||||
- `WebSite` - Site-level markup
|
||||
- `Article` - Blog posts, news
|
||||
- `Product` - E-commerce
|
||||
- `FAQPage` - FAQ content
|
||||
- `HowTo` - Step-by-step instructions
|
||||
- `LocalBusiness` - Local SEO
|
||||
- `BreadcrumbList` - Navigation
|
||||
- `VideoObject` - Video content
|
||||
- `ImageObject` - Images
|
||||
|
||||
### Validation
|
||||
- Google Rich Results Test: https://search.google.com/test/rich-results
|
||||
- Schema.org Validator: https://validator.schema.org/
|
||||
|
||||
---
|
||||
|
||||
## Content Writing
|
||||
|
||||
**When to Use:** Writing SEO-optimized content.
|
||||
|
||||
### Best Practices
|
||||
1. **Keyword Research** - Primary + secondary keywords, search intent
|
||||
2. **Content Structure** - Clear headings (H1-H6), short paragraphs
|
||||
3. **E-E-A-T Signals** - Author expertise, citations, experience
|
||||
4. **Readability** - Flesch reading score, bullet points, images
|
||||
5. **Internal Linking** - Relevant internal links
|
||||
6. **Meta Tags** - Title tag (50-60 chars), meta description (150-160 chars)
|
||||
|
||||
---
|
||||
|
||||
## Fundamentals
|
||||
|
||||
### E-E-A-T Framework
|
||||
| Dimension | What It Represents | Common Signals |
|
||||
|-----------|-------------------|----------------|
|
||||
| **Experience** | First-hand involvement | Original examples, demonstrations |
|
||||
| **Expertise** | Subject-matter competence | Credentials, depth, accuracy |
|
||||
| **Authoritativeness** | Recognition by others | Mentions, citations, links |
|
||||
| **Trustworthiness** | Reliability and safety | HTTPS, transparency, accuracy |
|
||||
|
||||
### Core Web Vitals
|
||||
| Metric | Target | What It Reflects |
|
||||
|--------|--------|------------------|
|
||||
| **LCP** | < 2.5s | Loading performance |
|
||||
| **INP** | < 200ms | Interactivity |
|
||||
| **CLS** | < 0.1 | Visual stability |
|
||||
|
||||
---
|
||||
|
||||
## Geo Targeting
|
||||
|
||||
**When to Use:** Multi-language or multi-regional SEO.
|
||||
|
||||
### Key Elements
|
||||
- `hreflang` tags for language/region targeting
|
||||
- `geo.region` meta tag
|
||||
- LocalBusiness schema for local SEO
|
||||
- Country-specific domain vs. subdomain vs. subdirectory
|
||||
- Google Business Profile optimization
|
||||
|
||||
---
|
||||
|
||||
## DataForSEO Integration
|
||||
|
||||
**When to Use:** Automated keyword research, competitor analysis, rank tracking.
|
||||
|
||||
### Common API Endpoints
|
||||
- Keywords Data API - Search volume, difficulty, CPC
|
||||
- Keywords Research API - Related keywords, questions
|
||||
- Domain Analytics API - Traffic estimation, top pages
|
||||
- Backlinks API - Link analysis
|
||||
|
||||
---
|
||||
|
||||
## Implementation Checklist
|
||||
|
||||
- [ ] robots.txt allows important resources
|
||||
- [ ] XML sitemap submitted to GSC
|
||||
- [ ] HTTPS enabled with valid certificate
|
||||
- [ ] Core Web Vitals passing
|
||||
- [ ] Mobile-friendly design
|
||||
- [ ] Clean URL structure
|
||||
- [ ] Schema markup validated
|
||||
- [ ] Content optimized for target keywords
|
||||
- [ ] Internal linking strategy implemented
|
||||
- [ ] GSC and Analytics configured
|
||||
175
skills/seo-master/assets/agency.md
Normal file
175
skills/seo-master/assets/agency.md
Normal file
@@ -0,0 +1,175 @@
|
||||
<!-- Updated: 2026-02-07 -->
|
||||
# Agency/Consultancy SEO Strategy Template
|
||||
|
||||
## Industry Characteristics
|
||||
|
||||
- Service-based, high-value transactions
|
||||
- Expertise and trust are paramount
|
||||
- Long consideration cycles
|
||||
- Portfolio/case study driven decisions
|
||||
- Relationship-based sales
|
||||
- Niche specialization benefits
|
||||
|
||||
## Recommended Site Architecture
|
||||
|
||||
```
|
||||
/
|
||||
├── Home
|
||||
├── /services
|
||||
│ ├── /service-1
|
||||
│ │ ├── /sub-service-1
|
||||
│ │ └── ...
|
||||
│ └── /service-2
|
||||
├── /industries
|
||||
│ ├── /industry-1
|
||||
│ ├── /industry-2
|
||||
│ └── ...
|
||||
├── /work (or /case-studies)
|
||||
│ ├── /case-study-1
|
||||
│ ├── /case-study-2
|
||||
│ └── ...
|
||||
├── /about
|
||||
│ ├── /team
|
||||
│ │ ├── /team-member-1
|
||||
│ │ └── ...
|
||||
│ ├── /culture
|
||||
│ └── /careers
|
||||
├── /insights (or /blog)
|
||||
│ ├── /articles
|
||||
│ ├── /guides
|
||||
│ ├── /webinars
|
||||
│ └── /podcasts
|
||||
├── /contact
|
||||
├── /process
|
||||
└── /faq
|
||||
```
|
||||
|
||||
## Schema Recommendations
|
||||
|
||||
| Page Type | Schema Types |
|
||||
|-----------|-------------|
|
||||
| Homepage | Organization, ProfessionalService |
|
||||
| Service Page | Service, ProfessionalService |
|
||||
| Case Study | Article, Organization (client) |
|
||||
| Team Member | Person, ProfilePage |
|
||||
| Blog | Article, BlogPosting |
|
||||
|
||||
### ProfessionalService Schema Example
|
||||
```json
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "ProfessionalService",
|
||||
"name": "Agency Name",
|
||||
"description": "What the agency does",
|
||||
"url": "https://example.com",
|
||||
"logo": "https://example.com/logo.png",
|
||||
"address": {
|
||||
"@type": "PostalAddress",
|
||||
"streetAddress": "123 Agency St",
|
||||
"addressLocality": "City",
|
||||
"addressRegion": "State",
|
||||
"postalCode": "12345"
|
||||
},
|
||||
"telephone": "+1-555-555-5555",
|
||||
"areaServed": "National",
|
||||
"hasOfferCatalog": {
|
||||
"@type": "OfferCatalog",
|
||||
"name": "Services",
|
||||
"itemListElement": [
|
||||
{
|
||||
"@type": "Offer",
|
||||
"itemOffered": {
|
||||
"@type": "Service",
|
||||
"name": "Service 1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## E-E-A-T Requirements
|
||||
|
||||
### Team Pages Must Include
|
||||
- Professional headshots
|
||||
- Detailed bios with credentials
|
||||
- Industry experience
|
||||
- Speaking engagements
|
||||
- Publications
|
||||
- Social profiles
|
||||
|
||||
### Case Studies Must Include
|
||||
- Client name (with permission) or industry
|
||||
- Challenge/problem statement
|
||||
- Approach/methodology
|
||||
- Results with specific metrics
|
||||
- Timeline
|
||||
- Testimonial quote
|
||||
|
||||
## Content Priorities
|
||||
|
||||
### High Priority
|
||||
1. Service pages (detailed, specific)
|
||||
2. Industry pages (vertical expertise)
|
||||
3. 3-5 detailed case studies
|
||||
4. Team/leadership pages
|
||||
|
||||
### Medium Priority
|
||||
1. Methodology/process page
|
||||
2. Blog with thought leadership
|
||||
3. Comparison content (vs alternatives)
|
||||
4. FAQ page
|
||||
|
||||
### Thought Leadership Topics
|
||||
- Industry trend analysis
|
||||
- How-to guides (non-competitive)
|
||||
- Original research/surveys
|
||||
- Event recaps and insights
|
||||
- Expert interviews
|
||||
- Tool/technology reviews
|
||||
|
||||
## Content Strategy
|
||||
|
||||
### Service Pages (min 800 words)
|
||||
- Clear value proposition
|
||||
- Methodology overview
|
||||
- Deliverables list
|
||||
- Relevant case studies
|
||||
- Team members who deliver this service
|
||||
- CTA to schedule consultation
|
||||
|
||||
### Industry Pages (min 800 words)
|
||||
- Industry-specific challenges
|
||||
- How you solve them differently
|
||||
- Relevant case studies
|
||||
- Industry credentials/experience
|
||||
- Client logos (with permission)
|
||||
|
||||
### Case Studies (min 1,000 words)
|
||||
- Executive summary
|
||||
- Client background
|
||||
- Challenge details
|
||||
- Solution approach
|
||||
- Implementation process
|
||||
- Measurable results
|
||||
- Client testimonial
|
||||
- Related services/CTA
|
||||
|
||||
## Key Metrics to Track
|
||||
|
||||
- Organic traffic to service pages
|
||||
- Case study page views
|
||||
- Contact form submissions from organic
|
||||
- Time on page for key content
|
||||
- Blog → service page conversion
|
||||
|
||||
## Generative Engine Optimization (GEO) for Agencies
|
||||
|
||||
- [ ] Publish original case studies with specific, citable metrics and results
|
||||
- [ ] Use Person schema with sameAs links for all team members (builds entity authority)
|
||||
- [ ] Use ProfilePage schema for team member pages
|
||||
- [ ] Include clear, quotable expertise statements in service page descriptions
|
||||
- [ ] Produce original industry research and surveys AI systems can cite
|
||||
- [ ] Structure thought leadership content with clear headings and extractable insights
|
||||
- [ ] Maintain consistent agency entity information across directories, social profiles, and industry sites
|
||||
- [ ] Monitor AI citation in ChatGPT, Perplexity, and Google AI Overviews for brand and key service terms
|
||||
167
skills/seo-master/assets/ecommerce.md
Normal file
167
skills/seo-master/assets/ecommerce.md
Normal file
@@ -0,0 +1,167 @@
|
||||
<!-- Updated: 2026-02-07 -->
|
||||
# E-commerce SEO Strategy Template
|
||||
|
||||
## Industry Characteristics
|
||||
|
||||
- High transaction intent
|
||||
- Product comparison behavior
|
||||
- Price sensitivity
|
||||
- Visual-first decision making
|
||||
- Seasonal demand patterns
|
||||
- Competitive marketplace listings
|
||||
|
||||
## Recommended Site Architecture
|
||||
|
||||
```
|
||||
/
|
||||
├── Home
|
||||
├── /collections (or /categories)
|
||||
│ ├── /category-1
|
||||
│ │ ├── /subcategory-1
|
||||
│ │ └── ...
|
||||
│ ├── /category-2
|
||||
│ └── ...
|
||||
├── /products
|
||||
│ ├── /product-1
|
||||
│ ├── /product-2
|
||||
│ └── ...
|
||||
├── /brands
|
||||
│ ├── /brand-1
|
||||
│ └── ...
|
||||
├── /sale (or /deals)
|
||||
├── /new-arrivals
|
||||
├── /best-sellers
|
||||
├── /gift-guide
|
||||
├── /blog
|
||||
│ ├── /buying-guides
|
||||
│ ├── /how-to
|
||||
│ └── /trends
|
||||
├── /about
|
||||
├── /contact
|
||||
├── /shipping
|
||||
├── /returns
|
||||
└── /faq
|
||||
```
|
||||
|
||||
## Schema Recommendations
|
||||
|
||||
| Page Type | Schema Types |
|
||||
|-----------|-------------|
|
||||
| Product Page | Product, Offer, AggregateRating, Review, BreadcrumbList |
|
||||
| Category Page | CollectionPage, ItemList, BreadcrumbList |
|
||||
| Brand Page | Brand, Organization |
|
||||
| Blog | Article, BlogPosting |
|
||||
|
||||
### Additional E-commerce Schema (2025)
|
||||
|
||||
- **ProductGroup**: Use for products with variants (size, color). Wraps individual Product entries with `variesBy` and `hasVariant` properties. See `schema/templates.json`.
|
||||
- **Certification**: For product certifications (Energy Star, safety, organic). Replaced EnergyConsumptionDetails (April 2025). Use `hasCertification` on Product.
|
||||
- **OfferShippingDetails**: Include shipping rate, handling time, and transit time. Critical for Merchant Center eligibility.
|
||||
|
||||
> **Google Merchant Center Free Listings:** Products can appear in Google Shopping for free. Ensure Product structured data is in the initial server-rendered HTML (not JavaScript-injected) with required properties: `name`, `image`, `price`, `priceCurrency`, `availability`.
|
||||
|
||||
> **JS Rendering Note:** Product structured data should be in initial server-rendered HTML: not dynamically injected via JavaScript (per December 2025 Google JS SEO guidance).
|
||||
|
||||
### Product Schema Example
|
||||
```json
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Product",
|
||||
"name": "Product Name",
|
||||
"image": ["https://example.com/product.jpg"],
|
||||
"description": "Product description",
|
||||
"sku": "SKU123",
|
||||
"brand": {
|
||||
"@type": "Brand",
|
||||
"name": "Brand Name"
|
||||
},
|
||||
"offers": {
|
||||
"@type": "Offer",
|
||||
"price": "99.99",
|
||||
"priceCurrency": "USD",
|
||||
"availability": "https://schema.org/InStock",
|
||||
"url": "https://example.com/product"
|
||||
},
|
||||
"aggregateRating": {
|
||||
"@type": "AggregateRating",
|
||||
"ratingValue": "4.5",
|
||||
"reviewCount": "42"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Content Requirements
|
||||
|
||||
### Product Pages (min 400 words)
|
||||
- Unique product descriptions (not manufacturer copy)
|
||||
- Feature highlights
|
||||
- Use cases / who it's for
|
||||
- Specifications table
|
||||
- Size/fit guide (for apparel)
|
||||
- Care instructions
|
||||
- Customer reviews
|
||||
|
||||
### Category Pages (min 400 words)
|
||||
- Category introduction
|
||||
- Buying guide excerpt
|
||||
- Featured products
|
||||
- Subcategory links
|
||||
- Filter/sort options
|
||||
|
||||
## Technical Considerations
|
||||
|
||||
### Pagination
|
||||
- Use rel="next"/rel="prev" or load-more
|
||||
- Ensure all products are crawlable
|
||||
- Canonical to main category page
|
||||
|
||||
### Faceted Navigation
|
||||
- Noindex filter combinations that create duplicate content
|
||||
- Use canonical tags appropriately
|
||||
- Ensure popular filters are indexable
|
||||
|
||||
### Product Variations
|
||||
- Single URL for parent product with variants
|
||||
- Or separate URLs with canonical to parent
|
||||
- Structured data for all variants
|
||||
|
||||
## Content Priorities
|
||||
|
||||
### High Priority
|
||||
1. Category pages (top level)
|
||||
2. Best-selling product pages
|
||||
3. Homepage
|
||||
4. Buying guides for main categories
|
||||
|
||||
### Medium Priority
|
||||
1. Subcategory pages
|
||||
2. Brand pages
|
||||
3. Comparison content
|
||||
4. Seasonal landing pages
|
||||
|
||||
### Blog Topics
|
||||
- Buying guides ("How to Choose...")
|
||||
- Product comparisons
|
||||
- Trend reports
|
||||
- Use cases and inspiration
|
||||
- Care and maintenance guides
|
||||
|
||||
## Key Metrics to Track
|
||||
|
||||
- Revenue from organic search
|
||||
- Product page rankings
|
||||
- Category page rankings
|
||||
- Click-through rate (rich results)
|
||||
- Average order value from organic
|
||||
|
||||
## Generative Engine Optimization (GEO) for E-commerce
|
||||
|
||||
AI search platforms increasingly answer product queries directly. Optimize for AI citation:
|
||||
|
||||
- [ ] Include clear product specifications, dimensions, materials in structured format
|
||||
- [ ] Use ProductGroup schema for variant products
|
||||
- [ ] Provide original product photography with descriptive alt text
|
||||
- [ ] Include genuine customer review content (AggregateRating schema)
|
||||
- [ ] Maintain consistent product entity data across all platforms (site, Amazon, Merchant Center)
|
||||
- [ ] Structure comparison content with clear feature tables AI can parse
|
||||
- [ ] Add detailed FAQ content for common product questions
|
||||
144
skills/seo-master/assets/generic.md
Normal file
144
skills/seo-master/assets/generic.md
Normal file
@@ -0,0 +1,144 @@
|
||||
<!-- Updated: 2026-02-07 -->
|
||||
# Generic Business SEO Strategy Template
|
||||
|
||||
## Overview
|
||||
|
||||
This template applies to businesses that don't fit neatly into SaaS, local service, e-commerce, publisher, or agency categories. Customize based on your specific business model.
|
||||
|
||||
## Recommended Site Architecture
|
||||
|
||||
```
|
||||
/
|
||||
├── Home
|
||||
├── /products (or /services)
|
||||
│ ├── /product-1
|
||||
│ ├── /product-2
|
||||
│ └── ...
|
||||
├── /solutions (if applicable)
|
||||
│ ├── /solution-1
|
||||
│ └── ...
|
||||
├── /about
|
||||
│ ├── /team
|
||||
│ ├── /history
|
||||
│ └── /values
|
||||
├── /resources
|
||||
│ ├── /blog
|
||||
│ ├── /guides
|
||||
│ ├── /faq
|
||||
│ └── /glossary
|
||||
├── /contact
|
||||
├── /support
|
||||
└── /legal
|
||||
├── /privacy
|
||||
└── /terms
|
||||
```
|
||||
|
||||
## Universal SEO Principles
|
||||
|
||||
### Every Page Should Have
|
||||
- Unique title tag (30-60 chars)
|
||||
- Unique meta description (120-160 chars)
|
||||
- Single H1 matching page intent
|
||||
- Logical heading hierarchy (H1→H2→H3)
|
||||
- Internal links to related content
|
||||
- Clear call-to-action
|
||||
|
||||
### Schema for All Sites
|
||||
| Page Type | Schema Types |
|
||||
|-----------|-------------|
|
||||
| Homepage | Organization, WebSite |
|
||||
| About | Organization, AboutPage |
|
||||
| Contact | ContactPage |
|
||||
| Blog | Article, BlogPosting |
|
||||
| FAQ | (FAQPage only for gov/health) |
|
||||
| Product/Service | Product or Service |
|
||||
|
||||
## Content Quality Standards
|
||||
|
||||
### Minimum Word Counts
|
||||
| Page Type | Min Words |
|
||||
|-----------|-----------|
|
||||
| Homepage | 500 |
|
||||
| Product/Service | 800 |
|
||||
| Blog Post | 1,500 |
|
||||
| About Page | 400 |
|
||||
| Landing Page | 600 |
|
||||
|
||||
### E-E-A-T Essentials
|
||||
1. **Experience**: Share real examples and case studies
|
||||
2. **Expertise**: Display credentials and qualifications
|
||||
3. **Authoritativeness**: Earn mentions and citations
|
||||
4. **Trustworthiness**: Full contact info, policies visible
|
||||
|
||||
## Technical Foundations
|
||||
|
||||
### Must-Haves
|
||||
- [ ] HTTPS enabled
|
||||
- [ ] Mobile-responsive design
|
||||
- [ ] robots.txt configured
|
||||
- [ ] XML sitemap submitted
|
||||
- [ ] Google Search Console verified
|
||||
- [ ] Core Web Vitals passing (LCP <2.5s, INP <200ms, CLS <0.1)
|
||||
|
||||
### Should-Haves
|
||||
- [ ] Structured data on key pages
|
||||
- [ ] Internal linking strategy
|
||||
- [ ] 404 error page optimized
|
||||
- [ ] Redirect chains eliminated
|
||||
- [ ] Image optimization (WebP, lazy loading)
|
||||
|
||||
## Content Priorities
|
||||
|
||||
### Phase 1: Foundation (weeks 1-4)
|
||||
1. Homepage optimization
|
||||
2. Core product/service pages
|
||||
3. About and contact pages
|
||||
4. Basic schema implementation
|
||||
|
||||
### Phase 2: Expansion (weeks 5-12)
|
||||
1. Blog launch (2-4 posts/month)
|
||||
2. FAQ page
|
||||
3. Additional product/service pages
|
||||
4. Internal linking audit
|
||||
|
||||
### Phase 3: Growth (weeks 13-24)
|
||||
1. Consistent content publishing
|
||||
2. Link building outreach
|
||||
3. GEO optimization
|
||||
4. Performance optimization
|
||||
|
||||
### Phase 4: Authority (months 7-12)
|
||||
1. Thought leadership content
|
||||
2. Original research
|
||||
3. PR and media mentions
|
||||
4. Advanced schema
|
||||
|
||||
## Key Metrics to Track
|
||||
|
||||
- Organic traffic (overall and by section)
|
||||
- Keyword rankings (branded and non-branded)
|
||||
- Conversion rate from organic
|
||||
- Pages indexed
|
||||
- Core Web Vitals scores
|
||||
- Backlinks acquired
|
||||
|
||||
## Customization Points
|
||||
|
||||
Adjust this template based on:
|
||||
|
||||
1. **Business Model**: B2B vs B2C vs D2C
|
||||
2. **Geographic Scope**: Local, national, or international
|
||||
3. **Content Type**: Product-focused vs content-heavy
|
||||
4. **Competition Level**: Niche vs competitive market
|
||||
5. **Resources**: Budget and team capacity
|
||||
|
||||
## Generative Engine Optimization (GEO) Checklist
|
||||
|
||||
- [ ] Include clear, quotable facts and statistics that AI systems can extract and cite
|
||||
- [ ] Use structured data (Schema.org) to help AI systems understand content
|
||||
- [ ] Build topical authority through comprehensive content clusters
|
||||
- [ ] Provide original data, research, or unique perspectives AI cannot find elsewhere
|
||||
- [ ] Maintain consistent entity information (brand, people, products) across the web
|
||||
- [ ] Structure content with clear headings, definitions, and step-by-step formats
|
||||
- [ ] Consider adding an `llms.txt` file at site root (emerging convention for AI crawlers: Google treats it as a regular text file)
|
||||
- [ ] Monitor AI citation across Google AI Overviews, ChatGPT, Perplexity, and Bing Copilot
|
||||
160
skills/seo-master/assets/local-service.md
Normal file
160
skills/seo-master/assets/local-service.md
Normal file
@@ -0,0 +1,160 @@
|
||||
<!-- Updated: 2026-02-07 -->
|
||||
# Local Service Business SEO Strategy Template
|
||||
|
||||
## Industry Characteristics
|
||||
|
||||
- Geographic-focused searches
|
||||
- High intent, quick decision making
|
||||
- Reviews heavily influence decisions
|
||||
- Phone calls are primary conversion
|
||||
- Mobile-first user behavior
|
||||
- Emergency/urgent service needs
|
||||
|
||||
## Recommended Site Architecture
|
||||
|
||||
```
|
||||
/
|
||||
├── Home
|
||||
├── /services
|
||||
│ ├── /service-1
|
||||
│ ├── /service-2
|
||||
│ └── ...
|
||||
├── /locations
|
||||
│ ├── /city-1
|
||||
│ │ ├── /service-1-city-1
|
||||
│ │ └── ...
|
||||
│ ├── /city-2
|
||||
│ └── ...
|
||||
├── /about
|
||||
├── /reviews
|
||||
├── /gallery (or /portfolio)
|
||||
├── /blog
|
||||
├── /contact
|
||||
├── /emergency (if applicable)
|
||||
└── /faq
|
||||
```
|
||||
|
||||
## Quality Gates
|
||||
|
||||
### Location Page Limits
|
||||
- ⚠️ **WARNING** at 30+ location pages
|
||||
- 🛑 **HARD STOP** at 50+ location pages
|
||||
|
||||
### Unique Content Requirements
|
||||
| Page Type | Min Words | Unique % |
|
||||
|-----------|-----------|----------|
|
||||
| Primary Location | 600 | 60%+ |
|
||||
| Service Area | 500 | 40%+ |
|
||||
| Service Page | 800 | 100% |
|
||||
|
||||
### What Makes Location Pages Unique
|
||||
- Local landmarks and neighborhoods
|
||||
- Specific services offered at that location
|
||||
- Local team members
|
||||
- Location-specific testimonials
|
||||
- Community involvement
|
||||
- Local regulations or considerations
|
||||
|
||||
## Schema Recommendations
|
||||
|
||||
| Page Type | Schema Types |
|
||||
|-----------|-------------|
|
||||
| Homepage | LocalBusiness, Organization |
|
||||
| Service Pages | Service, LocalBusiness |
|
||||
| Location Pages | LocalBusiness (with geo) |
|
||||
| Contact | ContactPage, LocalBusiness |
|
||||
| Reviews | LocalBusiness (with AggregateRating) |
|
||||
|
||||
### LocalBusiness Schema Example
|
||||
```json
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "LocalBusiness",
|
||||
"name": "Business Name",
|
||||
"address": {
|
||||
"@type": "PostalAddress",
|
||||
"streetAddress": "123 Main St",
|
||||
"addressLocality": "City",
|
||||
"addressRegion": "State",
|
||||
"postalCode": "12345"
|
||||
},
|
||||
"telephone": "+1-555-555-5555",
|
||||
"openingHours": "Mo-Fr 08:00-18:00",
|
||||
"geo": {
|
||||
"@type": "GeoCoordinates",
|
||||
"latitude": "40.7128",
|
||||
"longitude": "-74.0060"
|
||||
},
|
||||
"areaServed": ["City 1", "City 2"],
|
||||
"priceRange": "$$"
|
||||
}
|
||||
```
|
||||
|
||||
## Google Business Profile Integration
|
||||
|
||||
- Ensure NAP consistency (Name, Address, Phone)
|
||||
- Sync service categories
|
||||
- Regular post updates
|
||||
- Photo uploads
|
||||
- Review response strategy
|
||||
|
||||
### Google Business Profile Updates (2025-2026)
|
||||
|
||||
- **Video verification** is now standard: postcard verification has been largely phased out. Prepare for a short video verification process showing the business location or service area.
|
||||
- **WhatsApp integration** replaced Google Business Chat (deprecated). Businesses can connect WhatsApp as their primary messaging channel.
|
||||
- **Q&A removed from Maps**: replaced by AI-generated answers. Ensure your GBP description, services, and website FAQ are comprehensive, as Google AI uses them to answer queries.
|
||||
- **Business hours are a top-5 ranking factor**: "Business is open at time of search" ranked as a top individual factor for the first time (Whitespark 2026 Local Search Ranking Factors Report). Keep hours accurate; consider extended hours if feasible.
|
||||
- **Review "Stories" format**: Google Maps now shows review snippets in a swipeable Stories format on mobile. Encourage detailed, descriptive reviews with photos.
|
||||
|
||||
### Service Area Business (SAB) Update (June 2025)
|
||||
|
||||
Google updated SAB guidelines to **disallow entire states or countries** as service areas. SABs must specify: cities, postal/ZIP codes, or neighborhoods. If you serve an entire metro area, list the major cities within it rather than the state.
|
||||
|
||||
### AI Visibility for Local Businesses
|
||||
|
||||
AI Overviews appear for only ~0.14% of local keywords (March 2025 data), local SEO faces significantly less AI disruption than other verticals. However, ChatGPT and Perplexity are increasingly used for local recommendations.
|
||||
|
||||
To optimize for AI local visibility:
|
||||
- Ensure presence on expert-curated "best of" lists (ranked #1 AI visibility factor in Whitespark 2026 report)
|
||||
- Maintain consistent NAP (Name, Address, Phone) across all platforms
|
||||
- Build genuine review volume and quality
|
||||
- Use LocalBusiness schema with complete properties (geo, openingHours, priceRange, areaServed)
|
||||
|
||||
## Content Priorities
|
||||
|
||||
### High Priority
|
||||
1. Homepage with clear service area
|
||||
2. Core service pages
|
||||
3. Primary city page
|
||||
4. Contact page with all locations
|
||||
|
||||
### Medium Priority
|
||||
1. Service + location combination pages
|
||||
2. FAQ page
|
||||
3. About/team page
|
||||
4. Reviews/testimonials page
|
||||
|
||||
### Blog Topics
|
||||
- Seasonal maintenance tips
|
||||
- How to choose a [service provider]
|
||||
- Warning signs of [problem]
|
||||
- DIY vs professional comparisons
|
||||
- Local regulations and permits
|
||||
|
||||
## Key Metrics to Track
|
||||
|
||||
- Local pack rankings
|
||||
- Phone call volume from organic
|
||||
- Direction requests
|
||||
- Google Business Profile insights
|
||||
- Reviews count and rating
|
||||
|
||||
## Generative Engine Optimization (GEO) for Local
|
||||
|
||||
- [ ] Include clear, quotable service descriptions and pricing ranges
|
||||
- [ ] Use LocalBusiness schema with complete geo, openingHours, and areaServed
|
||||
- [ ] Build presence on curated "best of" and local directory lists
|
||||
- [ ] Maintain consistent NAP across all platforms (Google, Yelp, Apple Maps)
|
||||
- [ ] Include original photos of work, team, and location
|
||||
- [ ] Structure FAQ content for common local service questions
|
||||
- [ ] Monitor AI citation in ChatGPT and Perplexity local recommendations
|
||||
153
skills/seo-master/assets/publisher.md
Normal file
153
skills/seo-master/assets/publisher.md
Normal file
@@ -0,0 +1,153 @@
|
||||
<!-- Updated: 2026-02-07 -->
|
||||
# Publisher/Media SEO Strategy Template
|
||||
|
||||
## Industry Characteristics
|
||||
|
||||
- High content volume
|
||||
- Time-sensitive content (news)
|
||||
- Ad revenue dependent on traffic
|
||||
- Authority and trust critical
|
||||
- Competing with social platforms
|
||||
- AI Overviews impact on traffic
|
||||
|
||||
## Recommended Site Architecture
|
||||
|
||||
```
|
||||
/
|
||||
├── Home
|
||||
├── /news (or /latest)
|
||||
├── /topics
|
||||
│ ├── /topic-1
|
||||
│ ├── /topic-2
|
||||
│ └── ...
|
||||
├── /authors
|
||||
│ ├── /author-1
|
||||
│ └── ...
|
||||
├── /opinion
|
||||
├── /reviews
|
||||
├── /guides
|
||||
├── /videos
|
||||
├── /podcasts
|
||||
├── /newsletter
|
||||
├── /about
|
||||
│ ├── /editorial-policy
|
||||
│ ├── /corrections
|
||||
│ └── /contact
|
||||
└── /[year]/[month]/[slug] (article URLs)
|
||||
```
|
||||
|
||||
## Schema Recommendations
|
||||
|
||||
| Page Type | Schema Types |
|
||||
|-----------|-------------|
|
||||
| Article | NewsArticle or Article, Person (author), Organization (publisher) |
|
||||
| Author Page | Person, ProfilePage |
|
||||
| Topic Page | CollectionPage, ItemList |
|
||||
| Homepage | WebSite, Organization |
|
||||
| Video | VideoObject |
|
||||
| Podcast | PodcastEpisode, PodcastSeries |
|
||||
|
||||
### NewsArticle Schema Example
|
||||
```json
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "NewsArticle",
|
||||
"headline": "Article Headline",
|
||||
"datePublished": "2026-02-07T10:00:00Z",
|
||||
"dateModified": "2026-02-07T14:30:00Z",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "Author Name",
|
||||
"url": "https://example.com/authors/author-name"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "Publication Name",
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "https://example.com/logo.png"
|
||||
}
|
||||
},
|
||||
"image": ["https://example.com/article-image.jpg"],
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "https://example.com/article-url"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## E-E-A-T Requirements
|
||||
|
||||
Publishers face highest E-E-A-T scrutiny.
|
||||
|
||||
### Author Pages Must Include
|
||||
- Full name and photo
|
||||
- Bio and credentials
|
||||
- Areas of expertise
|
||||
- Contact information
|
||||
- Social profiles (sameAs)
|
||||
- Previous articles by this author
|
||||
|
||||
### Editorial Standards
|
||||
- Clear correction policy
|
||||
- Transparent editorial process
|
||||
- Fact-checking procedures
|
||||
- Conflict of interest disclosures
|
||||
|
||||
## Content Priorities
|
||||
|
||||
### High Priority
|
||||
1. Breaking news (speed matters)
|
||||
2. Evergreen guides on core topics
|
||||
3. Author pages with credentials
|
||||
4. Topic hubs/pillar pages
|
||||
|
||||
### Medium Priority
|
||||
1. Opinion/analysis pieces
|
||||
2. Video content
|
||||
3. Interactive content
|
||||
4. Newsletter landing pages
|
||||
|
||||
### GEO Considerations
|
||||
- Clear, quotable facts in articles
|
||||
- Tables for data-heavy content
|
||||
- Expert quotes with attribution
|
||||
- Update dates prominently displayed
|
||||
- Structured headings (H2/H3)
|
||||
- First-party data and original research are highly cited by AI systems
|
||||
- Ensure author entities are clearly defined with Person schema + sameAs links
|
||||
- Monitor AI citation frequency across Google AI Overviews, AI Mode, ChatGPT, Perplexity
|
||||
- Treat AI citation as a standalone KPI alongside organic traffic
|
||||
|
||||
### Publisher SEO Updates (2025-2026)
|
||||
|
||||
- **Google News automatic inclusion:** Google News no longer accepts manual applications (since March 2025). Inclusion is fully automatic based on Google's content quality criteria. Focus on Google News sitemap markup and consistent, high-quality publishing cadence.
|
||||
- **KPI shift:** Traffic-based KPIs (sessions, pageviews) are declining in relevance as AI Overviews reduce click-through rates. Leading publishers are shifting to: subscriber conversions, time on page, scroll depth, newsletter signups, AI citation frequency, and revenue per visitor.
|
||||
- **Site reputation abuse risk:** Publishers hosting third-party content (coupons, product reviews, affiliate content) under their domain are at high risk. Google penalized Forbes, WSJ, Time, and CNN for this in late 2024. If hosting third-party content, ensure strong editorial oversight and clear first-party involvement.
|
||||
|
||||
## Technical Considerations
|
||||
|
||||
### Core Web Vitals
|
||||
- Ad placement affects CLS
|
||||
- Lazy load ads and images below fold
|
||||
- Optimize hero images for LCP
|
||||
- Minimize render-blocking resources
|
||||
|
||||
### AMP (if used)
|
||||
- Consider dropping AMP (no longer required for Top Stories)
|
||||
- Ensure canonical setup is correct
|
||||
- Monitor performance vs non-AMP
|
||||
|
||||
### Pagination
|
||||
- Proper pagination for multi-page articles
|
||||
- Or infinite scroll with proper indexing
|
||||
- Canonical to page 1 or full article
|
||||
|
||||
## Key Metrics to Track
|
||||
|
||||
- Page views from organic
|
||||
- Time on page
|
||||
- Pages per session
|
||||
- Newsletter signups from organic
|
||||
- Google News/Discover traffic
|
||||
- AI Overview appearances
|
||||
135
skills/seo-master/assets/saas.md
Normal file
135
skills/seo-master/assets/saas.md
Normal file
@@ -0,0 +1,135 @@
|
||||
<!-- Updated: 2026-02-07 -->
|
||||
# SaaS SEO Strategy Template
|
||||
|
||||
## Industry Characteristics
|
||||
|
||||
- Long sales cycles with multiple touchpoints
|
||||
- Feature-focused decision making
|
||||
- Comparison shopping behavior
|
||||
- Heavy research phase before purchase
|
||||
- Integration and ecosystem considerations
|
||||
|
||||
## Recommended Site Architecture
|
||||
|
||||
```
|
||||
/
|
||||
├── Home
|
||||
├── /product (or /platform)
|
||||
│ ├── /features
|
||||
│ │ ├── /feature-1
|
||||
│ │ ├── /feature-2
|
||||
│ │ └── ...
|
||||
│ ├── /integrations
|
||||
│ │ ├── /integration-1
|
||||
│ │ └── ...
|
||||
│ └── /security
|
||||
├── /solutions
|
||||
│ ├── /by-industry
|
||||
│ │ ├── /industry-1
|
||||
│ │ └── ...
|
||||
│ └── /by-use-case
|
||||
│ ├── /use-case-1
|
||||
│ └── ...
|
||||
├── /pricing
|
||||
├── /customers
|
||||
│ ├── /case-studies
|
||||
│ │ ├── /case-study-1
|
||||
│ │ └── ...
|
||||
│ └── /testimonials
|
||||
├── /resources
|
||||
│ ├── /blog
|
||||
│ ├── /guides
|
||||
│ ├── /webinars
|
||||
│ ├── /templates
|
||||
│ └── /glossary
|
||||
├── /docs (or /help)
|
||||
│ └── /api
|
||||
├── /company
|
||||
│ ├── /about
|
||||
│ ├── /careers
|
||||
│ ├── /press
|
||||
│ └── /contact
|
||||
└── /compare
|
||||
├── /vs-competitor-1
|
||||
└── /vs-competitor-2
|
||||
```
|
||||
|
||||
## Content Priorities
|
||||
|
||||
### High Priority Pages
|
||||
1. Homepage (value proposition, social proof)
|
||||
2. Features overview
|
||||
3. Pricing page
|
||||
4. Key integrations
|
||||
5. Top 3-5 use case pages
|
||||
|
||||
### Medium Priority Pages
|
||||
1. Individual feature pages
|
||||
2. Industry solution pages
|
||||
3. Case studies (2-3 detailed ones)
|
||||
4. Comparison pages (vs competitors)
|
||||
|
||||
### Content Marketing Focus
|
||||
1. Bottom-of-funnel: Comparison guides, ROI calculators
|
||||
2. Middle-of-funnel: How-to guides, best practices
|
||||
3. Top-of-funnel: Industry trends, educational content
|
||||
|
||||
## Schema Recommendations
|
||||
|
||||
| Page Type | Schema Types |
|
||||
|-----------|-------------|
|
||||
| Homepage | Organization, WebSite, SoftwareApplication |
|
||||
| Product/Features | SoftwareApplication, Offer |
|
||||
| Pricing | SoftwareApplication, Offer (with pricing) |
|
||||
| Blog | Article, BlogPosting |
|
||||
| Case Studies | Article, Organization (customer) |
|
||||
| Documentation | TechArticle |
|
||||
|
||||
## Key Metrics to Track
|
||||
|
||||
- Organic traffic to pricing page
|
||||
- Demo/trial signups from organic
|
||||
- Blog → pricing page conversion
|
||||
- Comparison page rankings
|
||||
- Integration page performance
|
||||
|
||||
## Comparison & Alternative Pages
|
||||
|
||||
Comparison pages are among the highest-converting content types for SaaS, with conversion rates of **4-7%** vs. 0.5-1.8% for standard blog content (35.8% of marketers report comparison content performs "better than ever" per Intergrowth November 2025 survey).
|
||||
|
||||
**Recommended page types:**
|
||||
- `/{product}-vs-{competitor}`: Direct 1:1 comparison
|
||||
- `/{competitor}-alternative`: Targeting competitor brand searches
|
||||
- `/compare/{category}`: Category comparison hub
|
||||
- `/best-{category}-tools`: Roundup-style pages
|
||||
|
||||
**Best practices:**
|
||||
- Include structured comparison tables with pricing, features, pros/cons
|
||||
- Be factually accurate about competitors: verify claims regularly
|
||||
- Include customer testimonials from users who switched
|
||||
- Add FAQ schema for common comparison questions (valuable for AI search)
|
||||
- Update regularly: stale comparison data damages credibility
|
||||
- Cross-reference the `seo-competitor-pages` skill for detailed frameworks
|
||||
|
||||
**Legal considerations:**
|
||||
- Nominative fair use generally permits competitor brand mentions for comparison purposes
|
||||
- Do NOT imply endorsement or affiliation
|
||||
- Do NOT make false or unverifiable claims about competitor products
|
||||
- Different jurisdictions have different trademark laws: consult legal counsel
|
||||
|
||||
## Competitive Considerations
|
||||
|
||||
- Monitor competitor feature releases
|
||||
- Track competitor content strategies
|
||||
- Identify keyword gaps in feature coverage
|
||||
- Watch for new comparison opportunities
|
||||
|
||||
## Generative Engine Optimization (GEO) for SaaS
|
||||
|
||||
- [ ] Include clear, structured feature comparisons that AI systems can parse and cite
|
||||
- [ ] Use SoftwareApplication schema with complete feature lists and pricing
|
||||
- [ ] Publish original benchmark data, case studies, and ROI metrics
|
||||
- [ ] Build content clusters around key product categories and use cases
|
||||
- [ ] Ensure integration pages have clear, quotable descriptions
|
||||
- [ ] Structure pricing information in tables AI can extract
|
||||
- [ ] Monitor AI citation across Google AI Overviews, ChatGPT, and Perplexity
|
||||
219
skills/seo-master/scripts/seo_checker.py
Normal file
219
skills/seo-master/scripts/seo_checker.py
Normal file
@@ -0,0 +1,219 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
SEO Checker - Search Engine Optimization Audit
|
||||
Checks HTML/JSX/TSX pages for SEO best practices.
|
||||
|
||||
PURPOSE:
|
||||
- Verify meta tags, titles, descriptions
|
||||
- Check Open Graph tags for social sharing
|
||||
- Validate heading hierarchy
|
||||
- Check image accessibility (alt attributes)
|
||||
|
||||
WHAT IT CHECKS:
|
||||
- HTML files (actual web pages)
|
||||
- JSX/TSX files (React page components)
|
||||
- Only files that are likely PUBLIC pages
|
||||
|
||||
Usage:
|
||||
python seo_checker.py <project_path>
|
||||
"""
|
||||
import sys
|
||||
import json
|
||||
import re
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
|
||||
# Fix Windows console encoding
|
||||
try:
|
||||
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
# Directories to skip
|
||||
SKIP_DIRS = {
|
||||
'node_modules', '.next', 'dist', 'build', '.git', '.github',
|
||||
'__pycache__', '.vscode', '.idea', 'coverage', 'test', 'tests',
|
||||
'__tests__', 'spec', 'docs', 'documentation', 'examples'
|
||||
}
|
||||
|
||||
# Files to skip (not pages)
|
||||
SKIP_PATTERNS = [
|
||||
'config', 'setup', 'util', 'helper', 'hook', 'context', 'store',
|
||||
'service', 'api', 'lib', 'constant', 'type', 'interface', 'mock',
|
||||
'.test.', '.spec.', '_test.', '_spec.'
|
||||
]
|
||||
|
||||
|
||||
def is_page_file(file_path: Path) -> bool:
|
||||
"""Check if this file is likely a public-facing page."""
|
||||
name = file_path.name.lower()
|
||||
stem = file_path.stem.lower()
|
||||
|
||||
# Skip utility/config files
|
||||
if any(skip in name for skip in SKIP_PATTERNS):
|
||||
return False
|
||||
|
||||
# Check path - pages in specific directories are likely pages
|
||||
parts = [p.lower() for p in file_path.parts]
|
||||
page_dirs = ['pages', 'app', 'routes', 'views', 'screens']
|
||||
|
||||
if any(d in parts for d in page_dirs):
|
||||
return True
|
||||
|
||||
# Filename indicators for pages
|
||||
page_names = ['page', 'index', 'home', 'about', 'contact', 'blog',
|
||||
'post', 'article', 'product', 'landing', 'layout']
|
||||
|
||||
if any(p in stem for p in page_names):
|
||||
return True
|
||||
|
||||
# HTML files are usually pages
|
||||
if file_path.suffix.lower() in ['.html', '.htm']:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def find_pages(project_path: Path) -> list:
|
||||
"""Find page files to check."""
|
||||
patterns = ['**/*.html', '**/*.htm', '**/*.jsx', '**/*.tsx']
|
||||
|
||||
files = []
|
||||
for pattern in patterns:
|
||||
for f in project_path.glob(pattern):
|
||||
# Skip excluded directories
|
||||
if any(skip in f.parts for skip in SKIP_DIRS):
|
||||
continue
|
||||
|
||||
# Check if it's likely a page
|
||||
if is_page_file(f):
|
||||
files.append(f)
|
||||
|
||||
return files[:50] # Limit to 50 files
|
||||
|
||||
|
||||
def check_page(file_path: Path) -> dict:
|
||||
"""Check a single page for SEO issues."""
|
||||
issues = []
|
||||
|
||||
try:
|
||||
content = file_path.read_text(encoding='utf-8', errors='ignore')
|
||||
except Exception as e:
|
||||
return {"file": str(file_path.name), "issues": [f"Error: {e}"]}
|
||||
|
||||
# Detect if this is a layout/template file (has Head component)
|
||||
is_layout = 'Head>' in content or '<head' in content.lower()
|
||||
|
||||
# 1. Title tag
|
||||
has_title = '<title' in content.lower() or 'title=' in content or 'Head>' in content
|
||||
if not has_title and is_layout:
|
||||
issues.append("Missing <title> tag")
|
||||
|
||||
# 2. Meta description
|
||||
has_description = 'name="description"' in content.lower() or 'name=\'description\'' in content.lower()
|
||||
if not has_description and is_layout:
|
||||
issues.append("Missing meta description")
|
||||
|
||||
# 3. Open Graph tags
|
||||
has_og = 'og:' in content or 'property="og:' in content.lower()
|
||||
if not has_og and is_layout:
|
||||
issues.append("Missing Open Graph tags")
|
||||
|
||||
# 4. Heading hierarchy - multiple H1s
|
||||
h1_matches = re.findall(r'<h1[^>]*>', content, re.I)
|
||||
if len(h1_matches) > 1:
|
||||
issues.append(f"Multiple H1 tags ({len(h1_matches)})")
|
||||
|
||||
# 5. Images without alt
|
||||
img_pattern = r'<img[^>]+>'
|
||||
imgs = re.findall(img_pattern, content, re.I)
|
||||
for img in imgs:
|
||||
if 'alt=' not in img.lower():
|
||||
issues.append("Image missing alt attribute")
|
||||
break
|
||||
if 'alt=""' in img or "alt=''" in img:
|
||||
issues.append("Image has empty alt attribute")
|
||||
break
|
||||
|
||||
# 6. Check for canonical link (nice to have)
|
||||
# has_canonical = 'rel="canonical"' in content.lower()
|
||||
|
||||
return {
|
||||
"file": str(file_path.name),
|
||||
"issues": issues
|
||||
}
|
||||
|
||||
|
||||
def main():
|
||||
project_path = Path(sys.argv[1] if len(sys.argv) > 1 else ".").resolve()
|
||||
|
||||
print(f"\n{'='*60}")
|
||||
print(f" SEO CHECKER - Search Engine Optimization Audit")
|
||||
print(f"{'='*60}")
|
||||
print(f"Project: {project_path}")
|
||||
print(f"Time: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
|
||||
print("-"*60)
|
||||
|
||||
# Find pages
|
||||
pages = find_pages(project_path)
|
||||
|
||||
if not pages:
|
||||
print("\n[!] No page files found.")
|
||||
print(" Looking for: HTML, JSX, TSX in pages/app/routes directories")
|
||||
output = {"script": "seo_checker", "files_checked": 0, "passed": True}
|
||||
print("\n" + json.dumps(output, indent=2))
|
||||
sys.exit(0)
|
||||
|
||||
print(f"Found {len(pages)} page files to analyze\n")
|
||||
|
||||
# Check each page
|
||||
all_issues = []
|
||||
for f in pages:
|
||||
result = check_page(f)
|
||||
if result["issues"]:
|
||||
all_issues.append(result)
|
||||
|
||||
# Summary
|
||||
print("=" * 60)
|
||||
print("SEO ANALYSIS RESULTS")
|
||||
print("=" * 60)
|
||||
|
||||
if all_issues:
|
||||
# Group by issue type
|
||||
issue_counts = {}
|
||||
for item in all_issues:
|
||||
for issue in item["issues"]:
|
||||
issue_counts[issue] = issue_counts.get(issue, 0) + 1
|
||||
|
||||
print("\nIssue Summary:")
|
||||
for issue, count in sorted(issue_counts.items(), key=lambda x: -x[1]):
|
||||
print(f" [{count}] {issue}")
|
||||
|
||||
print(f"\nAffected files ({len(all_issues)}):")
|
||||
for item in all_issues[:5]:
|
||||
print(f" - {item['file']}")
|
||||
if len(all_issues) > 5:
|
||||
print(f" ... and {len(all_issues) - 5} more")
|
||||
else:
|
||||
print("\n[OK] No SEO issues found!")
|
||||
|
||||
total_issues = sum(len(item["issues"]) for item in all_issues)
|
||||
passed = total_issues == 0
|
||||
|
||||
output = {
|
||||
"script": "seo_checker",
|
||||
"project": str(project_path),
|
||||
"files_checked": len(pages),
|
||||
"files_with_issues": len(all_issues),
|
||||
"issues_found": total_issues,
|
||||
"passed": passed
|
||||
}
|
||||
|
||||
print("\n" + json.dumps(output, indent=2))
|
||||
|
||||
sys.exit(0 if passed else 1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user