Terminal.skills
Use Cases/Automate Blog Post SEO Optimization and Internal Linking with AI

Automate Blog Post SEO Optimization and Internal Linking with AI

Use AI to audit blog posts for SEO gaps, fix metadata, and build internal linking maps automatically.

Business#seo#audit#technical-seo#writing#blog
Works with:claude-codeopenai-codexgemini-clicursor
$

The Problem

Your blog has dozens of posts but organic traffic has plateaued. A 15-person content marketing team publishes three blog posts per week. After six months they have 70+ articles, but organic traffic is flat. Posts lack consistent meta descriptions, title tags are too long or generic, heading structures are messy, and almost no posts link to each other. A manual audit of every article takes a full day, and the results go stale within a month as new content ships. The team knows SEO matters but nobody has time to retrofit every old post while keeping up with the publishing calendar.

The Solution

Use the seo-audit skill to crawl each post and score it against on-page SEO best practices. Feed the results into the content-writer skill to generate improved titles, meta descriptions, and heading outlines. Then use the web-scraper skill to map all existing posts by topic and build an internal linking graph that the agent can turn into concrete insert-link-here suggestions.

Step-by-Step Walkthrough

1. Crawl the blog and build a content inventory

Tell your AI agent:

Scrape all blog post URLs from https://ourblog.example.com/sitemap.xml. For each URL extract the title tag, meta description, h1, h2s, word count, and any existing internal links. Output as a CSV.

The agent uses web-scraper to fetch the sitemap, visit each URL, and extract on-page elements. You get a CSV like:

csv
url,title_tag,meta_description,h1,h2_count,word_count,internal_links
/blog/rate-limiter-guide,API Rate Limiting | Our Blog,,API Rate Limiting Guide,4,1820,1
/blog/caching-strategies,Caching Strategies for 2025 | Our Blog,Learn about caching,Caching Strategies,6,2340,0
/blog/monitoring-microservices,Monitoring Guide,,How to Monitor Microservices,3,950,2

2. Run an SEO audit on every post

Run an SEO audit on each blog post in the CSV. Flag posts with missing meta descriptions, title tags over 60 characters, missing h1, thin content under 1000 words, and no internal links. Rank posts by number of issues, worst first.

The agent uses seo-audit to evaluate each page:

SEO Audit Results — 72 posts analyzed

Critical (3+ issues):
  /blog/monitoring-microservices — missing meta description, thin content (950 words), title too generic
  /blog/rate-limiter-guide — missing meta description, only 1 internal link, no alt text on images

Warning (1-2 issues):
  /blog/caching-strategies — no internal links
  ... 18 more posts

Passing:
  ... 49 posts with minor or no issues

3. Generate optimized metadata for flagged posts

For each critical and warning post, write an SEO-optimized title tag (under 60 chars), a meta description (under 155 chars), and suggest a better h1 if needed. Output as a markdown table.

The content-writer skill generates metadata tuned to search intent:

URLNew Title TagNew Meta DescriptionNew H1
/blog/monitoring-microservicesMonitor Microservices: A Practical GuideLearn how to set up monitoring for microservices with Prometheus, Grafana, and distributed tracing. Step-by-step.How to Monitor Microservices in Production
/blog/rate-limiter-guideAPI Rate Limiting: Patterns and ImplementationProtect your API from abuse with token bucket, sliding window, and fixed window rate limiting patterns.API Rate Limiting Patterns You Can Implement Today

4. Build an internal linking map

Group all 72 blog posts by topic cluster. For each post, suggest 2-3 internal links to related posts that are currently missing. Show the anchor text and target URL for each suggestion.

The agent cross-references post content and outputs:

Topic Cluster: API Design (8 posts)
  /blog/rate-limiter-guide
    → Add link: "caching strategies" → /blog/caching-strategies (paragraph 3)
    → Add link: "monitoring your API" → /blog/monitoring-microservices (conclusion)

  /blog/caching-strategies
    → Add link: "rate limiting" → /blog/rate-limiter-guide (intro)
    → Add link: "CDN configuration" → /blog/cdn-setup-guide (section 2)

5. Apply fixes and verify

Generate a patch file for each blog post that adds the new meta description and inserts the suggested internal links. Show me a before/after diff for the top 5 worst posts.

The agent produces ready-to-apply diffs that the team can review and merge in one batch. Each diff shows the exact line where a link should be inserted and the metadata tag being replaced, so reviewers can approve changes without re-reading every article.

Real-World Example

Dani is the content lead at a 20-person SaaS startup. Their blog has 72 published posts but only 12 rank on Google's first page. Dani asks the agent to audit all posts, and within minutes has a ranked list of issues. The agent rewrites metadata for the 23 worst posts and suggests 48 internal links that were completely missing. Dani reviews the changes in a single PR, merges them, and within six weeks sees a 35% increase in organic impressions from Google Search Console. The monthly re-audit now takes the agent two minutes instead of Dani's full day.