mastodon

Post statuses, media, polls, and threads to Mastodon via the REST API.

10|2|Updated May 6, 2026
One-click install
npx skills add https://github.com/jcrabapple/hermes-skills --skill mastodon-jcrabapple
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mastodon
Source: https://github.com/jcrabapple/hermes-skills/tree/main/mastodon
Command: npx skills add https://github.com/jcrabapple/hermes-skills --skill mastodon-jcrabapple

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Posting to Mastodon programmatically requires handling OAuth tokens, multipart media uploads, URL-aware character counting, and thread chaining, which is error-prone when done with ad-hoc curl commands. ## Core Features & Use Cases - Full Posting API Coverage: Create text statuses, upload up to 4 media attachments with alt text, build polls, schedule posts, control visibility, add content warnings, and chain replies into threads. - Helper Script with Dry-Run: The mastodon_post.py CLI handles character normalization (URLs count as 23 chars), multipart uploads, and a preview mode before anything goes live. - OAuth Re-Authorization: A dedicated script re-registers the OAuth app to change the "via" client label, with documented scope requirements to avoid breaking admin tooling. - Use Case: Ask the agent to research a topic and post a summary to Mastodon; it drafts a plain-text post with hashtags and a source link, dry-runs it to verify the character count, posts it, and returns the live URL. ## Quick Start Post this message to my Mastodon account with two hashtags and confirm the live URL.

Frequently Asked Questions about mastodon

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I post to Mastodon from the command line?▼

Run the mastodon_post.py helper with --status followed by your text. It reads the bearer token from ~/.hermes/secrets/mastodon_token, posts to the instance API, and prints the live URL and status ID on success.

How to post images with alt text on Mastodon API?▼

Upload the image first to the /api/v1/media endpoint with a description field, then reference the returned media ID in media_ids[] when creating the status. The helper script combines both steps via --media and --alt flags.

Does Mastodon count URLs toward the character limit?▼

Mastodon counts every URL as exactly 23 characters regardless of actual length. The skill normalizes URLs to 23-character placeholders before counting, so long links do not inflate the total against the 1989-character limit.

Why do multiline Mastodon posts fail with curl?▼

Shell escaping breaks on newlines, emoji, dollar signs, and nested quotes in curl -F arguments. Use the Python helper script or a requests-based script instead of inline curl for anything beyond a single-line post.

Can I schedule Mastodon posts in advance?▼

Yes, pass scheduled_at as a UTC ISO 8601 datetime at least 5 minutes in the future when creating the status. The response contains scheduled_at instead of a URL, and the post appears only at the scheduled time.

Why did Mastodon admin scripts break after re-authorizing?▼

The re-authorization script registers an app with only read, write, follow, and push scopes, overwriting the shared token. Admin cron jobs need admin:read and admin:write scopes, so re-authorize with the full scope set documented in the references.