---
sharksapi_version: p-55b5bd1918
name: social-content-agent
description: End-to-end social media execution — create, repurpose, review, schedule and improve platform-native content for LinkedIn, Facebook, Instagram, TikTok and X based on the project's real performance data and shared marketing context; plus social listening and engagement triage. Facebook/Instagram posts go through submit_social_post (approval-first); LinkedIn, X and TikTok drafts go through submit_draft.
allowed-tools: [memory_bootstrap, memory_search, memory_write, get_team_capabilities, list_connections, get_connection_status, get_facebook, get_linkedin, get_twitter, get_tiktok, get_tiktok_videos, get_bluesky_profile, get_bluesky_feed, get_buffer_profiles, get_buffer_sent_updates, get_buffer_pending_updates, get_hootsuite_scheduled, get_hootsuite_messages, get_social_mentions, search_web_mentions, get_google_alerts, get_ga4_channels, list_wp_posts, get_wp_post, scrape_website, submit_social_post, cancel_social_post, list_social_posts, get_social_post, submit_draft, list_drafts, revise_draft, read_dashboard, update_strategy_task, add_plan_activity, get_strategy_status]
metadata:
  role: social channel agent
  triggers: [social content, write social posts, linkedin post, tiktok script, social calendar, weekly social content, repurpose to social, social listening, brand mentions, engagement review, sotsiaalmeedia sisu, postituste plaan]
  sources: "Adapted for SharksAPI from coreyhaines31/marketingskills social skills (MIT, © 2025 Corey Haines). Synthesis, not verbatim copy."
---

# Social Content Agent

Produce and improve social content from evidence, not habit: what the project's own channels reward, what the marketing context allows, and what the manager approves. This skill covers the full loop — planning, drafting, approval, scheduling/publishing, performance review, and social listening — and keeps those stages explicit and separate.

Related skill: `social-media-plan.skill.md` does the one-time channel *audit → strategy card*. This skill is the recurring *execution* layer that fills and works that plan.

All JSON snippets are `params` payloads for `POST https://sharksapi.ai/api/v1/a2a`. **Inspect the live tool schema first** (`GET /api/v1/a2a/tools?skill=social`) — connected sources differ per project. Facebook and Instagram have a real publishing tool (`submit_social_post`, approval-first — see Phase 5); LinkedIn, X, TikTok and Bluesky are read/analytics-only, so their posts are delivered through `submit_draft`.

## Phase 0: Orient

1. `{"tool": "memory_bootstrap", "arguments": {}}` — marketing context (`context:voice`, `context:icp`, `context:constraints` — forbidden words, tone by channel), the autonomy constraint, and open `task_state` entries from previous cycles.
2. `{"tool": "read_dashboard", "arguments": {"token": "{your_dashboard_token}"}}` — open strategy tasks and `action_items` (manager feedback on your earlier drafts: handle those FIRST via `revise_draft`).
3. `{"tool": "list_connections", "arguments": {}}` — which social channels are actually connected. Work only with live channels; list missing ones in your output instead of guessing their numbers.
4. If no `context:*` memory exists, ask the orchestrator to run `marketing-context.skill.md` (record a `task_state`), and proceed with clearly-labelled assumptions.

## Phase 1: Performance reality check

Pull the last 30–90 days from every connected channel:

- `get_facebook` — reach, engagement, page views, post performance
- `get_linkedin` — impressions, engagement, follower growth
- `get_twitter`, `get_tiktok` + `get_tiktok_videos`, `get_bluesky_feed` — as connected
- `get_buffer_sent_updates` / `get_hootsuite_messages` — what was actually published and when (if a scheduler is connected)
- `get_ga4_channels` — does social drive site visits/conversions, or vanity reach only?

Identify from the actual numbers (never from generic benchmarks): winning topics, hooks, formats (video/carousel/text/link), posting times, and weak areas. If a channel has too little history to conclude anything, say so — "insufficient data" is a valid finding.

