Prompt
Read notes/2026-09-community-call.md and write one Threads post recapping our community call for people who missed it. Three highlights, one line each, and say the recording is on our YouTube channel. Under 450 characters. How to do it
- Mint a Threads agent key In https://app.socialhandoff.com, open Connections, connect your Threads account, then create an agent key scoped to Threads with draft permission only. Copy the key when it is shown; only its hash is stored.
- Edit settings.json In ~/.gemini/settings.json, add an mcpServers entry with httpUrl set to https://app.socialhandoff.com/mcp and a headers object carrying the Threads key as a bearer token.
- Check the connection Start gemini and run /mcp. The server should be listed as connected with its tools.
- Draft from the terminal Ask Gemini CLI to read the release notes or git log and draft a Threads post. It calls draft_post and the post appears in your approval inbox.
Example draft
Missed our September community call? Three highlights: The plugin API is stable as of this month, so what you build now will keep working. Offline mode is in testing, and we are looking for volunteers. Next call moves to a time that works better for Asia and Australia. The full recording is up on our YouTube channel.
Gotchas
- A draft too long for one post can go out as a reply-chain thread, with each part published as a reply to the one before. Every part has its own 500-character limit, and a carousel of 2 to 20 images or videos can lead the chain.
- Threads allows 250 posts per account in any 24 hours. The quota is checked before each publish, so a post that would go over it is stopped before it is sent rather than failing at the network.
- Threads fetches images and video from your instance at signed, expiring URLs, so you do not need a separate public media host. The API itself must be reachable over public HTTPS; an instance that only runs on localhost cannot publish media to Threads.
- Gemini CLI reads settings.json at startup. If /mcp shows the server as disconnected, check the httpUrl and that the bearer header uses the Threads key.
- Character limit: 500 characters per post. Emoji count as their UTF-8 bytes, so an emoji can use up to 4 characters of the limit.
- Links: Up to 5 links per post. Threads generates a preview for the first one.
- Carousels: 2 to 20 images or videos in one carousel post.
- Image files: JPEG or PNG, up to 8 MB. Threads fetches each file from a URL at publish time.
Frequently asked questions
Can Gemini CLI run this non-interactively?
Yes. Pass a prompt to gemini in non-interactive mode from a script. The result is still only a draft, so an unattended run cannot publish.
Can Gemini CLI attach a screenshot to a Threads post?
Yes. Upload the image and SocialHandoff serves it to Threads at a signed, expiring URL, with alt text if you add it. The instance must be reachable over public HTTPS so Threads can fetch the file.
Can I post videos to Threads?
Yes. Threads takes a single video, or mixes videos and images in a carousel of 2 to 20 items. SocialHandoff serves the file at a signed URL, so the only requirement is that your API is reachable over public HTTPS.