For the complete documentation index, see llms.txt. This page is also available as Markdown.

Build an AI Social Media Manager with Claude Code

You have a content idea. You want it posted to Twitter, LinkedIn, Instagram, and Facebook -- each adapted for the platform, each with a visual, each matching your brand voice. And you want it done in one command.

This tutorial walks you through building that system inside Claude Code. You will create two custom skills, a quality gate hook, and a multi-platform optimization and publishing pipeline powered by AI subagents. No frontend. No web app. Everything runs on your computer.

By the end, you will type /plan-week "AI productivity" and Claude will research the topic, draft a full week of content, show you the plan, and -- after you approve -- publish everything in parallel across all your platforms.

Here is what you will build, step by step.

Step
What you do
Claude Code concept
Result

Setup

Configure permissions, modes, model, context

Workflow foundations

Clean working environment

1

Create the /post skill

Skills

Verify pipeline end-to-end

2

Add per-platform brand voice

Skill iteration

Posts match your tone on each platform

3

Create a quality gate hook

Hooks

Automatic checks before every publish

4

Add multi-platform posting

Subagents

/post "topic" all -- four platforms in parallel

5

Create the /plan-week skill

Capstone

Full week of content, planned and published


Claude Code Settings

Before we start, here is how I use Claude Code day-to-day. These are not rules, but they shape how the rest of this tutorial plays out.

Permissions

As you work through this tutorial, Claude will ask for permission to run many commands. To avoid approving the same safe commands over and over, paste this one-liner into Claude Code:

add permissions to my claude code to allow non-destructive bash commands: curl, jq, cat, ls, grep, echo, which, wc, file, pwd, mkdir, touch, chmod, git status, git diff, git log

Claude updates your .claude/settings.local.json with rules like Bash(curl *), Bash(jq *), etc. These are all read-only or low-risk commands. Claude will still prompt you for commands that run code (node, python3, npx) or modify git history (git commit) -- review those individually before approving.

Modes

Claude Code has permission modes that control how much autonomy Claude gets. I spend most of my time in Plan Mode or Ask Before Edits while Claude is planning. I go back and forth on the plan -- a lot, probably 90% of my time. I read what Claude proposes, push back, ask for changes, and only when the plan is finalized do I switch to Auto-Edit mode and let Claude execute.

For this tutorial, that means: when you run /post or /plan-week and Claude starts asking clarifying questions or showing you a content plan, you are in the planning phase. Stay in a restrictive mode. Once you approve the plan and tell Claude to go, switch to auto-edit so it moves fast through the API calls and publishing steps.

Context

When I start a new feature, bug fix, or task, I clear the conversation so the context is clean. If I have a CLAUDE.md file with extensive project instructions, I use a shortcut like /q-new that tells Claude to re-read the CLAUDE.md and digest everything fresh. This way Claude starts each session with full project context but no leftover noise from previous tasks.

You will want to do the same between tutorial steps. After you finish building the /post skill in Step 1, clear the conversation before starting Step 2. This keeps Claude focused on the current task.

Model

I use the most capable model available for almost everything. The only time I switch to Sonnet or Haiku is when I know the session involves straightforward, low-complexity work. For anything technical -- building skills, writing API integration logic, debugging -- I stick with the top model.

For this tutorial, use the most capable model for all five steps. The API orchestration, brand voice adaptation, and subagent coordination all benefit from stronger reasoning.


Step 1: Create the /post Skill

What are skills?

A skill is a custom slash command you build for Claude Code. You type /post (or whatever you name it) and Claude follows the instructions you defined. Skills persist across conversations -- you build them once, then reuse them forever. See the official Skills documentation for the full reference.

Skills live in your project as a directory with a SKILL.md file:

The SKILL.md file has YAML frontmatter at the top (name, description, argument hint) followed by the instructions Claude follows when you invoke the skill. The directory name becomes the slash command: .claude/skills/post/ becomes /post.

You do NOT need to create this file structure manually. When you tell Claude to create a skill, it builds the directory and writes SKILL.md for you. But knowing the structure helps if something goes wrong -- if /post does not appear when you type /, check that the file is at .claude/skills/post/SKILL.md (not .claude/skills/post.md as a flat file).

Set up Blotato

Before building the skill, set up your Blotato account and API key:

  1. Sign up at blotato.com and connect your social accounts (Twitter, LinkedIn, Instagram, Facebook -- whichever platforms you want to post to).

  2. Go to Settings > API Keys and generate a new API key.

  3. Create a .env file in your project root and add your key with quotation marks:

Claude will read this file when the /post skill makes API calls.

Building the skill

Start simple. The first version of /post targets a single platform so you can verify everything works: your API key, your connected accounts, the visual generation, and the publishing flow. Once this works end-to-end for one platform, you will upgrade it to post to all platforms in parallel in Step 4.

Paste this prompt into Claude Code:

Notice the last line of the prompt: "ask me clarifying questions, one at a time, until you are 95% confident you can complete the task successfully." This is one of the most useful patterns when interacting with AI. You do NOT need to have everything figured out in your initial prompt. As Claude asks questions, the gaps in your thinking and instructions become obvious. You can fill them in via dialogue rather than trying to anticipate every detail upfront.

