Blog

How to Build a Content Trend-Finder in Claude Code

June 13, 202612 min readAutoAdy TeamGuide

Build a Claude Code plugin you feed a niche, and it pulls what's actually winning across Reddit, YouTube, TikTok, and Instagram Reels, then hands back a content brief: the hooks to borrow, the exact words customers use, and three things to make next. Full build. The last section shows where AutoAdy does the on-your-own-data version.

Most brands guess at content. The answer to "what should we make?" is already public, ranked by engagement, sitting on Reddit, YouTube, TikTok, and Instagram. Almost nobody reads it systematically. This guide builds a Claude Code plugin that does, in about an hour, and you build the whole thing by chatting with Claude Code. The example plugin is called signal-radar; rename it freely.


The trick that makes it good Let code do the fetching, let Claude do the thinking. A small Python engine pulls and ranks the data, which is cheap and deterministic. Claude reads that ranked data and extracts the creative gold, which is the part models are genuinely great at. Don't make Python reason, and don't make Claude scrape.


The five-step engine

Strip the whole thing down and it's five steps:

  1. Resolve a fuzzy keyword into real targets: subreddits, hashtags, creators.
  2. Fan out across Reddit, YouTube, TikTok, and Instagram Reels.
  3. Rank everything by real engagement.
  4. Mine the winners for hooks, pains, desires, and exact customer language.
  5. Brief it into a clean dashboard that tells you what to make.

What you need

  • Claude Code (desktop or CLI).
  • A scraper API token with a free tier that covers testing. This runs the YouTube, TikTok, and Instagram fetchers.
  • A web-scrape API key (optional) for blog context and a Reddit fallback.
  • About an hour.

Reddit needs no key at all: it has a free public JSON API.


Step 1: Scaffold the skill

A skill is a folder with a SKILL.md (instructions for Claude) and a scripts/ folder (your engine):

signal-radar/
├── .claude-plugin/
│   └── plugin.json
└── skills/
    └── signal-radar/
        ├── SKILL.md
        └── scripts/
            ├── run.py        # orchestrator
            ├── sources.py    # the 4 platform fetchers
            ├── analyze.py    # ranking + output
            └── render.py     # HTML dashboard

The SKILL.md frontmatter is the trigger:

---
name: signal-radar
description: Mines the hooks, angles, and exact customer language getting engagement across Reddit, YouTube, TikTok, and Instagram Reels, then writes a content brief telling you what to make next. Use when the user wants content ideas, hooks, ad angles, or research for a niche or product.
---

Step 2: Wire the four data sources

This is where most people get it wrong, so here's exactly what works. Normalize every result into one shape regardless of platform: platform, text (title or caption), author, url, date, and a single engagement number. That shared shape is what lets you rank a TikTok against a Reddit thread later.

Reddit is free. Hit the public JSON endpoint, no key:

https://www.reddit.com/r/{subreddit}/search.json?q={query}&sort=top&t=month&restrict_sr=1

Read ups (upvotes) plus num_comments as engagement. If your IP gets rate-limited, fall back to a site:reddit.com web-scrape search.

YouTube runs through a scraper actor (the widely-used streamers/youtube-scraper works). Pass searchKeywords plus a dateFilter of month. You get views, likes, titles, and full descriptions, and the descriptions are a goldmine of customer language.

TikTok runs through a TikTok scraper actor (clockworks/tiktok-scraper). Pass searchQueries. You get plays, likes, and captions.

Instagram is the one that bites people. Hashtag scrapers return today's low-engagement brand spam. Real reels with real view counts come from a reel scraper (apify/instagram-reel-scraper) fed creator handles, not hashtags. So resolve five to eight niche creators first, then add a caption-relevance filter so a creator's off-topic viral reel doesn't pollute the brief.

A normalized fetcher looks like this:

import requests

def fetch_reddit(subreddit, query, headers):
    url = f"https://www.reddit.com/r/{subreddit}/search.json"
    params = {"q": query, "sort": "top", "t": "month", "restrict_sr": 1, "limit": 50}
    r = requests.get(url, params=params, headers=headers, timeout=20)
    out = []
    for c in r.json().get("data", {}).get("children", []):
        d = c["data"]
        out.append({
            "platform": "reddit",
            "text": d["title"],
            "author": d["author"],
            "url": "https://reddit.com" + d["permalink"],
            "date": d["created_utc"],
            "engagement": d["ups"] + d["num_comments"],
        })
    return out

The scraper-backed fetchers follow the same run-and-poll pattern as any Ad Library scraper: POST a run, poll until it finishes, read the dataset items, map them into the shared shape.


Step 3: Rank by what's actually working

Engagement scales are wildly different. A TikTok gets millions of plays; a Reddit thread gets thousands of upvotes. Put them on a comparable curve with a log scale, and always surface each item's age so a two-year-old monster doesn't get passed off as "trending now." Rank by engagement first, recency second.

import math, time

def score(item, now=None):
    now = now or time.time()
    base = math.log10(1 + max(item["engagement"], 0))
    age_days = (now - float(item["date"])) / 86400 if item["date"] else 999
    recency = max(0, 1 - age_days / 365)  # gentle decay over a year
    return round(base * (1 + 0.25 * recency), 3)

Keep the raw engagement and the age visible in the output. The score orders the list; the human-readable numbers keep it honest.


Step 4: Mine it (this is the actual product)

Now Claude reads the ranked data as a creative strategist, not a summarizer. From the winners it extracts six things:

  • Hooks, the literal opening line, title, or caption that stopped the scroll.
  • Pain points, problems in the customer's exact words. Do not sanitize them.
  • Desires, the outcome they say they want.
  • Objections, what makes them hesitate.
  • Formats, the content structures that are winning.
  • Voice-of-customer phrases, copy-paste lines for your ads and emails.

The rule that keeps it honest, written into the SKILL.md as a hard constraint: never fabricate. Every hook, quote, and number comes from the data. When the same pain shows up on two platforms, flag it. That's a validated angle, not a one-off.

This is the step that justifies the whole build, so write the mining instructions richly. Tell Claude to quote real lines verbatim, to attribute each to its platform and engagement number, and to separate "said by many" from "said once, loudly."


Step 5: Render a shareable dashboard

Text in a chat is forgettable. Have Claude write the mined brief to a small JSON file, then a render.py turns it into a self-contained HTML dashboard with inline CSS and no dependencies: platform-colored hook cards, pain quotes, a phrase bank, and "make this next" cards. It opens in any browser and screenshots clean for a client or a team channel.


Step 6: Package it as a plugin

Add a .claude-plugin/plugin.json manifest, reference every script with ${CLAUDE_PLUGIN_ROOT} so paths resolve after install, run claude plugin validate, and zip it. Now you install it once and just chat:

find content angles for cold plunge tubs
what should I make about magnesium for sleep?
research the glass-skin niche for content angles

Claude resolves the communities, runs the engine (two to three minutes), mines the data, and hands you the dashboard.


The four lessons that save you hours

  1. Instagram hashtag scrapers are junk for this. Use the reel scraper fed creator handles. Resolve five to eight niche creators first, then add a caption-relevance filter.
  2. Use ${CLAUDE_PLUGIN_ROOT} for every script path. Once installed, the working directory is the user's project, not your plugin folder, so relative paths break. Claude Code swaps in the real path automatically.
  3. Reddit is free. Don't pay to scrape it. The public JSON API works. Keep a web-scrape fallback only for when your IP gets throttled.
  4. Fetch with code, mine with Claude. The engine should never try to "understand" content. It pulls and ranks. All the creative judgment lives in the SKILL.md instructions Claude follows.

The on-your-own-data version: where AutoAdy fits

The build above mines the open web, which is the right move for discovering brand-new angles in a niche. But two parts of this loop have a higher-signal version when you point them at your own customers and your own account, and that's where AutoAdy comes in:

  • Voice-of-customer mining has a first-party twin. Instead of inferring language from strangers' posts, AutoAdy's review miner pulls the exact words out of your own reviews and testimonials, which is the highest-converting copy source you have. Use the trend-finder for net-new angles and the review miner for proven ones.
  • Turning angles into ads. A content brief is the input, not the finish line. Once you've got the hooks and the customer language, AutoAdy's hook generator, ad copy generator, and creative brief tools turn them into on-brand ad variations, and the content repurposer stretches one winner across formats.

The honest line: AutoAdy does not scrape TikTok or mine subreddits, and it shouldn't pretend to. The cross-platform discovery is the DIY build's job. AutoAdy takes over the moment you have angles and want them turned into ads that carry your brand voice.

Build the trend-finder for discovery. Hand what it finds to AutoAdy to produce.