Twitter Skill
Overview
This skill provides Twitter social media functionality, including viewing followers, posting tweets, browsing timeline and more.
Scripts
post_tweet.sh
Post a new tweet with optional hashtags.
content (string, required): Tweet content
tags (array, optional): Hashtag list
reply_to (string, optional): Reply to tweet ID
get_timeline.sh
Get user timeline with pagination.
limit (integer, optional, default: 20): Number of tweets to return
username (string, optional): Filter by username
get_followers.sh
Get user followers list.
limit (integer, optional, default: 50): Number of followers to return
get_following.sh
Get user following list.
limit (integer, optional, default: 50): Number of following to return
search_tweets.sh
Keyword search tweets.
query (string, required): Search keyword
limit (integer, optional, default: 20): Number of results to return
get_comments.sh
Get comments list for a post (feedback on a topic).
post_id (string, required): Post ID to get comments for
limit (integer, optional, default: 20): Number of comments to return
Usage
# Post tweet
./scripts/post_tweet.sh "Hello World!" "#python,#coding"
# Get timeline
./scripts/get_timeline.sh 20
# Get followers
./scripts/get_followers.sh 50
# Get following
./scripts/get_following.sh 50
# Search tweets
./scripts/search_tweets.sh "python" 10
# Get comments for a post
./scripts/get_comments.sh "post_xxx" 20
Return Format
Success Response
{
"success": true,
"data": { ... },
"message": "Operation successful"
}
Error Response
{
"success": false,
"error": "Error message",
"message": "Operation failed"
}
Script-specific Response Data
post_tweet.sh
- Success:
data contains the posted tweet object:{
"id": "post_1234567890_abc123",
"username": "openclaw",
"handle": "@openclaw",
"avatar": "https://api.dicebear.com/7.x/avataaars/svg?seed=openclaw",
"content": "Hello World!",
"tags": ["python", "coding"],
"reply_to": null,
"media": [],
"timestamp": "2025-04-01T12:00:00Z",
"likes": 0,
"retweets": 0,
"replies": 0,
"views": 0
}
get_timeline.sh
- Success:
data contains an array of tweet objects:[
{
"id": "post_1234567890_abc123",
"username": "openclaw",
"handle": "@openclaw",
"content": "Hello World!",
"tags": ["python"],
"timestamp": "2025-04-01T12:00:00Z",
"likes": 5,
"retweets": 2,
"replies": 1,
"views": 100
}
]
get_followers.sh
- Success:
data contains an array of follower objects:[
{
"id": "user_abc123",
"username": "follower1",
"handle": "@follower1",
"avatar": "https://api.dicebear.com/7.x/avataaars/svg?seed=follower1",
"bio": "Follower bio"
}
]
get_following.sh
- Success:
data contains an array of following user objects:[
{
"id": "user_def456",
"username": "following1",
"handle": "@following1",
"avatar": "https://api.dicebear.com/7.x/avataaars/svg?seed=following1",
"bio": "Following user bio"
}
]
search_tweets.sh
- Success:
data contains an array of matching tweet objects:[
{
"id": "post_1234567890_abc123",
"username": "openclaw",
"content": "Python tutorial",
"tags": ["python", "tutorial"],
"timestamp": "2025-04-01T12:00:00Z",
"likes": 10,
"retweets": 5
}
]
get_comments.sh
- Success:
data contains an array of comment objects for the specified post:[
{
"id": "comment_abc123",
"post_id": "post_1234567890_abc123",
"username": "user1",
"content": "Great post!",
"timestamp": "2025-04-01T12:30:00Z"
}
]
1---2name: twitter3description: Twitter skill - Provides posting, timeline viewing, follower management and other functions4license: Apache-2.05---67# Twitter Skill89## Overview1011This skill provides Twitter social media functionality, including viewing followers, posting tweets, browsing timeline and more.1213## Scripts1415### post_tweet.sh16Post a new tweet with optional hashtags.17- `content` (string, required): Tweet content18- `tags` (array, optional): Hashtag list19- `reply_to` (string, optional): Reply to tweet ID2021### get_timeline.sh22Get user timeline with pagination.23- `limit` (integer, optional, default: 20): Number of tweets to return24- `username` (string, optional): Filter by username2526### get_followers.sh27Get user followers list.28- `limit` (integer, optional, default: 50): Number of followers to return2930### get_following.sh31Get user following list.32- `limit` (integer, optional, default: 50): Number of following to return3334### search_tweets.sh35Keyword search tweets.36- `query` (string, required): Search keyword37- `limit` (integer, optional, default: 20): Number of results to return3839### get_comments.sh40Get comments list for a post (feedback on a topic).41- `post_id` (string, required): Post ID to get comments for42- `limit` (integer, optional, default: 20): Number of comments to return4344## Usage4546```bash47# Post tweet48./scripts/post_tweet.sh "Hello World!" "#python,#coding"4950# Get timeline51./scripts/get_timeline.sh 205253# Get followers54./scripts/get_followers.sh 505556# Get following57./scripts/get_following.sh 505859# Search tweets60./scripts/search_tweets.sh "python" 106162# Get comments for a post63./scripts/get_comments.sh "post_xxx" 2064```6566## Return Format6768### Success Response6970```json71{72 "success": true,73 "data": { ... },74 "message": "Operation successful"75}76```7778### Error Response7980```json81{82 "success": false,83 "error": "Error message",84 "message": "Operation failed"85}86```8788### Script-specific Response Data8990#### post_tweet.sh91- **Success**: `data` contains the posted tweet object:92 ```json93 {94 "id": "post_1234567890_abc123",95 "username": "openclaw",96 "handle": "@openclaw",97 "avatar": "https://api.dicebear.com/7.x/avataaars/svg?seed=openclaw",98 "content": "Hello World!",99 "tags": ["python", "coding"],100 "reply_to": null,101 "media": [],102 "timestamp": "2025-04-01T12:00:00Z",103 "likes": 0,104 "retweets": 0,105 "replies": 0,106 "views": 0107 }108 ```109110#### get_timeline.sh111- **Success**: `data` contains an array of tweet objects:112 ```json113 [114 {115 "id": "post_1234567890_abc123",116 "username": "openclaw",117 "handle": "@openclaw",118 "content": "Hello World!",119 "tags": ["python"],120 "timestamp": "2025-04-01T12:00:00Z",121 "likes": 5,122 "retweets": 2,123 "replies": 1,124 "views": 100125 }126 ]127 ```128129#### get_followers.sh130- **Success**: `data` contains an array of follower objects:131 ```json132 [133 {134 "id": "user_abc123",135 "username": "follower1",136 "handle": "@follower1",137 "avatar": "https://api.dicebear.com/7.x/avataaars/svg?seed=follower1",138 "bio": "Follower bio"139 }140 ]141 ```142143#### get_following.sh144- **Success**: `data` contains an array of following user objects:145 ```json146 [147 {148 "id": "user_def456",149 "username": "following1",150 "handle": "@following1",151 "avatar": "https://api.dicebear.com/7.x/avataaars/svg?seed=following1",152 "bio": "Following user bio"153 }154 ]155 ```156157#### search_tweets.sh158- **Success**: `data` contains an array of matching tweet objects:159 ```json160 [161 {162 "id": "post_1234567890_abc123",163 "username": "openclaw",164 "content": "Python tutorial",165 "tags": ["python", "tutorial"],166 "timestamp": "2025-04-01T12:00:00Z",167 "likes": 10,168 "retweets": 5169 }170 ]171 ```172173#### get_comments.sh174- **Success**: `data` contains an array of comment objects for the specified post:175 ```json176 [177 {178 "id": "comment_abc123",179 "post_id": "post_1234567890_abc123",180 "username": "user1",181 "content": "Great post!",182 "timestamp": "2025-04-01T12:30:00Z"183 }184 ]185 ```