My Agent Found 47 Content Opportunities (Gap Analyzer Build)

Build log for a Content Gap Analyzer agent that surfaced 47 content opportunities competitors missed, with the template included.

Table of Contents

The Content Gap Analyzer is a Claude Code subagent that pairs Perplexity trend research with Firecrawl competitor scraping. It audits your published content, compares it to competitors, and scores topic opportunities by demand, fit, and differentiation, running in monthly, pillar, and trend modes so you plan content from data instead of gut feeling.

What you will be able to do

  • Run monthly landscape analysis to get a coverage summary, identified gaps, trending and declining topics, and series opportunities in under two minutes.
  • Run a pillar-specific deep dive to find subtopics missing from a series and get a recommended article sequence.
  • Run a trend check on an emerging topic to decide whether to cover it now, monitor it, or ignore it.
  • Build a content strategy file that feeds the agent your pillars, voice, and positioning so gaps come back specific instead of generic.
  • Fold gap analysis output into a monthly planning routine: review top gaps, pick topics, schedule them.

Before you start

  • Claude Code CLI installed, with the foundation setup from Article 1 (folder structure, MCP servers) already in place.
  • Perplexity API key and Firecrawl API key configured as MCP servers in Claude Code.
  • A content strategy file (.claude/research-profiles/content-strategy.md) defining your pillars, brand voice, and positioning.
  • A competitor watchlist file (created in Article 4 of the series).

Reference

Mode Command Runtime Output
Monthly landscape /gap-analysis monthly About 94 seconds Coverage summary, gaps identified, trending topics, declining topics, series opportunities
Pillar/series deep dive /gap-analysis pillar "[pillar name]" About 137 seconds Current coverage, subtopics missing, series opportunity, priority actions
Trend analysis /gap-analysis trend "[topic]" About 179 seconds cover_immediately, monitor, or ignore recommendation
Agent definition .claude/agents/content-gap-analyzer.md n/a Tools: Read, Glob, Grep, Write, mcp__perplexity__search, mcp__perplexity__reason, mcp__firecrawl__firecrawl_scrape, mcp__firecrawl__firecrawl_map. Model: sonnet
Strategy input .claude/research-profiles/content-strategy.md n/a Content pillars, brand voice summary, language patterns, positioning that the agent reads before analyzing gaps

Common errors and fixes

What goes wrong The fix
Content pillars are vague, like "AI stuff" The agent returns vague gaps. Write specific pillars with a focus, content types, and 3 to 5 example topics each.
No content strategy file is set up The agent falls back to generic "trending AI topics" instead of gaps specific to your audience and competitors. Create .claude/research-profiles/content-strategy.md.
Brand voice principles are aspirational, like "we're innovative" The agent can't filter recommendations through your actual voice. Write practical principles instead, like "we use specific numbers instead of vague claims."
Foundation from Article 1 isn't complete (CLI, MCP servers, API keys) The agent can't run properly. Check claude --version, confirm Perplexity and Firecrawl keys, and verify MCP servers are configured in Claude Code settings.
Competitor watchlist file is missing Gap analysis has nothing to compare your coverage against. Create the watchlist file from Article 4 before running gap analysis.

Read the full walkthrough

The complete lesson, with screenshots and any downloads, is published on Substack as part of PubFlow OS Agents: Build Your AI Research Team.

Read Lesson 6 on Substack →

More in this section

Continue the course

Browse all lessons in the PubFlow OS Agents: Build Your AI Research Team course, or subscribe to the GenAI Unplugged newsletter to get new lessons in your inbox.

Dheeraj Sharma

Dheeraj Sharma

AI Systems Builder
Creator of the n8n Zero to Hero course (42 lessons, 31+ hours). I help solopreneurs build AI systems that grow revenue without growing workload.

Get the n8n Mastery Bundle

All workflows, cheat sheets, and premium resources from the entire course in one package.

Read the full lesson on Substack