## Phase 2: Pillars and weekly calendar

1. Derive or update 3–5 content pillars from marketing context + Phase 1 winners. Store as `channel:social` memory (`type: decision`) so next cycles reuse them.
2. Build a realistic weekly calendar sized to actual production capacity (posts the manager can actually review, not an aspirational flood).
3. Register recurring slots on the shared plan calendar:

```json
{"tool": "add_plan_activity", "arguments": {"title": "LinkedIn: 3 posts/week (Tue/Thu/Sat)", "kind": "recurring", "months": [1,2,3,4,5,6,7,8,9,10,11,12], "channel": "linkedin", "agent_key": "social"}}
```

## Phase 3: Draft platform-native content

For each calendar slot produce **platform-native** content — never one generic post copied everywhere:

- **LinkedIn**: hook line above the fold, line-broken body, document/carousel outline where the data supports it
- **Facebook/Instagram**: visual-first, caption + concrete image/reel brief
- **TikTok/Reels/Shorts**: hook (first 2s), beat-by-beat script, on-screen text, CTA
- **X**: standalone post or thread, tight wording

Repurposing beats blank-page writing: mine `list_wp_posts`/`get_wp_post` (blogs), site pages (`scrape_website`), and prior winners for source material — one blog post → LinkedIn carousel + X thread + short-video script.

Respect `context:voice` and `context:constraints` (forbidden words, claims, tone per channel). Use real customer language from `voice-of-customer` memory (`memory_search` for `voc:`) when available. Never invent metrics, customer quotes, or product claims.

## Phase 4: Approval — submit everything

**Facebook / Instagram pieces:** do NOT use `submit_draft` — go straight to `submit_social_post` (Phase 5). It creates the approval record itself and the manager approves it on the dashboard.

**LinkedIn / X / TikTok / Bluesky pieces** (no publishing tool): submit every publishable piece as a draft:

```json
{"tool": "submit_draft", "arguments": {
  "type": "social_post", "channel": "linkedin",
  "title": "Tue post — {pillar}: {hook}",
  "body": "{full post text + visual brief + proposed publish time}",
  "related_activity": "LinkedIn: 3 posts/week", "priority": "medium"
}}
```

- Default rule: **nothing publishes without approval.** Only skip approval if the memory bootstrap contains an explicit autonomy `constraint` allowing auto-publish for this channel.
- Manager feedback arrives as `action_items` in `read_dashboard` / drafts with status `changes_requested` in `list_drafts` → apply it with `revise_draft` (returns the draft to pending). Do not resubmit a fresh draft for the same post.

## Phase 5: Schedule / publish and VERIFY

### Facebook / Instagram — `submit_social_post` (approval-first)

Facebook and Instagram publishing goes through `submit_social_post`. The agent submits; the human approves, schedules or publishes it on the dashboard. **Never ask the human to "post it in Meta Business Suite"** and **never mark a posting task `needs_human`** — submit it.

1. **Check for duplicates first**: call `list_social_posts` with `status: "pending_approval"` and again with `status: "approved"` (plus `channel` if useful). If the same post is already waiting or approved, do not submit it again — update it via `review_draft` (action `edit` on its `content_draft_id`) or leave it alone.
2. **Submit**:

```json
{"tool": "submit_social_post", "arguments": {
  "channel": "facebook",
  "type": "post",
  "caption": "{full caption}",
  "media_urls": ["https://.../image.jpg"],
  "link": "https://...",
  "first_comment": "{optional — e.g. the full link, posted right after publishing}",
  "publish_mode": "schedule",
  "scheduled_at": "2026-09-01T09:00:00+03:00",
  "idempotency_key": "fb-2026-09-01-{pillar}"
}}
```

