> For the complete documentation index, see [llms.txt](https://help.blotato.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.blotato.com/blog/tutorial-ai-social-media-manager.md).

# 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](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) for the full reference.

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

```
.claude/
  skills/
    post/
      SKILL.md       <-- the skill instructions (required)
```

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](https://my.blotato.com) and connect your social accounts (Twitter, LinkedIn, Instagram, Facebook -- whichever platforms you want to post to).
2. Go to [Settings > API Keys](https://my.blotato.com/settings/api) and generate a new API key.
3. Create a `.env` file in your project root and add your key with quotation marks:

```
BLOTATO_API_KEY="your-api-key-here"
```

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:

```
create a new claude code skill called "post" in this folder

skills docs: https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview

it should be an ai social media manager that makes social media posts for linkedin, instagram, twitter, and facebook

the user specifies a topic and a single platform each time, e.g. /post "AI productivity" twitter

use Blotato API to handle extracting youtube/tiktok transcripts, creating visuals, and publishing to socials

API docs: https://help.blotato.com/api/llm

maintain a separate file with a running log of my published posts and their live URLs

ask me clarifying questions, one at a time, until you are 95% confident you can complete the task successfully
```

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:

```
/post "AI productivity tips" twitter
```

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:

```
/post "how to make $1m from $0 https://www.youtube.com/watch?v=-HbwUdqUcEs" twitter
```

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](https://www.sabrina.dev/p/best-ai-prompt-to-humanize-ai-writing) that strips out common AI-sounding patterns:

```
add samples of my brand voice and writing style to the /post skill:

# WRITING STYLE (apply to all platforms):

- Use clear, simple language.
- Use short, impactful sentences.
- Use active voice; avoid passive voice.
- Focus on practical, actionable insights.
- Use "you" and "your" to directly address the reader.
- AVOID em dashes. Use commas, periods, or ellipsis "..." instead.
- AVOID constructions like "...not just this, but also this".
- AVOID metaphors and cliches.
- AVOID generalizations.
- AVOID unnecessary adjectives and adverbs.
- AVOID hashtags, semicolons, markdown, asterisks.
- AVOID these words: "can, may, just, that, very, really, literally, actually, certainly, probably, basically, could, maybe, delve, embark, enlightening, esteemed, shed light, craft, crafting, imagine, realm, game-changer, unlock, discover, skyrocket, abyss, not alone, in a world where, revolutionize, disruptive, utilize, utilizing, dive deep, tapestry, illuminate, unveil, pivotal, intricate, elucidate, hence, furthermore, however, harness, exciting, groundbreaking, cutting-edge, remarkable, remains to be seen, glimpse into, navigating, landscape, stark, testament, in summary, in conclusion, moreover, boost, powerful, inquiries, ever-evolving"
- IMPORTANT: Review every post and ensure no em dashes!

# BRAND VOICE SAMPLES (per platform):

Twitter voice:
<PASTE TWITTER EXAMPLES>

LinkedIn voice:
<PASTE LINKEDIN EXAMPLES>

Instagram voice:
<PASTE INSTAGRAM EXAMPLES>

Facebook voice:
<PASTE FACEBOOK EXAMPLES>
```

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:

```
create a claude code hook that runs automatically before any Bash command
that contains "curl" and "backend.blotato.com/v2/posts"

the hook should check the post content for:
- em dashes (replace with "...")
- posts exceeding the platform character limit
- missing media URLs for Instagram posts
- any use of banned words from my brand voice file

if any check fails, block the command and show what needs to be fixed
```

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:

```
update the /post skill to support posting to all platforms at once:
/post "AI productivity" all

when platform is "all":
- create the visual once
- spawn a subagent for each platform (twitter, linkedin, instagram, facebook)
- each subagent adapts the post text for that platform's format, character limits, and brand voice
- all subagents publish in parallel
- log all results to posts-log.md
```

Now run:

```
/post "AI productivity" all
```

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.

```
create a new claude code skill called "plan-week"

it should:
- accept a topic as input (e.g., /plan-week "AI productivity")
- research the topic using Blotato's Create Source API
- generate a weekly content plan as a markdown table in content-plan.md
  (day, platform, post text draft, visual type)
- show me the plan and ask for approval
- after I approve, use parallel subagents to create visuals and publish each post
- each subagent handles one post independently (create visual, publish, log result)
- each subagent uses the per-platform brand voice from the /post skill
- the quality gate hook fires automatically on every post
- append all results to posts-log.md when done

API docs: https://help.blotato.com/api/llm

ask me clarifying questions, one at a time, until you are 95% confident
```

Run it:

```
/plan-week "AI productivity"
```

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

```
| Day | Platform  | Post text (draft)              | Visual type         |
|-----|-----------|--------------------------------|---------------------|
| Mon | Twitter   | 3 AI tools I use daily...      | Quote card          |
| Mon | LinkedIn  | Long-form version...           | Carousel (5 slides) |
| Tue | Instagram | Reel script: "Stop doing..."   | AI avatar video     |
| Tue | Facebook  | Expanded take with link...     | Image slideshow     |
| Wed | Twitter   | Thread on automation...        | Tweet card          |
| ...                                                                      |
```

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:

```
Published 12/14 posts. 2 failed (Instagram reel -- TikTok account not connected).
See posts-log.md for all live URLs.
```

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

```
Step 1: /post "topic" twitter          --> verify the pipeline works end-to-end
Step 2: (brand voice per platform)     --> posts match your tone
Step 3: (quality gate hook)            --> automatic checks on every post
Step 4: /post "topic" all              --> one visual, all platforms in parallel
Step 5: /plan-week "topic"             --> full week, all platforms, review gate
```

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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.blotato.com/blog/tutorial-ai-social-media-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
