twitter-api

Post, quote, reply to, and delete X tweets via a local CLI with OAuth 1.0a.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/ankitjh4/skill-builder --skill twitter-api-ankitjh4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: twitter-api
Source: https://github.com/ankitjh4/skill-builder/tree/main/twitter-api
Command: npx skills add https://github.com/ankitjh4/skill-builder --skill twitter-api-ankitjh4

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires oauth-1.0a, crypto-js, and includes scripts (resource) components.

What problem does it solve?

It eliminates the manual, error-prone process of composing actions on X (Twitter) by providing a simple local CLI workflow for posting, quoting, replying, and deleting tweets.

Core Features & Use Cases

  • Tweet posting with validation: Enforces the 280-character limit before sending a request to the X API.
  • Quote and reply automation: Supports quoting or replying to a tweet using either a tweet ID or a full status URL.
  • Optional media uploads: Attaches one or more images by specifying repeated --media file paths.
  • Use case: When you need to publish frequent updates (including threads with follow-up replies and occasional quote posts) and want consistent formatting, media attachment, and repeatable execution from your environment.

Quick Start

Set your X API keys as environment variables (X_API_KEY, X_API_KEY_SECRET, X_ACCESS_TOKEN, X_ACCESS_TOKEN_SECRET), then run the post command to publish your tweet text.

Frequently Asked Questions about twitter-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate posting tweets from the command line?

Automating tweet posting from the command line involves using a local CLI that signs X API requests with OAuth 1.0a. It validates text against the 280-character limit and sends creation requests to Twitter endpoints.

Can I reply to or quote an existing tweet using a status URL?

Yes, you can reply to or quote an existing tweet by providing either the tweet ID or the full status URL to the CLI. It applies the appropriate quote and reply parameters to the X API tweet creation request.

Do I need X developer credentials to use OAuth 1.0a for social posting?

Yes, you need X developer credentials configured as environment variables, including X_API_KEY and X_ACCESS_TOKEN, to sign OAuth 1.0a requests for social posting.

How do I attach images to a tweet via CLI automation?

You attach images to a tweet via CLI automation by specifying repeated --media file paths in your command. The CLI handles media uploads to Twitter endpoints before creating the final tweet.

What is the best way to delete an X tweet by ID?

The best way to delete an X tweet by ID is using a local CLI that signs a deletion request with OAuth 1.0a. This targets the specific tweet ID through the X API endpoints for reliable tweet deletion.