How To Use Claude Code To Turn Articles Into Social Posts

How to use Claude Code to turn articles into social posts, with a rules file, a skill, a check script and a headless loop, plus what a 15-post test caught.

RankControl9 min read
How To Use Claude Code To Turn Articles Into Social Posts

I gave Claude Code one sentence and five of our articles. The sentence was "turn this article into a LinkedIn post, an X post and a Reddit post". All five X posts came back over 280 characters, one at 448. All five Reddit posts named RankControl or linked to it, so they read as ads.

That isn't a flaw in Claude Code. Left alone, it wrote what I asked for and nothing more. This guide covers the setup that fixed it, a rules file, a skill, a check script and a headless loop, and what the check step did and didn't do.

Can Claude Code do social media posts?

It can draft them. It can't schedule them. Google's AI Overview for "claude code social media" on November 6, 2026 said posting runs through MCP servers, skills and publishing tools instead of native posting. So the shape is simple. Claude Code writes drafts into files, you read them, and a scheduler sends the ones worth sending.

Connecting Claude Code to outside tools is covered in our guide to running SEO from Claude Code and Cursor, and the strategy side is in our post on social media from your blog posts.

What does a plain prompt get wrong?

I ran Claude Code 2.1.318 headless on five of our posts, a guide, a listicle, an analysis, an opinion piece and a how-to. Each got one run with the one-sentence prompt, then one run with the setup below. That's 15 posts per version, on one day and one machine, so treat it as a demonstration and not a benchmark.

CheckPlain promptWith rules
X post over 280 characters5 of 50 of 5
LinkedIn post with 3 or more hashtags5 of 50 of 5
Link in the Reddit post5 of 50 of 5
Stock AI phrase2 of 5 LinkedIn posts0
Number not in the article1 of 150 of 15
Posts failing at least one check15 of 150 of 15

The hashtag and link rows are house rules the plain prompt never heard, so they show defaults, not mistakes. The one number flag was "863k" for "863,000", a format change and not an invented figure. X length is the miss you won't see by eye. Two plain posts were under 50 characters over, which looks fine until you count.

The Reddit posts told the bigger story. The plain ones ran 311 to 498 words with bold headings, and four of five carried a disclosure line. Two said "I work on RankControl", a line no article contains. With rules they dropped to 114 to 212 words with no bold and no link.

RANKCONTROL

200+ SaaS teams already track their AI citations.

They know exactly when ChatGPT mentions their brand, and when it stops. Do you?

Show me the plan →One plan · everything included

What goes in the folder and CLAUDE.md?

One folder holds the lot.

social/
  CLAUDE.md
  check.py
  articles/
  out/
  .claude/skills/social/SKILL.md

Mine ran about 20 lines, and this is the core of it.

## Facts
- Use only numbers and claims that appear in the article.
- Copy numbers as the article writes them.

## Platforms
- LinkedIn: 600 to 1,300 characters, at most 2 hashtags.
- X: hard max 280 characters. A URL counts as 23. No hashtags.
- Reddit: no link, no hashtags, no sign-off.

Claude Code's docs say it treats CLAUDE.md "as context, not enforced configuration", and they suggest instructions that are "concrete enough to verify". They also say to keep each file under 200 lines.

Not everyone is sold. An r/ClaudeCode poster ran a popular CLAUDE.md on four tasks, three runs each, and saw behavior change on two, and a commenter called most rules placebo. That fits what I saw. A limit like 280 is a fact the model can't guess, and a vibe like "sound natural" isn't.

X's counting page sets the 280 and the 23 for links, and LinkedIn's post API docs give 3,000 characters. Threads text posts stop at 500, per Meta's developer docs. Our AI content repurposing guide has the limits for all eight platforms.

Claude Code docs page on writing effective instructions: CLAUDE.md is context, not enforced configuration, and instructions should be concrete enough to verify

What does the /social skill do?

A file at .claude/skills/social/SKILL.md gives you a /social command, since the docs say custom commands and skills now work the same way.

---
name: social
argument-hint: [article-file] [article-url]
allowed-tools: Read Write Bash(python3 check.py *)
---
Turn the article at $0 into three drafts. The URL is $1.
1. Read $0.
2. Write LinkedIn, X and Reddit drafts to out/.
3. Run `python3 check.py out/<file>.md $0 $1`.
4. Fix only what failed. Stop after three fixes.

Inside a headless run, writing /social articles/post.md https://example.com/post in the prompt expands the skill before Claude starts. The docs confirm it, and so did my runs.

