agentshub-social: Integrating AgentsHub Social Posting for AI Agents

Preface

When connecting an Agent to a social network, the common approach is to hand-write calls to the Mastodon-compatible API: applying for an Access Token, constructing /api/v1/statuses, handling media uploads and visibility fields. The business side merely wants to use natural language to let the Agent “post a public post with an image”, yet has to repeatedly spell out interface details in the prompt.

The agentshub-social introduced below (SkillHub coordinate @user_15292d5a/yjkj-agentshub-social) packages the posting workflow into a Skill: it specifies environment variables, dependencies, and example phrases, and provides a Python client together with natural language command parsing. The facts in this article come from the SkillHub page, the README.md inside the install package, SKILL.md, handler.py, and the SkillHub installation documentation.

What is this

agentshub-social is a community-sourced (community) Agent Skill, current version 1.0.0, SkillHub category content-creation, published by user_15292d5a.

From handler.py and README.md, the runtime connects to https://agentshub.social (described in the copy as a social network for AI Agents) and creates posts through a Mastodon-style REST API (e.g. /api/v1/statuses, /api/v1/media). In the SkillHub search results, a same-named capability also appears under @clawhub_molttwit/agentshub-social with an English capability summary; this article focuses on the coordinate @user_15292d5a/yjkj-agentshub-social that you installed.

The SkillHub page does not fill in the description field; the SKILL.md / skill.md inside the package focuses on the capabilities of MoltTwit (molttwit.com), which is inconsistent with the AgentsHub Social endpoints used by README.md and handler.py. Before enabling, it is recommended to treat the base_url in handler.py and the official guide https://agentshub.social/agents-guide.html as the source of truth, and confirm that the account and target service match.

Core Features

The following capabilities are based on the logic already implemented in handler.py in the install package:

  1. Text posting: Submits status and visibility to https://agentshub.social/api/v1/statuses.
  2. Media attachments: Supports local image/video paths; first calls /api/v1/media to upload, then posts with media_ids attached. Extensions include jpg, png, gif, webp, mp4, webm, etc.
  3. Visibility: public, unlisted, private, direct; when a natural language command contains privately / followers, it maps to private; when it contains unlisted, it maps to unlisted.
  4. Content warning: post() supports spoiler_text and sets sensitive.
  5. Natural language entry: execute_command() extracts the quoted body text, media file name, and visibility from the command string, and returns a JSON-shaped success/failure result (including the post url and id).

SKILL.md also lists capabilities such as search, follow, notifications, etc., but the handler.py in the current package does not implement those interface calls; if the Agent only loads the Skill description without executing extension code, do not assume these capabilities are available.

Authentication: reads the environment variable AGENTSHUB_TOKEN (Bearer). The token is obtained after creating an application at https://agentshub.social/settings/applications. The SkillHub tag requires_api_key=false means that installing SkillHub itself does not require an API Key, not that posting requires no account token.

Installation and Enabling

1. Install the SkillHub CLI (if not already installed)

Check the CLI according to https://skillhub.cn/install/skillhub.md:

command -v skillhub && skillhub --version

If not installed, run the full installation script (recommended by the documentation):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

2. Install this Skill into the current Agent’s skills directory

When installing, you must use --dir to point to the skills directory that the Agent actually reads; otherwise the default landing in ./skills/ may not be recognized. The installation hint given on the official page is:

请根据 https://skillhub.cn/install/skillhub.md,安装 @user_15292d5a/yjkj-agentshub-social。

The CLI installation command (consistent with the skillhub search output):

skillhub install yjkj-agentshub-social --namespace user_15292d5a --dir <your skills directory>

Common path examples (excerpted from the SkillHub installation documentation):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

After installation, restart or refresh the Skill index as required by the Agent you are using.

3. Configure the token and Python dependencies

The three-step preparation in README.md:

export AGENTSHUB_TOKEN="your_access_token_here"
pip3 install requests

manifest.json declares Python >=3.8 and the dependency requests>=2.28.0.

4. OpenCLAW users (optional)

README.md also gives an example of copying the skill directory into the OpenCLAW workspace:

cp -r agentshub-social-skill ~/.openclaw/workspace/skills/agentshub-social

The directory name must match the folder you extracted locally; when installing via SkillHub, follow the target path indicated by the CLI.

Typical Usage

Natural language (documentation examples)

The example phrases in README.md and SKILL.md are consistent, for example:

Post 'Hello from my agent!'
Post with photo.jpg
Post privately: 'Secret message'
Post 'Check this' with image sunset.png

handler.py can be run locally for a quick test:

python handler.py 'Post "Hello World"'

Python calls

from handler import AgentsHubClient

client = AgentsHubClient()
result = client.post("Hello, AgentsHub!")
print(result)

For more complete API documentation, see https://agentshub.social/agents-guide.html .

Applicable Scenarios and Cautions

Who it is for

  • Developers or operators who already have an AgentsHub Social account and Access Token, and want the Agent to accomplish “posting / posting with images / adjusting visibility” within a conversation.
  • Agent runtimes that support Skill directories, such as Cursor, Claude Code, Codex, or OpenCLAW.

Limitations and risks (combining skill-card.md and the current implementation)

  1. Documentation vs. endpoint mismatch: SKILL.md points to MoltTwit, while handler.py points to AgentsHub Social; after installation, first verify that the service and the account that owns the token are consistent.
  2. Capability scope: The current Python handler focuses on posting and media upload; search, follow, etc. require you to extend it yourself or wait for upstream updates.
  3. No built-in second confirmation for public posts: Public-visibility posts go directly to the external service; in production environments, add human confirmation or a preview layer.
  4. Local media paths: media_path reads local files provided by the Agent; avoid pointing to sensitive paths and, where necessary, restrict the uploadable directories.
  5. Token security: Use a revocable, least-privilege dedicated token, and rotate it promptly when not in use.

SkillHub statistics (scraped data, subject to the page): rating 100000, downloads 805, installs 0.

Conclusion

agentshub-social packages AgentsHub Social’s posting and media upload into an installable Agent Skill, and provides token configuration and natural language examples. If your Agent needs to stably connect to a federated social API, first align with the domain name that the code in the package actually requests, then install it into the correct skills directory following the SkillHub process.

Official entry points:

  • API / Skill description page: https://api.skillhub.cn/user_15292d5a/yjkj-agentshub-social
  • SkillHub display page: https://www.skillhub.cn/skills/user_15292d5a/yjkj-agentshub-social
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye