How I used the X API and Claude Code to build a signal-driven content plan

Instead of guessing what to write about, I pulled real-time signals from X and used Claude Code to turn them into a 10-day content plan.

(Updated ) · Page Sands

I needed a content plan for this site. Not a generic editorial calendar. Something grounded in what people are actually talking about right now.

So I connected the X API to Claude Code and used it to pull real-time signals about AI agents, Claude Code, B2B SaaS, and go-to-market. Then I used those signals to shape a 10-day content plan.

The whole thing took about 20 minutes.

The setup

X offers a pay-as-you-go API. No monthly subscription. You buy credits and only get charged for what you use. I grabbed a bearer token from the X Developer Portal and handed it to Claude Code.

From there, Claude Code called the X search endpoint directly using curl. No custom scripts, no middleware, no SDK. Just API calls from the terminal.

I ran three searches:

  1. “claude code” + GTM/marketing terms to find people using Claude Code for go-to-market work
  2. “AI agents” + “B2B SaaS”/GTM to find broader conversation about agents in B2B
  3. “claude code” + agents/automation/workflow to catch Claude Code power users sharing what they’re building

Each search filtered out retweets and pulled back tweet text, engagement metrics, and author info.

What the signals showed

Signal analysis from X API showing five themes: multi-agent GTM systems, Claude Code for GTM workflows, legacy software disruption, the trust gap, and small teams with massive output

Five clear themes emerged from the data:

GTM teams are deploying multi-agent systems. Not hypothetically. One founder shared that they deployed 14 AI agents running their entire GTM: lead research, personalized outreach, pipeline auditing, and LinkedIn content. A SaaStr post noted an AI agent that booked a $100k deal on its first day.

Claude Code is being used for full GTM workflows. One practitioner ran a complete prospect enrichment pipeline in Claude Code: finding emails, pulling LinkedIn profiles, enriching company data. No code written. A YC company launched an MCP server that turns Claude Code into what they called “a lean, mean GTM machine.”

The trust gap is the real bottleneck. SaaStr asked “Can AI GTM agents manage other AI agents?” The answer: not yet. You still need a human who understands GTM managing the agents. Someone else framed it as “trust-market fit,” which is a useful concept. The tools are ahead of most teams’ comfort level.

Small teams with agents are outperforming big teams without them. Multiple posts pointed to the same pattern: founders scaling 10x faster with a third of the team. Vercel’s GTM team is using AI agents across inbound, outbound, qualification, and intent-based plays.

Legacy software is getting disrupted. IBM dropped 13% partly on fears that Claude Code and AI agents make consultancy and legacy software models obsolete. The “platform services” moat that big companies rely on is compressing.

From signals to content plan

With these themes in hand, I asked Claude Code to build a 10-day content plan mapped to the site’s three content pillars: Vision, Use Cases, and Readiness.

Claude Code had already read the brand positioning docs, so it knew the audience (B2B SaaS GTM professionals) and the angle (practitioner-first, real experience). It mapped each signal to a post topic.

A few examples of how signals became posts:

  • The prospect enrichment thread became a use case post on competitive intel workflows
  • The “trust-market fit” discussion became a readiness post on introducing AI agents to skeptical teams
  • The multi-agent GTM setups became a vision post on what lean teams can cover with agents

The full plan covers 10 posts across all three pillars, each grounded in something people are actually discussing right now.

Why this matters

Most content plans start with brainstorming. You sit in a room (or a doc) and guess what your audience cares about. Sometimes you guess right. Often you don’t.

This approach starts with signal. What are practitioners actually posting about? What’s getting engagement? What questions are people asking? Then you build your plan around that.

The X API gives you the raw data. Claude Code does the analysis and structuring. Together, they compress what used to be a week of content strategy work into a single session.

Turning it into a repeatable system

The manual version worked. But I knew I’d want to pull fresh signals regularly, not just once. So I turned the workflow into something I can run anytime with a single command.

Here’s what the system looks like:

A shell script (scripts/pull-x-signals.sh) that handles the X API calls. It runs the same three searches, parses the JSON, and appends a timestamped block of signals to a markdown file (drafts/x-signals.md). Each sync is dated so you can see how the conversation evolves over time. It also deduplicates against previous pulls, so you only see new signals.

A Claude Code custom command (/project:sync-signals) that ties it all together. When I run it, Claude Code executes the script, reads the new signals, compares them against the current content plan, and suggests updates. New topics to add, existing ones to reprioritize, angles to adjust based on how people are actually talking about these subjects.

The whole thing runs in under a minute. No dashboard to check, no tool to log into. Just type the command and get a fresh read on what’s happening.

What I like about this setup is that the content plan stays alive. It’s not a static doc that gets stale after a week. Every time I sync, the plan gets pressure-tested against what practitioners are actually posting about. Topics that felt important during the first pull might get displaced by something more urgent. New themes emerge that I wouldn’t have spotted on my own.

It also creates a useful archive. The signal file grows over time, so I can look back and see how conversations shifted. That context is valuable when deciding what to write next.

The takeaway

If you’re building a content strategy for a B2B audience, the signals are out there. The X API is cheap (pay-as-you-go, no subscription) and Claude Code can call it directly from the terminal. No tools to set up, no dashboards to learn.

Start with the manual version if you want to get a feel for it. Pull signals, find themes, build a plan. Then systematize it. A shell script and a Claude Code command turn a 20-minute manual process into something you can run anytime in under a minute.

Pull the signals. Let Claude Code find the patterns. Keep your plan grounded in what’s real.