x-api

Post and retrieve X content via API with OAuth 1.0a and Bearer token.

1|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/xxih/ai-harness-zh --skill x-api-xxih
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: x-api
Source: https://github.com/xxih/ai-harness-zh/tree/main/references/translations/everything-claude-code/docs/zh-CN/skills/x-api
Command: npx skills add https://github.com/xxih/ai-harness-zh --skill x-api-xxih

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables users to interact programmatically with X (formerly Twitter), eliminating the need for manual posting, timeline reading, and search tasks.

Core Features & Use Cases

  • Publish Tweets and Threads: Create single posts or multi‑tweet conversations.
  • Read Timelines and User Data: Fetch recent tweets, mentions, or profile information.
  • Search and Analyze: Perform keyword searches and retrieve engagement metrics.
  • Media Upload: Attach images or videos to tweets.
  • Rate‑Limit Management: Monitor and respect API limits to avoid throttling. Use cases include automated social media campaigns, content monitoring dashboards, and bot‑driven notifications.

Quick Start

Ask the skill to post a tweet saying "Hello from Claude Code" on X.

Frequently Asked Questions about x-api

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

FAQPage Schema
How do I automate posting tweets and threads via the X API?

You can automate publishing tweets and threads via the X API by using this Skill to programmatically create single posts or multi-tweet conversations. It requires OAuth 1.0a authentication for write actions to authorize your account.

How do I read X timelines and search posts programmatically?

You can read X timelines and search posts programmatically by using a Bearer token for read-only operations. This Skill fetches recent tweets, mentions, and profile data while performing keyword searches to retrieve engagement metrics.

Do I need OAuth to retrieve engagement metrics from Twitter searches?

You do not need OAuth to retrieve engagement metrics from Twitter searches. Read-only operations like searching and analyzing posts require a Bearer token, while OAuth 1.0a is only necessary for write actions like publishing tweets.

How does API rate-limit management work when fetching Twitter timelines?

API rate-limit management for fetching Twitter timelines monitors and respects X API limits to avoid throttling. The Skill handles rate limits and error handling internally to ensure continuous automated social media engagement.

Can I attach media images or videos to tweets through the X API?

Yes, you can attach media images or videos to tweets through the X API. This Skill supports media uploads alongside publishing tweets and threads, enabling rich content creation for automated social media campaigns.