social-publishing
Validate, schedule and publish social media posts through the SocialClaw HTTP API (X, LinkedIn, Instagram, Facebook Pages, TikTok, Discord, Telegram, YouTube, Reddit, WordPress, Pinterest), then check their status and analytics. Use when the user wants to publish, schedule, or inspect social posts from a SocialClaw workspace. Requires SC_API_KEY.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- social-publishing
- license
- MIT
- metadata
- { "source": "https://github.com/ndesv21/socialclaw", "version": "2.0.0", "homepage": "https://getsocialclaw.com" }
- description
- Validate, schedule and publish social media posts through the SocialClaw HTTP API (X, LinkedIn, Instagram, Facebook Pages, TikTok, Discord, Telegram, YouTube, Reddit, WordPress, Pinterest), then check their status and analytics. Use when the user wants to publish, schedule, or inspect social posts from a SocialClaw workspace. Requires SC_API_KEY.
- last_verified
- 1793059200000
03 SKILL.md 正文
Social Publishing
SocialClaw is a hosted publishing service: one workspace API
key, with social accounts connected inside the SocialClaw dashboard. This skill calls its
HTTP API with curl. Calls and field names follow upstream skills/socialclaw as of
2026-10 (package socialclaw 0.1.22).
Setup
- The user signs in at
https://getsocialclaw.com/dashboardand creates a workspace API key. The workspace also needs an active trial or paid plan. - They export it:
export SC_API_KEY="<workspace-key>". Never echo the key back. - Validate it:
SC=https://getsocialclaw.com/v1
auth=(-H "Authorization: Bearer $SC_API_KEY")
curl -sS "${auth[@]}" "$SC/keys/validate"
If any call returns plan_required or subscription_*, stop and send the user to
https://getsocialclaw.com/pricing. Retrying will not help.
Procedure
Each step uses the SC and auth variables from Setup.
-
List accounts and note each target's
handle(such asx:@nameorpinterest:board:123) andprovider:curl -sS "${auth[@]}" "$SC/accounts"A missing account gets connected with
POST $SC/connections/startand{"provider":"<provider>"}. The user finishes OAuth in the browser; pollGET $SC/connections/<connection-id>until it completes. Telegram (botToken,chatId) and Discord (webhookUrl) connect with those fields instead of OAuth. Never ask for provider app secrets. -
Check capabilities for each target before drafting. Media limits and settings differ per account:
curl -sS "${auth[@]}" "$SC/accounts/<account-id>/capabilities" -
Upload media once and reuse the returned delivery URL in each post:
curl -sS -X POST "${auth[@]}" -F "file=@./image.png" "$SC/assets/upload" -
Write
schedule.json, one entry per account, each with its own copy.publishAtis ISO 8601 UTC; for "post now", use 2 minutes ahead (date -u -v+2M '+%Y-%m-%dT%H:%M:%S.000Z'on macOS,date -u -d '+2 minutes' '+%Y-%m-%dT%H:%M:%S.000Z'on Linux).{ "posts": [ { "account": "x:@example", "provider": "x", "description": "We shipped dark mode. Try it at example.com", "status": "scheduled", "publishAt": "2026-11-02T14:00:00.000Z", "assets": [{ "mediaLink": "<delivery URL from upload>" }] } ] } -
Validate, and fix every error it returns before going on:
curl -sS -X POST "${auth[@]}" -H "Content-Type: application/json" \ -d @schedule.json "$SC/posts/validate" -
Confirm with the user: show each account, its copy, media and time. Applying publishes publicly.
-
Apply, and keep the returned post and run IDs:
curl -sS -X POST "${auth[@]}" -H "Content-Type: application/json" \ -d @schedule.json "$SC/posts/apply" -
Check status with
GET $SC/posts/<post-id>andGET $SC/runs/<run-id>, or list recent posts withGET "$SC/posts?limit=20". A provider status ofacceptedis not proof the post is visible; wait forpublished.
For multi-step campaigns, use a campaigns array (name, mode: "draft", targets[]
with account and steps[]) and preview it with POST $SC/campaigns/preview before
applying.
Provider rules
| Provider id | Rule |
|---|---|
x |
Up to four images or one video. |
linkedin, linkedin_page |
Profile and page are separate providers. Up to twenty images or one video. |
facebook |
Facebook Pages only, not personal profiles. |
instagram_business, instagram |
Business (linked to a Facebook Page) and standalone professional are separate. Media required. |
tiktok |
One video or one photo gallery (images only, up to 35, 1080x1920 JPEG is safest). Copy goes in description. A specific sound cannot be chosen; settings.autoAddMusic: true lets TikTok pick. |
youtube |
One video. Defaults to privacyStatus: "private"; set "public" when asked. No Shorts or community posts. |
reddit |
Needs settings.subreddit. No native media upload. |
pinterest |
Board-centric (pinterest:board:<id>). Product, collection and idea pins are beta unless the account's capabilities list them. |
telegram, discord |
One optional image or video. |
wordpress |
WordPress.com or Jetpack sites. |
When a platform does not support what the user wants, say so; do not invent a workaround.
Analytics
Pull metrics 24–48 hours after publishing. These routes come from the upstream CLI source
(src/index.mjs); window defaults to lifetime:
curl -sS "${auth[@]}" "$SC/analytics/posts/<post-id>?window=lifetime"
curl -sS "${auth[@]}" "$SC/analytics/runs/<run-id>?window=lifetime"
The optional socialclaw CLI (npm install -g socialclaw) wraps the same API, for example
socialclaw analytics post --post-id <id> --json.
04 同仓库更多 Skills
no-description
暂无简介
good-skill
Fixture skill that satisfies every rule.
broken-link
Links to a reference file that does not exist.
Bad_Name
Name violates the kebab-case rule and does not match the directory.
skill-authoring
Write, review, and validate portable agent skills in SKILL.md format. Use when creating a new skill, editing an existing one, or asked whether a skill follows the Agent Skills spec.
weigh-bags
Record scale readings for each bag — empty (tare), outbound, current, final — and reconcile them against the itemised inventory to find unaccounted weight. Use when the user gives a bag weight, says how heavy something is, weighs their luggage, or asks how close to the limit they are. Appends to bags.yaml and runs scripts/reconcile.py.