X Twitter Api
Provides API guidance and assistance for agent workflows.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add x-twitter-api npx -- -y @trustedskills/x-twitter-api
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"x-twitter-api": {
"command": "npx",
"args": [
"-y",
"@trustedskills/x-twitter-api"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill provides access to the X (formerly Twitter) API v2, allowing an AI agent to interact with the platform using your authenticated developer credentials (OAuth 1.0a). It enables actions such as retrieving user data, searching for posts, creating tweets, managing likes and reposts, following/unfollowing users, and more. All commands are executed through a central entry point: node x.js <command> [flags].
When to use it
- Automating social media tasks like liking or reposting content.
- Gathering data about your own X account (profile metrics, verification status).
- Searching for specific posts based on keywords or hashtags.
- Managing user relationships – following, unfollowing, muting, blocking.
- Retrieving and managing bookmarks.
Key capabilities
- User Data Retrieval: Access profile information and metrics.
- Search Functionality: Search tweets within the last 7 days or the full archive.
- Post Management: Create new posts (tweets, replies, quote tweets), and delete your own posts.
- Engagement Actions: Like, unlike, repost, and unrepost tweets.
- Social Interactions: Follow, unfollow, list followers/following accounts.
- Feed Access: Retrieve your home timeline and mentions.
- Bookmark Management: Bookmark, unbookmark, and list bookmarks.
- Moderation Tools: Mute, unmute, block users, and hide replies.
- Analytics: Identify users who liked or reposted a specific tweet.
Example prompts
- "Find the latest tweets mentioning 'AI'."
- "Repost the most recent tweet from user @example."
- "Retrieve my profile information."
- "Like this post with ID 1234567890."
Tips & gotchas
- Setup Required: Before first use, you must run
npm installand thennpm run buildwithin the skill's directory. - Authentication: This skill uses your authenticated developer credentials; ensure these are properly configured.
- Command Documentation: Each command has its own documentation file (e.g.,
@docs/me.md) for detailed flag options and behavior. Refer to these files for specific instructions. - Working Directory: Avoid changing the skill's working directory when using it; use relative paths or the
--prefixoption instead.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.