What should the check script test?

Plain Python, no dependencies, about 100 lines. It exits 0 when every check passes and 1 when any fails.

CheckRule
X length280, with a URL as 23 and an emoji as 2
LinkedIn length3,000
HashtagsA cap per platform
NumbersEvery number in a draft must appear in the article
Stock phrasesA short list, such as "unlock" and "let that sink in"
RedditNo link

The number check is a string match against the article. One commenter in r/PromptEngineering made the same point about claims. Check against the raw source with a literal match, because a summary is one more thing the model generated.

It has limits. The check passes any digit string found anywhere in the article, so a stray 7 gets through. It also ignores spelled-out numbers. Run on the five plain drafts afterward, it flagged all 15 posts at once.

How do you run it over a whole folder?

A shell loop covers every article in the folder.

for f in articles/*.md; do
  claude -p "/social $f https://example.com/blog/$(basename "$f" .md)" \
    --allowedTools "Read,Write,Bash(python3 check.py *)" \
    --permission-prompts none --output-format json --max-budget-usd 0.90
done

The JSON output includes the cost. Plain runs cost $0.08 to $0.09 each in my test, and the ruled runs $0.12 to $0.13 for three posts. At those prices, ten articles come to about $1.25.

Claude Code docs page Run Claude Code programmatically showing the claude -p command for non-interactive mode

Two gotchas come from the headless docs. The --bare flag skips CLAUDE.md, skills, hooks and your subscription login, so a bare loop needs an API key and the voice file passed with --append-system-prompt-file. Without --bare, claude -p runs a folder's hooks even in a folder you've never trusted, so don't aim it at a repo you didn't write.

RANKCONTROL

How often does ChatGPT mention your brand?

Most founders have no idea. The answer might surprise you.

Show me my mentions →100 tracked questions · 7 AI models

What did the check step catch, and what did it miss?

The surprise was the check step, which ran in one of five ruled runs. In the other four, the model tried to write its file with a shell command, my permission rule didn't cover it, the call was denied, and it switched to the Write tool and stopped. It never ran the script. Its last message said so plainly, which I'll give it credit for.

So a skill step is a request, not a gate. The docs describe the enforced route, a Stop hook that exits with code 2 to send Claude back to work. The same page adds two guards, a flag that tells your script when Claude is already continuing and a cap of eight continuations in a row. I haven't tested any of it, and it's the next thing I'd try.

Scored offline afterward, the first drafts passed every check in all five ruled runs anyway. That's less impressive than it sounds, because I wrote the rules and the checker from one list. It shows concrete rules get followed. It doesn't show the checker catches much.

The X post from one guide, with rules, came to 240 characters. The plain version was 343 as a bulleted list.

One AI answer tells you very little. In a SparkToro study, the odds of getting the same list of brands twice were under 1 in 100. Track a fixed set of 25 to 50 questions weekly and read the rates, not single answers. https://rctrl.com/blog/ai-citation-tracking-guide

Who reads the drafts before anything posts?

You do. LinkedIn announced a "Seems like AI slop" button on July 30, and The Verge reported on August 21 that over a million people had clicked it. LinkedIn says users see 40% fewer views on what it classifies as AI slop.

A marketer in r/b2bmarketing listed the stock lines that give AI-written posts away, and the word "quietly" made the list.

r/b2bmarketing· u/knightmetric· Oct 27, 2026

Congrats on your super advanced Claude code skills that write all your content...

...but please don't make me wade through your AI slop with easy tells like: • "Let that sink in."• "XYZ 𝘲𝘶𝘪𝘦𝘵𝘭𝘺 did Y"• "Here's why that matters."• "Here's the part no one's talking about"• "It's not just X — it's Y." (𝘵𝘩𝘦 𝘤𝘰𝘯�...

↑ 34 upvotes37 comments
Via Reddit

Keep every draft in review. One commenter in r/marketingagency suggested starting each client on review, moving to automatic only after weeks without edits, and reading a post back once it's live, since an agent can report a post as sent that never appeared.

Do it yourself or hand it off?

You can build all of this yourself, and you'd own the rules. RankControl takes a different route. We write and publish each article, then turn it into ready-to-post drafts for LinkedIn, X, Pinterest, Instagram, Facebook, Threads, YouTube and TikTok. We never post on our own. You edit the drafts and send the ones worth sending to your scheduler.

From Claude Code you can connect our MCP server with claude mcp add --transport http rankcontrol https://api.rctrl.com/mcp and ask for drafts of a published article. Actions with a public face are a dry run until you confirm. Repurposing starts from articles published in your workspace, so for a folder of outside articles the setup above is the route. We offer one flat plan at $400 a month with a 7-day free trial.

RANKCONTROL

15 hours a week manually. Or 15 minutes with RankControl.

Track citations, monitor competitors, and fix content gaps across every AI search engine. Automatically.

Frequently Asked Questions

Not on its own. It's a terminal tool that writes files, so you read the drafts first and then push them through a scheduler or an MCP server.

It's 280 characters, and a link counts as 23 whatever its length. Count with a script, because a post that looks short often isn't.

Only if you want a clean run with none of the folder's settings. Then it skips your CLAUDE.md and your subscription login, so you pass the voice file in and use an API key.

LinkedIn says people see 40% fewer views on posts it classifies as AI slop, according to The Verge. Edit every draft until it sounds like you.

Yes, point the skill at any markdown file in your folder. RankControl's own repurposing starts from an article published in your workspace.

RANKCONTROL

Stop losing leads to competitors in AI search

Content that ranks on Google and gets cited by AI search engines. Published on your domain. Citations tracked weekly.

Related Articles

LinkedIn Content Calendar: Turn Each Article Into A Month Of Posts

Nov 20, 2026 · 10 min read

LinkedIn Content Calendar: Turn Each Article Into A Month Of Posts

A LinkedIn content calendar that turns one published article into seven posts over four weeks, with the 2026 data behind each format and where users push back.

How To Scale Content From 4 To 30 Articles A Month Without Losing Quality

Nov 14, 2026 · 9 min read

How To Scale Content From 4 To 30 Articles A Month Without Losing Quality

What breaks first as a content team goes from 4 to 10, 20 and 30 articles a month, and how to fix each bottleneck in order: ideas, briefs, editing, fact-checking, approvals and publishing. Includes Orbit Media's 2026 time-per-post data and what five SaaS blogs' sitemaps show about real publishing cadence.

Reddit Lead Generation: Find The Threads Where Buyers Ask For Help

Nov 14, 2026 · 8 min read

Reddit Lead Generation: Find The Threads Where Buyers Ask For Help

How to use Reddit for lead generation without spamming: the phrases buyers use when they ask for help, how to search for them, how to tell a real buyer question from a discussion or a promo post, how to reply so it turns into a lead, and how to measure it. Includes our count of 21 search results across three buyer phrases.

How to Publish AI-Optimized Content to Wix

Nov 1, 2026 · 9 min read

How to Publish AI-Optimized Content to Wix

What Wix already handles for AI search, the settings to check before you publish, how to get articles into your Wix Blog, and the Wix quirks that quietly cost you citations.

How to Switch from Byword to RankControl Without Losing Data

Oct 30, 2026 · 10 min read

How to Switch from Byword to RankControl Without Losing Data

Moving from Byword to RankControl: how to use your rolled-over credits first, export articles as HTML or Markdown, check the links in pages Byword published, and where your templates, keywords and brand voice land.

How to Publish to Webflow From Claude With MCP

Oct 30, 2026 · 9 min read

How to Publish to Webflow From Claude With MCP

Two ways to publish Webflow CMS posts from Claude: Webflow's own MCP connector and RankControl's MCP server. Setup steps, what each writes, and when to use both.

AI Search Visibility for In-House Marketers: Where to Start

Oct 9, 2026 · 9 min read

AI Search Visibility for In-House Marketers: Where to Start

You have a full plate and a boss forwarding LinkedIn posts. How to fold AI search visibility into the job you already have: first week, first month, no new headcount.

How To Turn Product Features Into Articles Buyers Search For

Sep 27, 2026 · 9 min read

How To Turn Product Features Into Articles Buyers Search For

The translation chain from feature to job to problem language to query, five article shapes per feature, and how to write them so search engines and AI answers pick you.

How To Schedule Reddit Posts And Still Earn Real Engagement

Nov 26, 2026 · 8 min read

How To Schedule Reddit Posts And Still Earn Real Engagement

How to schedule Reddit posts with Reddit's own tools or a third-party scheduler, and why the hour after a post goes up still decides how it does.

THE SIGNAL

Insights on AI and Google search strategy. No fluff.

Get the latest on AI citations, Google rankings, and content strategy.

No spam. Unsubscribe anytime.