Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Post To X Via Oauth

ASecurity

Post to X (Twitter) using the official OAuth 1.0a API. Use when asked to \"post to X\", \"tweet this\", \"post on Twitter\", create threads, delete tweets, or check account info. Free tier compatible. NOT for search, mentions, or media uploads (requires Basic+ tier).

19 stars
0 votes
0 copies
1 views
Added 9/19/2026
ai-agentsgobashapidocumentation

Works with

api

Security Analysis

A100/100

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add rondoflow/rondoflow --skill post-to-x-via-oauth --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Post To X Via Oauth?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Post To X Via Oauth
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rondoflow-post-to-x-via-oauth/badge)](https://www.skillsdirectory.com/skills/rondoflow-post-to-x-via-oauth)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: post-to-x-via-oauth
description: "Post to X (Twitter) using the official OAuth 1.0a API. Use when asked to \"post to X\", \"tweet this\", \"post on Twitter\", create threads, delete tweets, or check account info. Free tier compatible. NOT for search, mentions, or media uploads (requires Basic+ tier)."
category: "Communication"
author: community
version: "1.1.0"
icon: message-circle
---

# X OAuth API Skill

Post to X (formerly Twitter) using the official X API with OAuth 1.0a authentication.

## Overview

This skill provides direct access to X API v2 for posting tweets, managing threads, and monitoring mentions. No proxy or third-party service required — uses your X API credentials directly.

**Use when:**
- User says "post to X", "tweet this", "post on Twitter"
- Need to create threads or media posts
- Want to check mentions or engage with replies

## Quick Start

### 1. Configure X API Credentials

Store these environment variables (from your X Developer Account):
```
X_API_KEY              # Consumer Key (API Key)
X_API_SECRET           # Consumer Secret
X_ACCESS_TOKEN         # Access Token
X_ACCESS_TOKEN_SECRET  # Access Token Secret
X_USER_ID              # Optional: Your numeric user ID (speeds up mentions)
```

### Free Tier vs Paid Tier

**Free tier supports:**
- ✅ Posting tweets and threads
- ✅ Deleting tweets
- ✅ Account info lookup (`x me`)

**Requires Basic+ tier:**
- 🔒 Search tweets
- 🔒 Fetch mentions
- 🔒 Media uploads

### 2. Basic Usage

```bash
# Post a simple tweet
x post "Hello from X API"

# Post a thread
x thread "First tweet" "Second tweet" "Third tweet"

# Check mentions
x mentions --limit 10

# Search recent tweets
x search "AI agents" --limit 5
```

## Commands

### `x post <text>`
Post a single tweet.

**Options:**
- `--reply-to <tweet-id>` - Reply to a specific tweet
- `--quote <tweet-id>` - Quote tweet
- `--media <file>` - Attach image/video

### `x thread <tweet1> <tweet2> ...`
Post a tweet thread.

### `x mentions [options]`
Get recent mentions of your account.

**Options:**
- `--limit <n>` - Number of mentions (default: 10, max: 100)
- `--since <tweet-id>` - Only mentions after this ID
- `--format json` - Output as JSON

### `x search <query> [options]`
Search recent tweets.

**Options:**
- `--limit <n>` - Number of results (default: 10, max: 100)
- `--format json` - Output as JSON

### `x delete <tweet-id>`
Delete a tweet.

### `x me`
Show current account info (name, username, follower counts, user ID).

## API Rate Limits

| Endpoint | Limit | Window |
|----------|-------|--------|
| POST /2/tweets | 200 | 15 min (Free tier) |
| GET /2/tweets/search/recent | 100 | 15 min (Free tier) |
| GET /2/users/:id/mentions | 100 | 15 min (Free tier) |

Rate limits vary by access tier. See [X API documentation](https://developer.twitter.com/en/docs/twitter-api/rate-limits) for details.

## Authentication

OAuth 1.0a is handled transparently. Just provide your credentials via environment variables. The skill will sign all requests automatically.

## Troubleshooting

**"Unauthorized" error**
- Check X API credentials are correct
- Verify credentials are set in environment
- Ensure your app has write permissions in X Developer Portal

**"Rate limit exceeded"**
- Wait 15 minutes for limit to reset
- Reduce request frequency

**"This endpoint requires a paid X API tier"**
- Search and mentions require Basic+ tier on X API
- Free tier only supports posting, deleting, and account lookup

## Requirements

- X Developer Account with API access
- OAuth 1.0a credentials configured
- Network access to api.twitter.com

## Cost

Free. X API is free for basic usage. Check your app's rate limits in X Developer Portal.

## Gotchas
- **Free tier only supports posting, deleting, and account lookup** — search, mentions, and media uploads require Basic+ tier ($100/month). Don't attempt these on free tier; you'll get a clear "requires paid tier" error.
- **"Unauthorized" after credential rotation** — X API keys are invalidated when you regenerate them in the Developer Portal. All 4 env vars must be updated together (`X_API_KEY`, `X_API_SECRET`, `X_ACCESS_TOKEN`, `X_ACCESS_TOKEN_SECRET`).
- **Trailing newlines in env vars break auth** — If you copy/paste credentials and include a trailing `\n`, OAuth signing will fail silently with a 401. Always verify with `echo -n "$X_API_KEY" | xxd` to confirm no whitespace.
- **Rate limit 429s are per-endpoint** — Hitting the limit on `POST /2/tweets` doesn't affect `GET /2/users`. Each endpoint has its own 15-minute window. Back off only the failing endpoint.
- **App write permissions must be set before generating tokens** — If you generate access tokens before enabling "Read and Write" in the Developer Portal, the tokens will be read-only. Regenerate tokens after changing permissions.

Attribution

rondoflowrondoflow
View sourceMore from rondoflow →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1074701 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

693621 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

691 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →