tweet-cli
Post tweets, replies, and quotes to X/Twitter using the official API v2. Use this instead of bird for posting. Uses API credits so only post when explicitly asked or scheduled.
About this skill
This AI agent skill provides a command-line interface for interacting with the X/Twitter API v2, primarily for outgoing actions. Agents can leverage `tweet-cli` to create new tweets, respond to existing ones, or quote tweets directly from their execution environment. It emphasizes mindful usage due to X API credit consumption, particularly on the Free tier, which is limited to 1,500 posts per month. `tweet-cli` is distinct from tools like `bird`, which is recommended for reading tweets, searching, and browsing timelines without incurring API credit costs. This skill is crucial for AI agents involved in social media management, automated content distribution, or any scenario where programmatic posting to X/Twitter is required. It prioritizes security with specific instructions for credential storage and no post-install scripts or telemetry. Users would deploy this skill when they need their AI agent to actively contribute content to X/Twitter, whether through user-prompted requests or predefined scheduled tasks. Its focused functionality on 'writing' to X/Twitter makes it a valuable component for building intelligent agents with dynamic social media presence.
Best use case
The primary use case is for AI agents to programmatically publish new tweets, replies, or quote tweets to the X/Twitter platform. This skill is ideal for developers creating agents that manage social media presence, automate content distribution, or provide interactive responses directly on X/Twitter, ensuring API credit awareness. It is best used for explicit posting instructions rather than speculative content generation.
Post tweets, replies, and quotes to X/Twitter using the official API v2. Use this instead of bird for posting. Uses API credits so only post when explicitly asked or scheduled.
A successful tweet, reply, or quote post will appear on the configured X/Twitter account, or a clear error message will be returned if the operation fails.
Practical example
Example input
Please post a tweet announcing the new AI skill directory using the hashtag #AISkills. The tweet should say: 'Discover powerful new capabilities for your AI agents at the official AI Skill Directory! #AISkills'
Example output
Tweet posted successfully. Content: 'Discover powerful new capabilities for your AI agents at the official AI Skill Directory! #AISkills' with ID: 1234567890123456789
When to use this skill
- When the user explicitly asks the AI agent to post a tweet, reply, or quote on X/Twitter.
- During scheduled cron tasks to automate pre-approved social media content publishing.
- When an AI agent needs to *write* (post, reply, quote) content to the X/Twitter platform.
- To integrate automated social media updates into a larger AI workflow.
When not to use this skill
- For reading tweets, searching, or browsing timelines (use `bird` instead, which incurs no API credit cost).
- To speculatively draft and post tweets without explicit user instruction or scheduling.
- If you wish to avoid consuming X/Twitter API credits for posting operations.
- For any interactions with X/Twitter that do not involve posting new content.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/tweet-cli/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How tweet-cli Compares
| Feature / Agent | tweet-cli | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | medium | N/A |
Frequently Asked Questions
What does this skill do?
Post tweets, replies, and quotes to X/Twitter using the official API v2. Use this instead of bird for posting. Uses API credits so only post when explicitly asked or scheduled.
How difficult is it to install?
The installation complexity is rated as medium. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for ChatGPT
Find the best AI skills to adapt into ChatGPT workflows for research, writing, summarization, planning, and repeatable assistant tasks.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
AI Agent for YouTube Script Writing
Find AI agent skills for YouTube script writing, video research, content outlining, and repeatable channel production workflows.
SKILL.md Source
# tweet-cli Post to X/Twitter using the official API v2. This tool uses API credits (limited to 1,500 posts/month on the Free tier), so **only use it when the user explicitly asks you to post, or during scheduled cron tasks**. Do not speculatively draft and post tweets. For **reading** tweets, searching, and browsing timelines, use `bird` instead (no credit cost). ## Setup 1. Install (pinned to release tag): ```bash npm install -g github:0xmythril/tweet-cli#v1.0.0 ``` 2. Get API keys from https://developer.x.com/en/portal/dashboard (Free tier works) 3. Configure credentials (file is created with restricted permissions): ```bash mkdir -p ~/.config/tweet-cli touch ~/.config/tweet-cli/.env chmod 600 ~/.config/tweet-cli/.env cat > ~/.config/tweet-cli/.env << 'EOF' X_API_KEY=your_consumer_key X_API_SECRET=your_secret_key X_ACCESS_TOKEN=your_access_token X_ACCESS_TOKEN_SECRET=your_access_token_secret EOF ``` 4. Verify: `tweet-cli whoami` ## Security - **Credentials**: Stored in `~/.config/tweet-cli/.env` (read by `dotenv` at runtime). Set `chmod 600` to restrict access. - **No postinstall scripts**: The package has zero install scripts — verify via `npm pack --dry-run` or inspect `package.json`. - **No telemetry or network calls** except to the official X API (`api.x.com`) when you run a command. - **Pinned install**: The install command pins to a specific release tag. Audit the source at https://github.com/0xmythril/tweet-cli before installing. - **Dependencies**: Only 3 runtime deps — `twitter-api-v2` (official X API client), `commander` (CLI parsing), `dotenv` (env file loading). No transitive dependencies. ## Commands ### Verify auth ```bash tweet-cli whoami ``` ### Post a tweet ```bash tweet-cli post "Your tweet text here" ``` ### Reply to a tweet ```bash tweet-cli reply <tweet-id-or-url> "Your reply text" tweet-cli reply https://x.com/user/status/123456 "Your reply text" ``` ### Quote a tweet ```bash tweet-cli quote <tweet-id-or-url> "Your commentary" tweet-cli quote https://x.com/user/status/123456 "Your commentary" ``` ### Delete a tweet ```bash tweet-cli delete <tweet-id-or-url> ``` ## Important rules - **Do NOT post unless the user explicitly asks or a cron job triggers it.** Each post uses API credits. - **Always confirm with the user** before posting, replying, or quoting. Show them the text first. - For reading tweets, searching, or viewing timelines, use `bird` (not tweet-cli). - tweet-cli accepts both raw tweet IDs and full URLs (x.com or twitter.com). - If you get a 402 CreditsDepleted error, inform the user their monthly credits are exhausted.
Related Skills
---
name: article-factory-wechat
humanizer
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
linkedin-cli
A bird-like LinkedIn CLI for searching profiles, checking messages, and summarizing your feed using session cookies.
小红书长图文发布 Skill
## 概述
openclaw-youtube
YouTube SERP Scout for agents. Search top-ranking videos, channels, and trends for content research and competitor tracking.
openclaw-media-gen
Generate images & videos with AIsa. Gemini 3 Pro Image (image) + Qwen Wan 2.6 (video) via one API key.
Cold Email Writer
Writes personalized cold emails that actually get replies
Presentation Mastery — Complete Slide Design & Delivery System
You are a Presentation Architect. You help build presentations that persuade, inform, and move people to action. You cover the full lifecycle: audience analysis → narrative structure → slide design → delivery coaching → post-presentation follow-up.
ai-humanizer
Rewrites AI-generated content to sound natural, human, and undetectable. Removes robotic patterns, adds voice variety, and preserves meaning.
Employee Handbook Generator
Build a complete, customized employee handbook for your company. Covers policies, benefits, conduct, leave, remote work, DEI, and compliance — ready for legal review.
afrexai-copywriting-mastery
Write high-converting copy for any medium — landing pages, emails, ads, UX, sales pages, video scripts, and brand voice. Complete methodology with frameworks, templates, scoring rubrics, and swipe files. Use when writing or reviewing any user-facing text.
afrexai-conversion-copywriting
Write high-converting copy for any surface — landing pages, emails, ads, sales pages, product descriptions, CTAs, video scripts, and more. Complete conversion copywriting system with research methodology, 12 proven frameworks, swipe-file templates, scoring rubrics, and A/B testing protocols. Use when you need to write or review any copy meant to drive action.