← 返回
效率工具 Key 中文

Mastodon Scout

Read-only Mastodon skill. Outputs human-readable timeline summaries or raw JSON.
只读 Mastodon 技能,输出可读时间线摘要或原始 JSON。
patelhiren
效率工具 clawhub v2.0.1 2 版本 100000 Key: 需要
★ 5
Stars
📥 2,322
下载
💾 79
安装
2
版本
#1.0.2#latest

概述

Mastodon Scout

Purpose

Read-only Mastodon skill. Fetches data from the Mastodon API via a bundled Python script (scripts/mastodon_scout.py). Returns human-readable summaries by default, or raw JSON with --json.


Invocation Rules (MANDATORY)

python3 ./scripts/mastodon_scout.py <command> [options]

Commands

CommandWhat it fetches
-------------------------
homeAuthenticated user's home timeline
user-tweetsAuthenticated user's own posts
mentionsMentions of the authenticated user
search Posts matching the query

Options

--instance <url>   Mastodon instance base URL (default: $MASTODON_INSTANCE or https://mastodon.social)
--limit <int>      Number of items to return (default: $LIMIT or 20)
--json             Output raw JSON instead of human-readable text

Environment Variables

MASTODON_TOKEN      Required. OAuth bearer token.
MASTODON_INSTANCE   Optional. Instance base URL (default: https://mastodon.social).

Examples

python3 ./scripts/mastodon_scout.py home
python3 ./scripts/mastodon_scout.py mentions --limit 10
python3 ./scripts/mastodon_scout.py search "golang"
python3 ./scripts/mastodon_scout.py home --json
python3 ./scripts/mastodon_scout.py home --instance https://fosstodon.org

Output Modes

Text Mode (Default)

The script formats each post as:

[N] Display Name (@user@instance) · <timestamp>
<content>
↩ <replies>  🔁 <reblogs>  ⭐ <favourites>
<url>

The agent MAY add a brief summary after the list.

JSON Mode (--json)

Returns raw Mastodon API JSON. Return it verbatim — no interpretation.


Error Handling

The script prints a human-readable error to stderr and exits non-zero:

ConditionMessage
--------------------
Token missingError: MASTODON_TOKEN is not set
401Mastodon API error: 401 Unauthorized — check MASTODON_TOKEN
403Mastodon API error: 403 Forbidden
422Mastodon API error: 422 Unprocessable Entity
429Mastodon API error: 429 Rate Limited — try again later

Do not retry on error. Guide the user to Authentication Setup if the token is missing or invalid.


Examples That Trigger This Skill

  • mastodon-scout home
  • show my mastodon timeline
  • check mastodon mentions
  • search mastodon for "golang"
  • get my mastodon posts

Notes

  • This skill is read-only (no posting, following, or other mutations)
  • scripts/mastodon_scout.py uses stdlib only — no pip install required
  • In JSON mode: output verbatim, no interpretation

Authentication Setup (Agent MAY Help)

EXCEPTION TO STRICT MODE: If the user needs help obtaining a token, the agent may provide guidance before executing the skill.

How to Obtain a Token:

Step 1: Access Development Settings

  • Log into your Mastodon instance (e.g., mastodon.social, fosstodon.org)
  • Navigate to: Settings → Development (or Preferences → Development)
  • Direct URL: https://[instance-domain]/settings/applications

Step 2: Create Application

  • Click "New Application"
  • Application name: mastodon-scout (or any name)
  • Redirect URI: urn:ietf:wg:oauth:2.0:oob
  • Scopes: CRITICAL — only select read (uncheck write, follow, push)

Step 3: Get Access Token

  • Click Submit, then open the created application
  • Copy the "Your access token" value

Step 4: Set Environment Variable

export MASTODON_TOKEN="paste_token_here"

Step 5: Verify

python3 ./scripts/mastodon_scout.py home --limit 5

Common Mastodon Instances:

  • mastodon.social — General purpose (default)
  • fosstodon.org — FOSS/tech community
  • mas.to — Tech focused
  • hachyderm.io — Tech/infosec community

Security Notes:

  • Token is read-only (cannot post, follow, or delete)
  • Keep token secret (don't commit to git)
  • Can be revoked anytime in Development settings
  • Each Mastodon instance requires its own token

版本历史

共 2 个版本

  • v2.0.1 当前
    2026-03-28 14:28 安全 安全
  • v1.0.4
    2026-03-07 11:39

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,316
productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 445 📥 226,156
ai-intelligence

Weather NWS

patelhiren
通过美国国家气象局(NWS)提供美国天气预报,非美国地区自动切换至全球天气服务。提供详细的累积数据...
★ 2 📥 1,125