seo-analytics
Generate visual SEO analysis reports using Google PageSpeed Insights API. Use when user asks to analyze website performance, SEO scores, Core Web Vitals, or page speed. Outputs an interactive HTML report with charts and actionable recommendations.
What this skill does
# SEO Analytics Skill
Generate comprehensive SEO and performance analysis reports for any website using Google PageSpeed Insights API.
## When to Use
- "Analyze the SEO of https://example.com"
- "Check the performance of my website"
- "Generate a Core Web Vitals report for..."
- "What's the page speed score of..."
- "SEO audit for..."
## API Key Requirement
**IMPORTANT**: This skill requires a Google PageSpeed Insights API key. If the user has not provided an API key, you MUST ask for one before proceeding.
### When No API Key is Provided
If the user requests SEO analysis without providing an API key, respond with:
---
**To run SEO analysis, I need a Google PageSpeed Insights API key.**
**How to get your API key (takes ~2 minutes):**
1. Go to [Google Cloud Console](https://console.cloud.google.com/)
2. Create a new project or select an existing one
3. Navigate to **APIs & Services** > **Library**
4. Search for "**PageSpeed Insights API**" and click **Enable**
5. Go to **APIs & Services** > **Credentials**
6. Click **Create Credentials** > **API Key**
7. Copy your new API key
Once you have the key, provide it and I'll run the analysis.
---
### API Key Usage
The API key can be provided in two ways:
1. As a command line argument: `npx ts-node analyze.ts <URL> <API_KEY>`
2. As an environment variable: `PAGESPEED_API_KEY`
## Quick Start
```
User: "Analyze https://eng0.ai"
# If no API key provided, ask user for one first
# With API key:
Output:
- ./seo-report.html (interactive report with charts)
- Console summary with key metrics
```
## How to Execute
### Step 1: Run the Analysis Script
```bash
npx ts-node analyze.ts https://example.com YOUR_API_KEY
```
Or with environment variable:
```bash
PAGESPEED_API_KEY=your_key npx ts-node analyze.ts https://example.com
```
### Step 2: Inline Execution (Alternative)
Create and run `analyze.ts` in the current directory:
```typescript
// analyze.ts - SEO Analysis Script
const url = process.argv[2];
const apiKey = process.argv[3] || process.env.PAGESPEED_API_KEY;
if (!url) {
console.error('Usage: npx ts-node analyze.ts <URL> [API_KEY]');
console.error('Or set PAGESPEED_API_KEY environment variable');
process.exit(1);
}
interface AuditResult {
title?: string;
description?: string;
score?: number | null;
displayValue?: string;
numericValue?: number;
}
interface PageSpeedResult {
lighthouseResult: {
categories: {
performance: { score: number };
accessibility: { score: number };
'best-practices': { score: number };
seo: { score: number };
};
audits: {
[key: string]: AuditResult;
};
};
}
async function analyzeUrl(targetUrl: string, strategy: 'mobile' | 'desktop'): Promise<PageSpeedResult> {
let apiUrl = `https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=${encodeURIComponent(targetUrl)}&strategy=${strategy}&category=performance&category=accessibility&category=best-practices&category=seo`;
if (apiKey) {
apiUrl += `&key=${apiKey}`;
}
console.log(`Analyzing ${strategy}...`);
const response = await fetch(apiUrl);
if (!response.ok) {
throw new Error(`API error: ${response.status} ${response.statusText}`);
}
return response.json() as Promise<PageSpeedResult>;
}
function getScoreColor(score: number): string {
if (score >= 90) return '#0cce6b';
if (score >= 50) return '#ffa400';
return '#ff4e42';
}
function generateReport(mobile: PageSpeedResult, desktop: PageSpeedResult, targetUrl: string): string {
const m = mobile.lighthouseResult;
const d = desktop.lighthouseResult;
const mobileScores = {
performance: Math.round(m.categories.performance.score * 100),
accessibility: Math.round(m.categories.accessibility.score * 100),
bestPractices: Math.round(m.categories['best-practices'].score * 100),
seo: Math.round(m.categories.seo.score * 100),
};
const desktopScores = {
performance: Math.round(d.categories.performance.score * 100),
accessibility: Math.round(d.categories.accessibility.score * 100),
bestPractices: Math.round(d.categories['best-practices'].score * 100),
seo: Math.round(d.categories.seo.score * 100),
};
const webVitals = {
mobile: {
lcp: m.audits['largest-contentful-paint'],
tbt: m.audits['total-blocking-time'],
cls: m.audits['cumulative-layout-shift'],
fcp: m.audits['first-contentful-paint'],
si: m.audits['speed-index'],
tti: m.audits['interactive'],
},
desktop: {
lcp: d.audits['largest-contentful-paint'],
tbt: d.audits['total-blocking-time'],
cls: d.audits['cumulative-layout-shift'],
fcp: d.audits['first-contentful-paint'],
si: d.audits['speed-index'],
tti: d.audits['interactive'],
},
};
// Extract top opportunities
const opportunities: string[] = [];
for (const [key, audit] of Object.entries(m.audits)) {
if (audit.score !== undefined && audit.score < 0.9 && audit.title && audit.description) {
opportunities.push(`<li><strong>${audit.title}</strong>: ${audit.description.split('.')[0]}.</li>`);
}
}
return `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SEO Report - ${targetUrl}</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; color: #333; line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }
h1 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.url { color: #666; font-size: 0.9rem; margin-bottom: 2rem; word-break: break-all; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.card { background: white; border-radius: 8px; padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.card h2 { font-size: 1.1rem; margin-bottom: 1rem; color: #444; }
.scores { display: flex; justify-content: space-around; text-align: center; }
.score-item { display: flex; flex-direction: column; align-items: center; }
.score-circle { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: bold; color: white; margin-bottom: 0.5rem; }
.score-label { font-size: 0.75rem; color: #666; }
.vitals-table { width: 100%; border-collapse: collapse; }
.vitals-table th, .vitals-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid #eee; }
.vitals-table th { font-weight: 500; color: #666; font-size: 0.85rem; }
.good { color: #0cce6b; }
.needs-improvement { color: #ffa400; }
.poor { color: #ff4e42; }
.chart-container { position: relative; height: 300px; }
.opportunities { list-style: none; }
.opportunities li { padding: 0.75rem 0; border-bottom: 1px solid #eee; font-size: 0.9rem; }
.opportunities li:last-child { border-bottom: none; }
.timestamp { text-align: center; color: #999; font-size: 0.8rem; margin-top: 2rem; }
</style>
</head>
<body>
<div class="container">
<h1>SEO Analysis Report</h1>
<p class="url">${targetUrl}</p>
<div class="grid">
<div class="card">
<h2>Mobile Scores</h2>
<div class="scores">
<div class="score-item">
<div class="score-circle" style="background: ${getScoreColor(mobileScores.performance)}">${mobileScores.performance}</div>
<span class="score-label">Performance</span>
</div>
<div class="score-item">
<div class="score-circle" style="background: ${getScoreColor(mobileScores.accessibility)}">${mobileScores.accessibility}</div>
<span class="score-label">Accessibility</span>
</div>
<div class="score-item">
<div class="scRelated in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".