{
  "manifest": {
    "id": "social-marketing",
    "name": "Social Media & Marketing",
    "description": "Social media publishing, cross-posting, marketing campaign management, email operations, and X/Twitter API integration patterns",
    "version": "1.0.0",
    "author": "Adiuvo",
    "tags": [
      "social",
      "marketing",
      "email",
      "publishing",
      "campaigns"
    ],
    "icon": "",
    "created_at": "2026-06-11T01:40:46Z",
    "updated_at": "2026-06-11T01:40:46Z",
    "category": "",
    "pack_type": "operator",
    "required_mcp_servers": [],
    "optional_mcp_servers": [],
    "on_install": null,
    "procedure_count": 0,
    "context_file_count": 5,
    "always_loaded": false
  },
  "index": "# Social Media & Marketing\n\nSocial media and marketing operations patterns covering publishing, campaigns, and email automation.\n\n## What's Included\n\n- **Social Publisher** -- Social media publishing automation, scheduling, and multi-platform posting\n- **Crosspost** -- Cross-platform content distribution, format adaptation, and syndication patterns\n- **Marketing Campaign** -- Campaign planning, execution, tracking, and optimization workflows\n- **Email Ops** -- Email automation, template management, delivery optimization, and analytics\n- **X API** -- Twitter/X API integration, posting, engagement, and analytics patterns\n\n## When to Use\n\nActivate this pack when:\n- Automating social media publishing\n- Building cross-platform content distribution\n- Planning and executing marketing campaigns\n- Setting up email marketing automation\n- Integrating with the X/Twitter API\n",
  "procedures": [],
  "commands": [],
  "context_files": [
    {
      "filename": "crosspost.md",
      "content": "---\nname: crosspost\ndescription: Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.\norigin: ECC\n---\n\n# Crosspost\n\nDistribute content across platforms without turning it into the same fake post in four costumes.\n\n## When to Activate\n\n- the user wants to publish the same underlying idea across multiple platforms\n- a launch, update, release, or essay needs platform-specific versions\n- the user says \"crosspost\", \"post this everywhere\", or \"adapt this for X and LinkedIn\"\n\n## Core Rules\n\n1. Do not publish identical copy across platforms.\n2. Preserve the author's voice across platforms.\n3. Adapt for constraints, not stereotypes.\n4. One post should still be about one thing.\n5. Do not invent a CTA, question, or moral if the source did not earn one.\n\n## Workflow\n\n### Step 1: Start with the Primary Version\n\nPick the strongest source version first:\n- the original X post\n- the original article\n- the launch note\n- the thread\n- the memo or changelog\n\nUse `content-engine` first if the source still needs voice shaping.\n\n### Step 2: Capture the Voice Fingerprint\n\nRun `brand-voice` first if the source voice is not already captured in the current session.\n\nReuse the resulting `VOICE PROFILE` directly.\nDo not build a second ad hoc voice checklist here unless the user explicitly wants a fresh override for this campaign.\n\n### Step 3: Adapt by Platform Constraint\n\n### X\n\n- keep it compressed\n- lead with the sharpest claim or artifact\n- use a thread only when a single post would collapse the argument\n- avoid hashtags and generic filler\n\n### LinkedIn\n\n- add only the context needed for people outside the niche\n- do not turn it into a fake founder-reflection post\n- do not add a closing question just because it is LinkedIn\n- do not force a polished \"professional tone\" if the author is naturally sharper\n\n### Threads\n\n- keep it readable and direct\n- do not write fake hyper-casual creator copy\n- do not paste the LinkedIn version and shorten it\n\n### Bluesky\n\n- keep it concise\n- preserve the author's cadence\n- do not rely on hashtags or feed-gaming language\n\n## Posting Order\n\nDefault:\n1. post the strongest native version first\n2. adapt for the secondary platforms\n3. stagger timing only if the user wants sequencing help\n\nDo not add cross-platform references unless useful. Most of the time, the post should stand on its own.\n\n## Banned Patterns\n\nDelete and rewrite any of these:\n- \"Excited to share\"\n- \"Here's what I learned\"\n- \"What do you think?\"\n- \"link in bio\" unless that is literally true\n- generic \"professional takeaway\" paragraphs that were not in the source\n\n## Output Format\n\nReturn:\n- the primary platform version\n- adapted variants for each requested platform\n- a short note on what changed and why\n- any publishing constraint the user still needs to resolve\n\n## Quality Gate\n\nBefore delivering:\n- each version reads like the same author under different constraints\n- no platform version feels padded or sanitized\n- no copy is duplicated verbatim across platforms\n- any extra context added for LinkedIn or newsletter use is actually necessary\n\n## Related Skills\n\n- `brand-voice` for reusable source-derived voice capture\n- `content-engine` for voice capture and source shaping\n- `x-api` for X publishing workflows\n"
    },
    {
      "filename": "email-ops.md",
      "content": "---\nname: email-ops\ndescription: Evidence-first mailbox triage, drafting, send verification, and sent-mail-safe follow-up workflow for ECC. Use when the user wants to organize email, draft or send through the real mail surface, or prove what landed in Sent.\norigin: ECC\n---\n\n# Email Ops\n\nUse this when the real task is mailbox work: triage, drafting, replying, sending, or proving a message landed in Sent.\n\nThis is not a generic writing skill. It is an operator workflow around the actual mail surface.\n\n## Skill Stack\n\nPull these ECC-native skills into the workflow when relevant:\n\n- `brand-voice` before drafting anything user-facing\n- `investor-outreach` for investor, partner, or sponsor-facing mail\n- `customer-billing-ops` when the thread is a billing/support incident rather than generic correspondence\n- `knowledge-ops` when the message or thread should be captured into durable context afterward\n- `research-ops` when a reply depends on fresh external facts\n\n## When to Use\n\n- user asks to triage inbox or archive low-signal mail\n- user wants a draft, reply, or new outbound email\n- user wants to know whether a mail was already sent\n- the user wants proof of which account, thread, or Sent entry was used\n\n## Guardrails\n\n- draft first unless the user clearly asked for a live send\n- never claim a message was sent without a real Sent-folder or client-side confirmation\n- do not switch sender accounts casually; choose the account that matches the project and recipient\n- do not delete uncertain business mail during cleanup\n- if the task is really DM or iMessage work, hand off to `messages-ops`\n\n## Workflow\n\n### 1. Resolve the exact surface\n\nBefore acting, settle:\n\n- which mailbox account\n- which thread or recipient\n- whether the task is triage, draft, reply, or send\n- whether the user wants draft-only or live send\n\n### 2. Read the thread before composing\n\nIf replying:\n\n- read the existing thread\n- identify the last outbound touch\n- identify any commitments, deadlines, or unanswered questions\n\nIf creating a new outbound:\n\n- identify warmth level\n- select the correct channel and sender account\n- pull `brand-voice` before drafting\n\n### 3. Draft, then verify\n\nFor draft-only work:\n\n- produce the final copy\n- state sender, recipient, subject, and purpose\n\nFor live-send work:\n\n- verify the exact final body first\n- send through the chosen mail surface\n- confirm the message landed in Sent or the equivalent sent-copy store\n\n### 4. Report exact state\n\nUse exact status words:\n\n- drafted\n- approval-pending\n- sent\n- blocked\n- awaiting verification\n\nIf the send surface is blocked, preserve the draft and report the exact blocker instead of improvising a second transport without saying so.\n\n## Output Format\n\n```text\nMAIL SURFACE\n- account\n- thread / recipient\n- requested action\n\nDRAFT\n- subject\n- body\n\nSTATUS\n- drafted / sent / blocked\n- proof of Sent when applicable\n\nNEXT STEP\n- send\n- follow up\n- archive / move\n```\n\n## Pitfalls\n\n- do not claim send success without a sent-copy check\n- do not ignore the thread history and write a contextless reply\n- do not mix mailbox work with DM or text-message workflows\n- do not expose secrets, auth details, or unnecessary message metadata\n\n## Verification\n\n- the response names the account and thread or recipient\n- any send claim includes Sent proof or an explicit client-side confirmation\n- the final state is one of drafted / sent / blocked / awaiting verification\n"
    },
    {
      "filename": "marketing-campaign.md",
      "content": "---\nname: marketing-campaign\ndescription: End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches.\norigin: ECC\n---\n\n# Marketing Campaign\n\nPlan and execute launch campaigns that convert — not just campaigns that ship.\n\n## When to Activate\n\n- planning a product or feature launch\n- building a full content suite from a single product brief\n- defining positioning and campaign angle before writing any copy\n- orchestrating multiple content types across channels\n- reviewing copy for conversion quality and brand consistency\n\n## Non-Negotiables\n\n1. Define positioning before writing any copy. All copy flows from the angle.\n2. Research the audience before assuming you know their language or fears.\n3. Each deliverable must serve one clear purpose in the campaign arc.\n4. Specificity beats adjectives in every format and on every channel.\n5. The same voice must run across every channel and every piece.\n6. No copy ships without passing the quality gate.\n\n## Campaign Workflow\n\n### Phase 1: Research\n\nUse `market-research` to:\n- profile the target audience (jobs-to-be-done, fears, language, alternatives they use)\n- map 3+ direct or adjacent competitors (positioning, gaps, messaging weaknesses)\n- identify 1–3 audience insights the campaign angle will exploit\n\nDeliverable: a short research brief (audience profile + competitive summary + key insights).\n\n### Phase 2: Positioning\n\nProduce:\n- core benefit statement (one sentence, no feature list, no jargon)\n- positioning formula: \"[Product] helps [audience] [achieve outcome] by [mechanism]\"\n- campaign angle: the specific tension, insight, or moment the whole campaign lives in\n- tone profile: lock before writing (delegate to `brand-voice` for durable, session-reusable voice capture)\n\nDo not write any copy until positioning and angle are approved.\n\n### Phase 3: Content Production\n\nProduce in this order — each layer informs the next:\n\n1. **Landing page copy** (all sections: hero, problem, solution, features, how it works, proof, CTA)\n2. **Email sequence** (each email has one purpose; follow the arc: problem → education → agitation → solution → proof → urgency → final CTA)\n3. **Social posts** (platform-native via `content-engine`; LinkedIn and X are different formats, not the same copy resized)\n4. **Short-form video scripts** (timestamp-blocked; written for screen and ear, not the page)\n5. **Ad copy variants** (3–4 variants testing different angles or audience segments)\n6. **Content calendar** (day-by-day schedule with channel, type, timing, and dependencies)\n\n### Phase 4: Review\n\nGate every deliverable:\n- 5-second test on all hero / above-fold copy (clear who it's for, what it does, why act now)\n- CTA audit (one per piece, specific, earned — not demanded)\n- Tone consistency check across all channels\n- Claim audit (every claim is specific and supportable)\n- Cross-channel consistency (ad claims match landing page; email body matches subject)\n\n## Output Contract\n\nA full campaign delivers:\n\n1. **Positioning brief** — angle, core benefit statement, tone profile\n2. **Landing page copy** — hero, problem, solution, features, how it works, proof, CTA\n3. **Email sequence** — subject + preview + body + CTA for each email, labelled by day and purpose\n4. **LinkedIn posts** — 3+ platform-native posts with distinct angles\n5. **X posts** — 5+ standalone posts + 1 thread\n6. **Short-form video scripts** — 2+ timestamp-blocked scripts with visual direction notes\n7. **Ad copy variants** — short headline / long headline / body per variant\n8. **Content calendar** — day-by-day schedule with channel, content type, timing, and dependencies\n9. **Copy review summary** — flagged issues and open questions before anything goes live\n\n## Quality Gate\n\nBefore delivering any piece:\n\n- every deliverable sounds like the same author\n- no hollow superlatives or filler adjectives remain\n- every CTA is specific and earned (never \"learn more\" or \"click here\")\n- no copy is duplicated verbatim across platforms\n- hero copy passes the 5-second test\n- email subjects match email body (no bait-and-switch)\n- ad claims match landing page claims exactly\n- no copy would work unchanged for any other product in the category\n\n## Hard Bans\n\nDelete and rewrite any:\n\n- \"game-changing\", \"revolutionary\", \"world-class\", \"cutting-edge\"\n- \"In today's competitive landscape\"\n- fake urgency not backed by a real deadline\n- hollow social proof without specifics (\"thousands trust us\")\n- generic CTAs (\"learn more\", \"find out more\", \"click here\")\n- copy that could be unplugged and dropped into a competitor's campaign unchanged\n\n## Related Skills\n\n- `brand-voice` — source-derived voice capture (run before content production)\n- `content-engine` — platform-native content production\n- `crosspost` — multi-platform distribution\n- `market-research` — audience and competitive intelligence\n- `seo` — on-page optimisation for landing page copy\n"
    },
    {
      "filename": "social-publisher.md",
      "content": "---\nname: social-publisher\ndescription: Agent-driven scheduling and publishing of social media posts across 13 platforms via SocialClaw. Use when the user wants to publish to X, LinkedIn, Instagram, Facebook Pages, TikTok, Discord, Telegram, YouTube, Reddit, WordPress, or Pinterest — or when managing campaigns, uploading media, or monitoring post delivery status.\norigin: community\n---\n\n# Social Publisher (SocialClaw)\n\nConnects Claude Code to [SocialClaw](https://getsocialclaw.com) for agent-driven social media publishing across 13 platforms through a single workspace API key.\n\n## When to Activate\n\n- publish content to X, LinkedIn, Instagram, TikTok, or other platforms\n- schedule a post campaign across multiple platforms at once\n- upload media for use in social posts\n- validate a post schedule before going live\n- monitor publishing run status and delivery analytics\n\n## Setup\n\n```bash\n# Required: workspace API key from https://getsocialclaw.com/dashboard\nexport SC_API_KEY=\"<workspace-key>\"\n\n# Verify access\ncurl -sS -H \"Authorization: Bearer $SC_API_KEY\" https://getsocialclaw.com/v1/keys/validate\n\n# Install CLI (optional but recommended)\nnpm install -g socialclaw@0.1.12\nsocialclaw login --api-key <workspace-key>\n```\n\n## Core Workflow\n\n### 1. List connected accounts\n```bash\nsocialclaw accounts list --json\n```\n\nIf not connected:\n```bash\nsocialclaw accounts connect --provider x --open\nsocialclaw accounts connect --provider linkedin --open\n```\n\n### 2. Upload media (optional)\n```bash\nsocialclaw assets upload --file ./image.png --json\n# → { \"asset_id\": \"...\" }\n```\n\n### 3. Build schedule.json\n```json\n{\n  \"posts\": [\n    {\n      \"provider\": \"x\",\n      \"account_id\": \"<account-id>\",\n      \"text\": \"Post text here\",\n      \"scheduled_at\": \"2026-06-01T10:00:00Z\"\n    }\n  ]\n}\n```\n\n### 4. Validate before publishing\n```bash\nsocialclaw validate -f schedule.json --json\n```\n\n### 5. Publish\n```bash\nsocialclaw apply -f schedule.json --json\n# → { \"run_id\": \"...\" }\n```\n\n### 6. Monitor\n```bash\nsocialclaw status --run-id <run-id> --json\nsocialclaw posts list --json\n```\n\n## Supported Providers\n\n| Provider | Key |\n|----------|-----|\n| X (Twitter) | `x` |\n| LinkedIn profile | `linkedin` |\n| LinkedIn page | `linkedin_page` |\n| Instagram Business | `instagram_business` |\n| Instagram standalone | `instagram` |\n| Facebook Page | `facebook` |\n| TikTok | `tiktok` |\n| YouTube | `youtube` |\n| Reddit | `reddit` |\n| WordPress | `wordpress` |\n| Discord | `discord` |\n| Telegram | `telegram` |\n| Pinterest | `pinterest` |\n\n## Security\n\n- Outbound requests go to `getsocialclaw.com` only\n- Provider OAuth is in the SocialClaw dashboard — no per-provider secrets exposed to the agent\n- `SC_API_KEY` is a workspace-scoped key\n\n## Related Skills\n\n- `x-api` — direct X/Twitter API operations\n- `social-graph-ranker` — network analysis for outreach targeting\n\n## Source\n\n- npm: `npm install -g socialclaw@0.1.12`\n- Dashboard: [SocialClaw dashboard](https://getsocialclaw.com/dashboard)\n"
    },
    {
      "filename": "x-api.md",
      "content": "---\nname: x-api\ndescription: X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.\norigin: ECC\n---\n\n# X API\n\n> **Drift-prone skill.** X API endpoints, access tiers, quotas, and write\n> permissions change frequently. Verify current developer docs and account\n> access before quoting rate limits or implementing a posting/search flow.\n\nProgrammatic interaction with X (Twitter) for posting, reading, searching, and analytics.\n\n## When to Activate\n\n- User wants to post tweets or threads programmatically\n- Reading timeline, mentions, or user data from X\n- Searching X for content, trends, or conversations\n- Building X integrations or bots\n- Analytics and engagement tracking\n- User says \"post to X\", \"tweet\", \"X API\", or \"Twitter API\"\n\n## Authentication\n\n### OAuth 2.0 Bearer Token (App-Only)\n\nBest for: read-heavy operations, search, public data.\n\n```bash\n# Environment setup\nexport X_BEARER_TOKEN=\"your-bearer-token\"\n```\n\n```python\nimport os\nimport requests\n\nbearer = os.environ[\"X_BEARER_TOKEN\"]\nheaders = {\"Authorization\": f\"Bearer {bearer}\"}\n\n# Search recent tweets\nresp = requests.get(\n    \"https://api.x.com/2/tweets/search/recent\",\n    headers=headers,\n    params={\"query\": \"claude code\", \"max_results\": 10}\n)\ntweets = resp.json()\n```\n\n### OAuth 1.0a (User Context)\n\nRequired for: posting tweets, managing account, DMs, and any write flow.\n\n```bash\n# Environment setup — source before use\nexport X_CONSUMER_KEY=\"your-consumer-key\"\nexport X_CONSUMER_SECRET=\"your-consumer-secret\"\nexport X_ACCESS_TOKEN=\"your-access-token\"\nexport X_ACCESS_TOKEN_SECRET=\"your-access-token-secret\"\n```\n\nLegacy aliases such as `X_API_KEY`, `X_API_SECRET`, and `X_ACCESS_SECRET` may exist in older setups. Prefer the `X_CONSUMER_*` and `X_ACCESS_TOKEN_SECRET` names when documenting or wiring new flows.\n\n```python\nimport os\nfrom requests_oauthlib import OAuth1Session\n\noauth = OAuth1Session(\n    os.environ[\"X_CONSUMER_KEY\"],\n    client_secret=os.environ[\"X_CONSUMER_SECRET\"],\n    resource_owner_key=os.environ[\"X_ACCESS_TOKEN\"],\n    resource_owner_secret=os.environ[\"X_ACCESS_TOKEN_SECRET\"],\n)\n```\n\n## Core Operations\n\n### Post a Tweet\n\n```python\nresp = oauth.post(\n    \"https://api.x.com/2/tweets\",\n    json={\"text\": \"Hello from Claude Code\"}\n)\nresp.raise_for_status()\ntweet_id = resp.json()[\"data\"][\"id\"]\n```\n\n### Post a Thread\n\n```python\ndef post_thread(oauth, tweets: list[str]) -> list[str]:\n    ids = []\n    reply_to = None\n    for text in tweets:\n        payload = {\"text\": text}\n        if reply_to:\n            payload[\"reply\"] = {\"in_reply_to_tweet_id\": reply_to}\n        resp = oauth.post(\"https://api.x.com/2/tweets\", json=payload)\n        tweet_id = resp.json()[\"data\"][\"id\"]\n        ids.append(tweet_id)\n        reply_to = tweet_id\n    return ids\n```\n\n### Read User Timeline\n\n```python\nresp = requests.get(\n    f\"https://api.x.com/2/users/{user_id}/tweets\",\n    headers=headers,\n    params={\n        \"max_results\": 10,\n        \"tweet.fields\": \"created_at,public_metrics\",\n    }\n)\n```\n\n### Search Tweets\n\n```python\nresp = requests.get(\n    \"https://api.x.com/2/tweets/search/recent\",\n    headers=headers,\n    params={\n        \"query\": \"from:affaanmustafa -is:retweet\",\n        \"max_results\": 10,\n        \"tweet.fields\": \"public_metrics,created_at\",\n    }\n)\n```\n\n### Pull Recent Original Posts for Voice Modeling\n\n```python\nresp = requests.get(\n    \"https://api.x.com/2/tweets/search/recent\",\n    headers=headers,\n    params={\n        \"query\": \"from:affaanmustafa -is:retweet -is:reply\",\n        \"max_results\": 25,\n        \"tweet.fields\": \"created_at,public_metrics\",\n    }\n)\nvoice_samples = resp.json()\n```\n\n### Get User by Username\n\n```python\nresp = requests.get(\n    \"https://api.x.com/2/users/by/username/affaanmustafa\",\n    headers=headers,\n    params={\"user.fields\": \"public_metrics,description,created_at\"}\n)\n```\n\n### Upload Media and Post\n\n```python\n# Media upload uses v1.1 endpoint\n\n# Step 1: Upload media\nmedia_resp = oauth.post(\n    \"https://upload.twitter.com/1.1/media/upload.json\",\n    files={\"media\": open(\"image.png\", \"rb\")}\n)\nmedia_id = media_resp.json()[\"media_id_string\"]\n\n# Step 2: Post with media\nresp = oauth.post(\n    \"https://api.x.com/2/tweets\",\n    json={\"text\": \"Check this out\", \"media\": {\"media_ids\": [media_id]}}\n)\n```\n\n## Rate Limits\n\nX API rate limits vary by endpoint, auth method, and account tier, and they change over time. Always:\n- Check the current X developer docs before hardcoding assumptions\n- Read `x-rate-limit-remaining` and `x-rate-limit-reset` headers at runtime\n- Back off automatically instead of relying on static tables in code\n\n```python\nimport time\n\nremaining = int(resp.headers.get(\"x-rate-limit-remaining\", 0))\nif remaining < 5:\n    reset = int(resp.headers.get(\"x-rate-limit-reset\", 0))\n    wait = max(0, reset - int(time.time()))\n    print(f\"Rate limit approaching. Resets in {wait}s\")\n```\n\n## Error Handling\n\n```python\nresp = oauth.post(\"https://api.x.com/2/tweets\", json={\"text\": content})\nif resp.status_code == 201:\n    return resp.json()[\"data\"][\"id\"]\nelif resp.status_code == 429:\n    reset = int(resp.headers[\"x-rate-limit-reset\"])\n    raise Exception(f\"Rate limited. Resets at {reset}\")\nelif resp.status_code == 403:\n    raise Exception(f\"Forbidden: {resp.json().get('detail', 'check permissions')}\")\nelse:\n    raise Exception(f\"X API error {resp.status_code}: {resp.text}\")\n```\n\n## Security\n\n- **Never hardcode tokens.** Use environment variables or `.env` files.\n- **Never commit `.env` files.** Add to `.gitignore`.\n- **Rotate tokens** if exposed. Regenerate at developer.x.com.\n- **Use read-only tokens** when write access is not needed.\n- **Store OAuth secrets securely** — not in source code or logs.\n\n## Integration with Content Engine\n\nUse `brand-voice` plus `content-engine` to generate platform-native content, then post via X API:\n1. Pull recent original posts when voice matching matters\n2. Build or reuse a `VOICE PROFILE`\n3. Generate content with `content-engine` in X-native format\n4. Validate length and thread structure\n5. Return the draft for approval unless the user explicitly asked to post now\n6. Post via X API only after approval\n7. Track engagement via public_metrics\n\n## Related Skills\n\n- `brand-voice` — Build a reusable voice profile from real X and site/source material\n- `content-engine` — Generate platform-native content for X\n- `crosspost` — Distribute content across X, LinkedIn, and other platforms\n- `connections-optimizer` — Reorganize the X graph before drafting network-driven outreach\n"
    }
  ]
}