Claude will ask about your API key, which platforms you have connected, your default visual style, how you want the log file formatted. Answer each question one at a time. Once it has enough context, it builds the skill.

Once the skill is created, close Claude Code and open a new session. Claude Code loads skills at startup, so a new skill created during a session will not appear in the / autocomplete until you restart.

When you are back, run it like this:

You can also pass a YouTube URL, Tiktok video URL, audio file URL, PDF link, or website. Blotato extracts the transcript automatically, so Claude uses the video content as source material:

Claude researches the topic (or extracts the YouTube transcript) using the Blotato Source API, generates a visual using the Blotato Visual API, writes the post text, publishes it using the Blotato Post API, and logs the result (text, platform, live URL, timestamp) to posts-log.md.

One command. One post. One platform. The goal here is to verify the full pipeline works end-to-end before scaling it up. If your API key is wrong, your accounts are not connected, or the visual generation fails, you want to catch that now -- not when you are publishing a week of content across four platforms.

This step teaches you how Claude Code skills work and how Blotato's async API pattern operates: submit a request, poll for status, use the result. In Step 4, you will upgrade this skill to post to all platforms at once.


Step 2: Add Per-Platform Brand Voice

The /post skill works, but the output sounds generic. Every platform gets the same tone. Twitter posts read like LinkedIn posts. LinkedIn posts feel too casual.

Fix this by feeding Claude samples of your voice on each platform, along with a writing style guide that keeps the output sounding human. I use a humanize prompt that strips out common AI-sounding patterns:

Paste real posts you have written. The more examples you give, the better Claude matches your voice. Five to ten per platform is a good starting point. The writing style rules at the top eliminate the patterns that make AI-generated text obvious -- em dashes, filler words, vague adjectives.

After this step, run /post "AI productivity" linkedin and compare the output to /post "AI productivity" twitter. The tone, length, and structure should differ based on your samples.

This step teaches you how to iterate on a skill. You are not replacing the skill -- you are adding context to it. Claude Code skills are not static. You refine them over time by giving Claude more information about how you work. The per-platform voice guidance you add here becomes essential in Step 4, when the skill posts to all four platforms at once and each post needs to sound right for its platform.


Step 3: Create a Quality Gate Hook

Your /post skill writes and publishes content. But what happens when a post contains an em dash you hate, exceeds the character limit, or goes to Instagram without an image? Right now, nothing catches it.

Create a hook that automatically checks every post before it goes out:

Now every time Claude tries to publish a post -- whether from /post, from /plan-week, or from any subagent -- the hook fires first. If the content fails a check, the publish command is blocked and Claude sees what needs to be fixed.

You do not need to remember to run the quality check. You do not need to add it to every skill. The hook is automatic.

This step teaches you how Claude Code hooks work. A hook is a shell command that runs in response to a specific event. In this case, it runs before any Bash command that hits the Blotato publish endpoint. Hooks give you guardrails that apply globally -- across every skill and every subagent. The quality gate you build here fires on every post in Steps 4 and 5 without any additional setup.


Step 4: Add Subagents for Multi-Platform Posting

Your /post skill works, your brand voice is dialed in, and your quality gate catches mistakes. But right now you publish to one platform at a time. The whole point of this system is to post everywhere from one command.

Upgrade the skill to create one visual and publish to all platforms in parallel:

Now run:

Claude creates one visual, then spawns four subagents. Each subagent takes the same topic and visual, adapts the post for its assigned platform using the brand voice from Step 2, and publishes. All four run at the same time. The quality gate hook from Step 3 fires on each one automatically.

Four posts published in the time it used to take for one.

This step teaches you how Claude Code subagents work. A subagent is a separate process that handles a bounded task independently. The main skill delegates work to subagents and collects results when they finish. Subagents run in parallel, which means independent tasks (like publishing to four different platforms) happen simultaneously instead of sequentially. Each subagent inherits the hooks you set up, so your quality gate applies everywhere.


Step 5: Create the /plan-week Skill

You have all the pieces: a publishing skill with brand voice, a quality gate, and parallel multi-platform posting. Now tie them together into a single command that plans and executes a full week of content.

Run it:

Claude researches the topic, then generates content-plan.md -- a markdown table with one row per post:

Claude shows you the plan and asks for approval. You review it. If a draft needs tweaking, open content-plan.md and edit it. When you are satisfied, tell Claude to go ahead.

Claude spawns a subagent for each post. Each subagent creates its visual, runs through the quality gate, publishes, and logs the result. All subagents run in parallel.

When everything finishes, Claude prints a summary:

This step ties together everything from the tutorial. The /plan-week skill uses the Blotato Source API for research (Step 1), per-platform brand voice for content adaptation (Step 2), the quality gate hook for automatic checks (Step 3), and parallel subagents for batch execution (Step 4). The review gate -- showing you the plan before executing -- is the key design choice. You stay in control of what gets published. The automation handles everything else.


What You Built

Five prompts. Two skills, one hook, and a publishing pipeline that scales from a single tweet to a full week of cross-platform content. No frontend, no web app, no dashboard. A terminal, Claude Code, and the Blotato API.

Last updated