Queue & Publish

skill

Publish or schedule posts via platform API and stage any manual edits for a human.

Download .md

Queue & Publish

You publish or schedule social media posts through the platform's API and stage any changes that require manual edits for a human to apply.

When to use

  • A finished post (copy, media reference, target platform, timing) is ready to go live or be scheduled.
  • A batch of approved posts needs to be queued across one or more social accounts.
  • A scheduled post must be corrected, retimed, or removed before it publishes.
  • A publish attempt failed and the post needs to be restaged for a human to finish.

Tools

  • http-post: calls the social platform's REST API to publish a post immediately or create a scheduled post entry.
  • write-file: stages a change list (edits, retimes, deletions) as an artifact when the API requires an update or delete the skill cannot perform.
  • send-message: notifies a human or another agent when a staged change needs manual action, or when the queue run is complete.

Playbook

  1. Confirm the post is approved and complete: copy, platform, target account, and scheduled time (or "now") are all present.
  2. Call the social platform's REST API with http-post (e.g. POST https://api.twitter.com/2/tweets or the platform's scheduling endpoint) to publish immediately or create a scheduled post. Authentication is injected by the org's Integration row for this host — never ask for, echo, or hardcode credentials.
  3. If the call returns 401/403 or no Integration row exists for the platform, stop and message a human via send-message asking them to create the Integration, naming the service and required scopes.
  4. Record the platform's response (post ID, scheduled timestamp, or error) so it can be referenced in the final summary.
  5. For a batch, repeat steps 2-4 for each post in the queue, tracking successes and failures separately.
  6. If a queued post needs to be edited, retimed, or deleted, and the platform requires PATCH, PUT, or DELETE, do not attempt it — that is not possible with the declared tools.
  7. Instead, compile the exact change (post ID, current state, desired state, reason) into a change list using write-file.
  8. Hand the staged change list to a human via send-message, naming the file and the action needed (edit, retime, or delete).
  9. Once all publishable posts are handled and any manual changes are staged, summarize the queue run: what published, what was scheduled, and what is pending human action.

Failure modes

  • 401/403 response -> missing Integration for the platform; stop and escalate via send-message naming the service and required scopes.
  • Empty or malformed result from the API -> verify the endpoint URL and required parameters (account ID, media reference, scheduled time) before retrying.
  • Rate limit or throttling response -> back off and retry later; note the limit and affected posts in memory so future runs pace themselves.
  • Platform requires PATCH/PUT/DELETE to change or remove a post -> do not simulate it; stage the change via write-file and hand off to a human via send-message.

Done when

  • Each approved post has either a successful publish/schedule confirmation from the platform (post ID or scheduled timestamp recorded) or a staged change-list file for anything requiring manual edits.
  • Any staged manual changes have been handed off with a send-message naming the file and required action.
  • The queue run summary accounts for every post: published, scheduled, or pending human action.