agentskills.codes

The `weibo-cli` is a command-line interface tool for interacting with Weibo data without using the MCP protocol. It provides direct access to all Weibo functionality through simple terminal commands.

Install

mkdir -p .claude/skills/skills-qinyuanpei && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13430" && unzip -o skill.zip -d .claude/skills/skills-qinyuanpei && rm skill.zip

Installs to .claude/skills/skills-qinyuanpei

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

The `weibo-cli` is a command-line interface tool for interacting with Weibo data without using the MCP protocol. It provides direct access to all Weibo functionality through simple terminal commands.
199 chars · catalog descriptionno explicit “when” trigger

About this skill

Weibo CLI Skills

Overview

The weibo-cli is a command-line interface tool for interacting with Weibo data without using the MCP protocol. It provides direct access to all Weibo functionality through simple terminal commands.

Installation

# Run with uvx (recommended)
uvx --from mcp-server-weibo weibo-cli --help

# Or run with uv tool
uv tool install mcp-server-weibo
weibo-cli --help

Workflows

User-Related Operations

For operations involving users (profile, feeds, followers, fans), you need to first search for the user to get their UID:

1. Search users → Get UID
       ↓
2. Use UID for subsequent operations

Example: Get a specific user's feeds

# Step 1: Search for user to get UID
weibo-cli users "雷军" -n 5

# Step 2: Use the UID (1749127163) to get feeds
weibo-cli feeds 1749127163 -n 10

Example: Get someone's followers

# Step 1: Search users
weibo-cli users "科技博主" -n 5

# Step 2: Use UID to get followers
weibo-cli followers <UID> -n 20

Content Search

For searching posts/content by keyword, use the search command directly:

# Search posts containing keywords
weibo-cli search "人工智能" -n 20

Topic Search

For searching hashtags/topics:

# Search topics
weibo-cli topics "演唱会" -n 10

Trending Hot Searches

Get current trending topics directly:

# Get trending hot searches
weibo-cli trending -n 15

Comments

Getting comments requires a feed_id, which can be obtained from feed results:

1. Search users → Get UID
       ↓
2. Get feeds → Get feed IDs
       ↓
3. Use feed_id to get comments

Example: Get comments on a specific post

# Step 1: Get the user's feeds
weibo-cli feeds 1749127163 -n 10

# Step 2: Use the feed id from results to get comments
weibo-cli comments <FEED_ID> -p 1

CLI Commands

profile

Get user profile information by UID.

weibo-cli profile <UID>

Example:

weibo-cli profile 1749127163

Output: JSON object with user details (id, screen_name, description, followers_count, etc.)

feeds

Get user posts (weibo feeds).

weibo-cli feeds <UID> [-n LIMIT]

Example:

weibo-cli feeds 1749127163 -n 10

Output: JSON array of feed items with text, source, created_at, comments_count, attitudes_count, reposts_count, etc.

search

Search for posts containing specific keywords.

weibo-cli search <KEYWORD> [-n LIMIT] [-p PAGE]

Example:

weibo-cli search "人工智能" -n 20 -p 1

Output: JSON array of matching posts with user info, timestamps, and engagement metrics.

users

Search for Weibo users by keyword.

weibo-cli users <KEYWORD> [-n LIMIT] [-p PAGE]

Example:

weibo-cli users "科技" -n 10

Output: JSON array of user profiles matching the search term.

topics

Search for Weibo topics (hashtags).

weibo-cli topics <KEYWORD> [-n LIMIT] [-p PAGE]

Example:

weibo-cli topics "演唱会" -n 10

Output: JSON array of topic items with title, description, and URL.

trending

Get current trending/hot search items.

weibo-cli trending [-n LIMIT]

Example:

weibo-cli trending -n 15

Output: JSON array of trending items with rank, description, and热度值.

comments

Get comments for a specific post.

weibo-cli comments <FEED_ID> [-p PAGE]

Example:

weibo-cli comments 5173507416919189 -p 1

Output: JSON array of comments with user info, text, and timestamps.

followers

Get a user's followers.

weibo-cli followers <UID> [-n LIMIT] [-p PAGE]

Example:

weibo-cli followers 1749127163 -n 20

Output: JSON array of user profiles who follow this user.

fans

Get a user's fans (people who follow this user).

weibo-cli fans <UID> [-n LIMIT] [-p PAGE]

Example:

weibo-cli fans 1749127163 -n 20

Output: JSON array of user profiles who are fans of this user.

Common Options

OptionDescriptionDefault
-n, --limitMaximum number of resultsvaries by command
-p, --pagePage number for pagination1

Exit Codes

  • 0: Success
  • 1: Error (network failure, invalid arguments, etc.)

Error Handling

All errors are logged to stderr and displayed as error messages. The CLI will exit with code 1 if any operation fails.

Tips

  1. User Operations: Always start with users to get the UID before using profile, feeds, followers, or fans
  2. Comments: Get feed_id from feeds results before using comments
  3. Pagination: Use -p option to navigate through multiple pages of results
  4. Result Limits: Use -n option to control how many results to fetch
  5. JSON Output: All results are output as formatted JSON for easy parsing

See Also

Search skills

Search the agent skills registry