X Twitter logo

X Twitter

Community
alberduris
x-twitter

Interact with X (Twitter) API v2. Post tweets, search, engage, moderate, and analyze — all from your AI agent. Full 37-command skill for Twitter/X automation.

Overview

Publisheralberduris
Repositoryskills
Skill namex-twitter
Stars
25
Forks
2
Bundled files
89
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 89 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by alberduris on GitHub. Read the source before you install it.

Installation

Install the X Twitter AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/alberduris/skills/tree/main/plugins/x-twitter/skills/x-twitter
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/alberduris/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/plugins/x-twitter/skills/x-twitter .claude/skills/x-twitter
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable X Twitter in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads X Twitter on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so X Twitter is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

X (Twitter) API v2 skill using the authenticated user's own developer credentials (OAuth 1.0a, pay-per-use). All commands go through a single entry point: node <base_directory>/x.ts <command> [flags], which Node.js 22.18 or later runs directly, with nothing to install or build. Each command has its own doc file with the full reference for flags and behavior.

[!OUTPUT] Every command prints one JSON object: X's response with includes folded into data, plus our hints, as { data, meta?, errors?, hints? }. meta and errors are exactly as X sent them: meta.next_token is the value for --next-token, and errors says why something is missing, including partial errors next to good data. hints is an array of strings from the CLI. data is absent only when X sent none. Field names are X's own.

[!POSTS] Every command that returns posts (get, search, thread, replies, quotes, mentions, timeline, bookmarks, reposts-of-me, me --pinned-tweet) shows them as x.com does, in one shape: author (id, name, username) in place of author_id; text is the full text a human reads, long posts included, with t.co links expanded and the links to the post's own media and to the quoted post removed; media holds the attached photos and videos as X describes them (type, url, preview_image_url, duration_ms, variants, alt_text); referenced_tweets embeds quoted and retweeted posts in full, while a replied-to post stays { type: "replied_to", id } and the replied-to user is in in_reply_to_user; article holds an X Article's title and full plain_text. A referenced post X did not return stays as its { type, id }, and errors says why. The posts an embedded post references are not requested: they stay { type, id } with no error, a quoted one's link is still removed from the embedded post's text, and get <id> reads them.

[!COMMANDS]

Core: a) me — authenticated user's own account data (profile, metrics, verification). @docs/me.md. b) search — search posts by query. IMPORTANT: by default searches only the last 7 days; use --all for the full archive. Do NOT use search with conversation_id: to read threads or replies — use thread or replies instead. @docs/search.md. c) get — retrieve one or more posts by ID; data is always an array. @docs/get.md. d) post — create a tweet, reply, or quote tweet. @docs/post.md. e) delete — delete a post owned by the authenticated user. @docs/delete.md. f) thread — the conversation author's thread containing a post: the first post plus the author's replies to it or to another post in the thread, oldest first. Other people's replies, and the author's replies under them, are left out. Use --all for threads older than 7 days. @docs/thread.md. g) replies — the direct replies to a post, newest first, one page at a time. IMPORTANT: by default searches only the last 7 days, so for a post older than that the replies come back partial with no warning; use --all. @docs/replies.md. h) transcript — the transcript of a post's video(s), from the subtitle track X generates; a video X published no subtitles for has none. @docs/transcript.md.

Engagement: i) like — like a post by tweet ID. @docs/like.md. j) unlike — remove a like from a post. @docs/like.md. k) repost — repost (retweet) a post. @docs/repost.md. l) unrepost — remove a repost. @docs/repost.md.

Social: m) user — look up user(s) by username or ID. @docs/user.md. n) follow — follow a user by username or ID. @docs/follow.md. o) unfollow — unfollow a user. @docs/follow.md. p) followers — list a user's followers. @docs/followers.md. q) following — list accounts a user follows. @docs/followers.md.

Feed: r) timeline — your home timeline (reverse chronological, not the algorithmic "For you" feed). Results skew heavily toward the authenticated account's own posts and do not reproduce the "Following" tab of the web client. Use --exclude replies,retweets to improve signal. @docs/timeline.md. s) mentions — posts that mention you. @docs/mentions.md.

Bookmarks: t) bookmarks — list your bookmarks. Adding or removing bookmarks is NOT possible: X accepts only OAuth 2.0 user context for those writes, which no supported credential provides. @docs/bookmark.md.

Moderation: u) mute — mute a user. @docs/mute.md. v) unmute — unmute a user. @docs/mute.md. w) muted — list muted accounts. @docs/mute.md. x) blocked — list blocked accounts. @docs/blocked.md. y) hide-reply — hide a reply to your post. @docs/hide-reply.md.

Analytics: z) likers — users who liked a post. @docs/likers.md. aa) reposters — users who reposted a post. @docs/reposters.md. ab) quotes — quote tweets of a post. @docs/quotes.md. ac) count — count posts matching a query over time. @docs/count.md. ad) reposts-of-me — your own posts that others reposted; the reposters are not included, reposters <id> lists them. @docs/reposts-of-me.md.

Discovery: ae) search-users — search users by query. @docs/search-users.md. af) trending — trending topics (worldwide or personalized). @docs/trending.md.

Communities: ag) search-communities — search communities by keyword (name, description). Returns metadata: name, description, member count, join policy. @docs/search-communities.md. ah) community — look up a community by ID. @docs/community.md.

News: ai) search-news — search trending news stories by query. Returns headlines, summaries, categories, keywords, and related posts. @docs/search-news.md. aj) news — look up a news story by ID. @docs/news.md.

Account: ak) usage — posts read this cycle against the project cap. This is a READ QUOTA, not a credit balance: it cannot tell you whether you have money left, and it keeps working normally when credits are depleted. @docs/usage.md.

[!CREDENTIALS] Four OAuth 1.0a variables are REQUIRED: X_API_KEY, X_API_SECRET, X_ACCESS_TOKEN, X_ACCESS_TOKEN_SECRET. They resolve from the first source that provides them: a) .env.local in cwd, b) .env in cwd, c) .env.local in the skill directory (<base_directory>), d) .env in the skill directory, e) environment variables. <base_directory>/.env.example lists every variable. Obtain them from the X Developer Console (Apps > Keys and tokens). One CONDITIONALLY REQUIRED variable: X_API_BEARER_TOKEN (OAuth 2.0 App-Only Bearer Token), generated from the X Developer Console (Apps > Keys and tokens > Bearer Token). Three commands authenticate with it instead of OAuth 1.0a and fail without it, before sending any request: count (ALWAYS, not only with --all), trending (default worldwide branch; --personalized accepts only user context and does not need it), and usage. Their endpoints (post counts, usage, trends by place) are App-Only. Every other command, full-archive search included (search --all, thread --all, replies --all), runs under OAuth 1.0a user context, which is what returns user-context fields such as connection_status and receives_your_dm.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

and 29 more files.

Frequently asked questions

What does the X Twitter AI skill do?

Interact with X (Twitter) API v2. Post tweets, search, engage, moderate, and analyze — all from your AI agent. Full 37-command skill for Twitter/X automation.

Why use X Twitter on TypingMind?

Because you install it once and use it with any model. X Twitter is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install X Twitter in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/alberduris/skills/tree/main/plugins/x-twitter/skills/x-twitter. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use X Twitter?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with X Twitter?

As many as you like. As long as a model supports skills, you can use X Twitter with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the X Twitter AI skill free?

Yes. It is published on GitHub by alberduris under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