/brand-rep:schedule-social-postfrom brand-rep
Drafts, attaches images to, and schedules X posts through the bopen.ai social scheduler. Handles auth, thread/carousel rules, and private review confirmation.
Ships in brand-rep. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
bopen.ai has a social scheduler for X. An agent authenticates once with the
auth.md service-auth flow, uploads images, and creates a planned post. The
user opens the private review page, sees the post exactly as X will render it,
and confirms. Publishing runs on the site's cron. The agent never posts to X
itself, never holds the user's X credentials, and never confirms on the user's
behalf.
Read references/bopen-social-api.md for exact endpoint contracts and
references/x-carousel.md before attaching more than one image.
draft and planned. scheduled, publishing,
published, error, and cancelled are set only from the website session.
A bearer token that tries to confirm receives 403 Confirm from the website session.login, tell the user the host
(https://bopen.ai), the exact scopes (social:draft, optionally
profile:read), that a new agent registration links to their bOpen account,
and that they can revoke it at https://bopen.ai/agent/access. Wait for a
yes. Never ask for a password and never enter the user code yourself.Capture the claim, the audience, whether it is one post or a thread, whether
images or a carousel are wanted, and when it should land. If timing is open,
plan for next-free, which takes the account's next configured slot.
Run Skill(core:humanize) on every draft and again on the final. Rules that
survive contact with X:
x_weighted_length), so count before you send.Images are optional. When the post wants visuals, brief Lisa
(gemskills:content) with exact pixel sizes and file names. Constraints the
API enforces:
media_dimensions error otherwise). This is also what makes the split
carousel work.For a carousel, follow references/x-carousel.md: one master scene cut into
two equal portrait tiles or three 1024×2048 slices, uploaded left to right.
SCRIPT="${CLAUDE_PLUGIN_ROOT}/skills/schedule-social-post/scripts/bopen-social.sh"
"$SCRIPT" login [email protected] "social:draft"
The script discovers the endpoints, starts service auth, prints the
verification URL and user code for the user, polls until they approve, and
stores the access token and identity assertion under ~/.core/bopen/ with
mode 600. Access tokens last one hour; "$SCRIPT" refresh mints a new one from
the 24-hour assertion without another ceremony. Set BOPEN_ACCESS_TOKEN to
bypass the file.
"$SCRIPT" accounts # pick an account id, check publishHealth
"$SCRIPT" upload ./01-left.png # -> {"media":{"id":...,"w":1024,"h":2048}}
"$SCRIPT" next-slot <accountId> # optional: see when next-free lands
cat > post.json <<'JSON'
{
"accountId": "<accountId>",
"status": "planned",
"planAt": "next-free",
"tz": "America/Detroit",
"items": [
{ "text": "First item.", "media": [{ "id": "<mediaId>" }] },
{ "text": "Second item." }
]
}
JSON
"$SCRIPT" create post.json # sends an Idempotency-Key automatically
planAt accepts next-free or an ISO instant with an offset or Z. Naive
local datetimes are rejected (naive_datetime). tz is an IANA zone and
defaults to America/Detroit. A 409 with occupyingId means the slot is
taken; pick another instant or use next-free.
An account whose publishHealth is reconnect_required will fail to publish;
tell the user to reconnect X on bopen.ai before you plan against it.
"$SCRIPT" review-url <postId> # https://bopen.ai/social/review/<token>
"$SCRIPT" open <postId> # same, opened in the local browser when one exists
The review page renders the thread as X will show it: avatar, handle, connector line, media grid, embedded quotes, and the Post preview dialog. Portrait images with matching dimensions render as a side-by-side pair or a swipe carousel, the same way X presents them. Give the user the URL in every harness; in a harness with a browser tool, open it for them. The URL is unguessable and private to the token; treat it like a secret.
Tell the user the post is planned for <time> on @<handle> and that
confirming happens on the review page. If they ask for changes, update the
post while it is still draft or planned; once they confirm it is
scheduled and the site owns it. Run Skill(core:confess) before you finish.
| Response | Meaning | Do |
|---|---|---|
401 with WWW-Authenticate: Bearer … scope="social:draft" | No or expired token | refresh, then login |
403 Agents cannot set scheduled… | Status above the ceiling | Use draft or planned |
400 x_weighted_length | Item too long | Cut, re-count |
400 media_dimensions | Mixed image sizes on one item | Re-export at one size |
409 That slot is taken. | Instant already booked | New instant or next-free |
scripts/bopen-social.sh subcommands: login, refresh, whoami,
accounts, next-slot, upload, create, get, update, delete,
review-url, open. Every command prints the raw JSON response so the agent
can read ids and errors directly. BOPEN_SITE overrides the host for a
preview deployment.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
brand-rep@b-open-io is listed by b-open-io/claude-plugins — review the source before installing
npx claudepluginhub b-open-io/claude-plugins --plugin brand-repOther plugins' skills for the same job