Skip to content
cccskills
FreePublished on GitHub

optimize

Pull real performance data from Google Search Console, analyze weak-performing pages, and generate actionable optimization recommendations. Optionally applies safe auto-fixes to Sophon-generated content.

The English summary is being prepared. Showing the original description.

Works withSearch Console
See how to install

Files included (1)

  • SKILL.md4.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Overview

The optimize skill connects Sophon entities to real search performance data from Google Search Console (GSC). It identifies underperforming pages, diagnoses issues, and produces a prioritized optimization report with actionable recommendations.

Prerequisites

  • GSC access token: Set GSC_ACCESS_TOKEN environment variable or pass --access-token.
  • Entities: A valid data/entities.json file (output of sophon discover).
  • Site URL: The verified GSC property URL (e.g. https://example.com).

CLI Usage

sophon optimize --site https://example.com
sophon optimize --site https://example.com --limit 50
sophon optimize --site https://example.com --auto-fix
sophon optimize --site https://example.com --access-token TOKEN --output ./report.json

Options

FlagDescription
--site(required) GSC property URL
--limitMax pages to fetch from GSC (default: 500)
--auto-fixApply safe auto-fixes to enriched content
--access-tokenGSC OAuth access token (or set GSC_ACCESS_TOKEN)
--outputOutput path (default: data/optimization-report.json)
--entitiesPath to entities file (default: data/entities.json)

Pipeline

  1. Fetch — Pull page-level and query-level metrics from GSC API
  2. Map — Match GSC pages to Sophon entities by slug
  3. Analyze — Apply rule-based detection for underperformance patterns
  4. Recommend — Generate typed, actionable recommendations
  5. Report — Write prioritized optimization-report.json
  6. Auto-fix (optional) — Insert TODO markers into enriched content files

Analysis Rules

PatternIssue TypeDetection
High impressions + low CTRlow_ctr / high_impressions_low_clicksCTR below threshold for position range
Position 8–20striking_distancePage is close to page 1
Position >20poor_positionSignificant content gap
Low impressionslow_impressionsKeyword mismatch or not indexed
Intent mismatchintent_mismatchPage structure doesn't match query intent
Weak internal linkingweak_linkingFew inbound internal links

Scoring

Each entity receives an optimization score (0–100):

  • Position: 0–40 point penalty based on ranking
  • CTR: Up to 25 point penalty for low click-through
  • Impressions: Up to 20 point penalty for low visibility
  • Issue count: Up to 15 point penalty

Priority mapping: critical (<30) | high (<50) | medium (<70) | low (≥70)

Recommendation Types

TypeExamples
metaRewrite title, improve meta description
contentAdd sections, expand content depth
structureAdd FAQ schema, restructure for intent
linkingAdd internal links, build topic clusters

Auto-Fix Safety

When --auto-fix is enabled:

  • Only modifies files within the project directory
  • Only touches Sophon-generated files (files containing SOPHON GENERATED marker)
  • Inserts [OPTIMIZE] TODO markers — does not overwrite existing content
  • Falls back gracefully if enriched files don't exist

Output Format

{
  "generatedAt": "2026-04-13T...",
  "site": "https://example.com",
  "totalEntities": 100,
  "analyzedEntities": 87,
  "summary": {
    "critical": 5,
    "high": 12,
    "medium": 30,
    "low": 40,
    "averageScore": 62
  },
  "entities": [
    {
      "entity": "best payroll software for startups",
      "slug": "best-payroll-software-for-startups",
      "metrics": {
        "clicks": 120,
        "impressions": 4000,
        "ctr": 0.03,
        "position": 12.4
      },
      "optimizationScore": 42,
      "issues": ["Low CTR (3.0%) for position 12.4 — expected >1%"],
      "issueTypes": ["low_ctr", "striking_distance"],
      "recommendations": [
        {
          "type": "meta",
          "action": "Rewrite title tag — use power words, numbers, or brackets",
          "reasoning": "Low CTR relative to position indicates the title is not compelling."
        }
      ],
      "priority": "high"
    }
  ]
}

Future Extensions

The optimize module is designed for extension:

  • Google Analytics: Add bounce rate and session time as additional signals
  • A/B testing: Generate title/meta variants and track performance
  • Continuous loop: Schedule periodic optimization runs via cron
  • Entity discovery feedback: Feed winning queries back into sophon discover
  • AI-enhanced recommendations: Use Claude to rewrite titles/meta based on recommendations

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Discover and normalize entities for programmatic SEO from a seed keyword or CSV file. Writes normalized entities to data/entities.json. Use when the user wants to find, import, or expand a list of SEO targets.

The English summary is being prepared. Showing the original description.

Sophiasuu/Sophon8Updated Apr 14, 2026

enrich

Free

Enrich discovered entities with AI-generated content using Claude via the Anthropic SDK. Outputs structured JSON per entity for downstream use in page templates. Requires ANTHROPIC_API_KEY (or use --dry-run to preview prompts).

The English summary is being prepared. Showing the original description.

Sophiasuu/Sophon8Updated Apr 14, 2026

Generate one static framework page per entity using the appropriate Sophon adapter. Supports Next.js, Astro, Nuxt, SvelteKit, and Remix. Use when the user wants to scaffold programmatic SEO pages.

The English summary is being prepared. Showing the original description.

Sophiasuu/Sophon8Updated Apr 14, 2026

run

Free

Execute the full Sophon pipeline: discover → generate → technical → enrich. Use when the user wants to run all steps in one command or build a complete pSEO surface from scratch.

The English summary is being prepared. Showing the original description.

Sophiasuu/Sophon8Updated Apr 14, 2026

sophon

Free

Master context for Sophon — an agentic programmatic SEO toolkit. Teaches the framework, entity model, adapter system, and operating rules. Invoke this skill before using discover, generate, technical, enrich, optimize, or run so you have the full context. Call with 'teach' to run the onboarding interview and create .sophon.md.

The English summary is being prepared. Showing the original description.

Sophiasuu/Sophon8Updated Apr 14, 2026

Generate technical SEO assets: sitemap.xml (with sitemap index for large sites), robots.txt, per-entity schema markup (BreadcrumbList, AggregateRating), configurable internal link graph, and hreflang scaffold. Use when the user wants to add or update sitemap, robots, structured data, internal linking, or multilingual hreflang tags.

The English summary is being prepared. Showing the original description.

Sophiasuu/Sophon8Updated Apr 14, 2026

See all skills by Sophiasuu

Report a problem with this skill