Skills mastodon-publisher
Publish content to Mastodon. Use when you need to post a Mastodon status.
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/behrangsa/tootbot" ~/.claude/skills/openclaw-skills-mastodon-publisher && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/behrangsa/tootbot" ~/.openclaw/skills/openclaw-skills-mastodon-publisher && rm -rf "$T"
manifest:
skills/behrangsa/tootbot/SKILL.mdsource content
Mastodon Publisher
Publish content to Mastodon. Use when you need to share updates, posts, or media.
Usage
Post one or more statuses to Mastodon
Post a new status to Mastodon with Bun:
bun {baseDir}/scripts/tootbot.js '{"status": "Hello, Mastodon!"}' '{"status": "Goodby, Mastodon!"}'
JSON fields
| Name | Description | Type | Example | Required | Default |
|---|---|---|---|---|---|
| The text content of the status | string | "Hello, World" | yes^1 | N/A |
| Sets the visibility of the posted status | or or or | "private" | no | "public" |
| ISO 639-1 language code for this status | ISO-639-1 Language Code | "en" | no | |
| Datetime at which to schedule a status | RFC3339 date time | "2029-02-03T15:30:45.000Z" | no | |
| Sets who is allowed to quote the status | or or | "nobody" | no | "public |
| Media to be attached to the status | array of objects | | no^2 |
- ^1
can be ommitted when one orstatus
parameters are present--media-path - ^2 one or
objects must be present ifmedia
is ommittedstatus - ^2
is optionalmedia.description
Environment Variables
| Name | Description | Example |
|---|---|---|
| Your Mastodon instance URL | |
| Your Mastodon access token | |
Examples
-
Post a new status
bun {baseDir}/scripts/tootbot.js '{"status": "Hello, Mastodon"}'Read the output and summarize it for the user.
-
Post a scheduled status
bun {baseDir}/scripts/tootbot.js '{"status": "Hello, future!", "scheduledAt" : "2030-02-05T13:21:34.000Z"}'Read the output and summarize it for the user.
-
Post a scheduled status with visibility, language, quote approval policy, and a single media attachment
bun {baseDir}/scripts/tootbot.js <<EOF { "status" : "Dorood", "visibility" : "public", "language" : "fa", "scheduledAt" : "2029-02-03T15:30:45.123456789+03:30", "quoteApprovalPolicy" : "followers", "media" : [ { "file" : "/path/to/media.png", "description" : "Nowrooz Pirooz" } ] } EOFRead the output and summarize it for the user.
-
Post a new status with media multiple attachments
bun {baseDir}/scripts/tootbot.js <<EOF { "status" : "Edsger W Dijkstra", "visibility" : "public", "language" : "fa", "scheduledAt" : "2029-02-03T15:30:45.123456789+03:30", "quoteApprovalPolicy" : "followers", "media" : [ { "file" : "/path/to/dijkstra.png", "description" : "Portrait" }, { "file" : "/path/to/signature.png", "description" : "Signature" } ] } EOF -
Post a new status with media attachments and no status text
bun {baseDir}/scripts/tootbot.js <<EOF { "media" : [ { "file" : "/path/to/flower-1.png", "description" : "White Rose" }, { "file" : "/path/to/flower-2.png", "description" : "Red Rose" } ] } EOF
Notes
- Requires
to be installed and available in the PATH.bun