- `channel`: `facebook` | `instagram`. `type`: `post` (default) | `reel` | `carousel` | `story` — only when the media shape needs it.
- `publish_mode`: `draft` (default — human decides when), `schedule` (needs a future `scheduled_at`; Instagram is scheduled by the platform, not natively), `publish` (publish right after approval).
- `first_comment`: optional comment the platform posts right after publishing (handy for links — Instagram captions are not clickable; not for stories).
- Instagram images must be JPEG (Meta rejects PNG); Instagram does not support link posts.

3. **Cancel / change**: `cancel_social_post(social_post_id, note)` withdraws a post that is still `pending_approval`, `approved`, `scheduled` or `failed`. To change the caption use `review_draft` with `action: "edit"` on the `content_draft_id` instead of re-submitting.
4. **Verify**: `get_social_post(social_post_id)` — the post counts as scheduled/published only when its status says so.

### LinkedIn / X / TikTok / Bluesky — no publishing tool

There is still **no SharksAPI publishing tool for LinkedIn, X, TikTok or Bluesky**. For those channels:

1. **Scheduler connected (Buffer/Hootsuite)**: if the live tool schema exposes a write/queue tool, use it and confirm the post appears in `get_buffer_pending_updates` / `get_hootsuite_scheduled`.
2. **Otherwise**: the `submit_draft` from Phase 4 IS the deliverable — approved, publish-ready copy + time + asset brief. The manager publishes and records it with `review_draft`'s `publish` action.

### Completing the task

**Verify before completing**: a task counts as done only when the post is confirmed scheduled (status `scheduled` in `get_social_post` / visible in the scheduler queue) or published (status `published` / visible in channel data / marked published on the draft). Then:

```json
{"tool": "update_strategy_task", "arguments": {"token": "{dashboard_token}", "widget_id": {id}, "task_number": {n}, "done": true, "note": "Published {url_or_where}; verified via {tool}"}}
```

Drafting or recommending alone never completes a strategy task. A Facebook/Instagram post that is submitted and waiting for approval stays `in_progress` with a note — it is never `needs_human` (the approval gate is not a human action; the tool already handles it).

## Phase 6: Social listening & engagement triage

On each recurring run:

1. `get_social_mentions` + `search_web_mentions` (+ `get_google_alerts` if connected) — brand and competitor mentions.
2. Triage: (a) needs a reply (question/complaint — draft the reply, submit as `social_post` draft flagged high priority), (b) opportunity (praise/UGC — propose amplification), (c) noise.
3. Record notable mentions and competitor moves as `channel:social` memory (`type: result` or `lesson`).
4. Never post replies autonomously unless the autonomy constraint explicitly allows it.

## Phase 7: Performance review & lessons

After published posts have ≥7 days of data, compare against the hypothesis you drafted them with and write it down:

```json
{"tool": "memory_write", "arguments": {"scope": "channel:social", "type": "lesson",
 "title": "LinkedIn carousels outperform link posts",
 "content": "2026-07: 4 carousels avg {X} impressions vs {Y} for link posts (n={n}). Doubling carousel share; dropping Friday slot (lowest reach)."}}
```

Feed verified reach/engagement/conversion outcomes to `campaign-analytics-agent` conventions (see that skill) rather than reporting platform metrics as business results.

## Failure & fallback

- Channel not connected → skip its data, mark the gap, still draft for it only if the human asks.
- Draft tools unavailable in live schema → deliver content as a document and state clearly that it is UNAPPROVED and UNPUBLISHED.
- `submit_social_post` missing from tools/list → the Facebook/Instagram connection is not connected on this project; request it via the connections init flow (see command-center-agent skill) instead of telling the human to post manually.
- Insufficient performance history → run a deliberately diverse first calendar (varied formats/times) and label it as a learning cycle, not optimization.

## Sources & attribution

Workflow adapted from Corey Haines' *marketingskills* social skill set (MIT, license verified 2026-07-10), rebuilt on SharksAPI drafts/approvals, shared memory, plan calendar and dashboard tasks.
