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

X Api

ASecurity

Post to X (Twitter) using the official API with OAuth 1.0a. Use when you need to tweet, post updates, or publish content. Bypasses rate limits and bot detection that affect cookie-based approaches like bird CLI.

651 stars
0 votes
0 copies
8 views
Added 2/10/2026
developmentgobashnodeapi

Works with

cliapi

Security Analysis

A96/100
mediumInstalls packages at runtime which could introduce malicious dependencies

Scanned 2/12/2026

Install to Claude Code

$npx -y skills add sundial-org/awesome-openclaw-skills --skill x-api --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of X Api?

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

Security grade badge for X Api
[![Security: A โ€” Skills Directory](https://www.skillsdirectory.com/api/skills/sundial-org-x-api/badge)](https://www.skillsdirectory.com/skills/sundial-org-x-api)

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

Download with Pro
Files
SKILL.md
---
name: x-api
description: Post to X (Twitter) using the official API with OAuth 1.0a. Use when you need to tweet, post updates, or publish content. Bypasses rate limits and bot detection that affect cookie-based approaches like bird CLI.
---

# x-api ๐Ÿฆ

Post to X using the official API (OAuth 1.0a).

## When to Use

- Posting tweets (cookie-based `bird tweet` gets blocked by bot detection)
- Official API access is needed for reliability

For **reading** (timeline, search, mentions), use `bird` CLI instead โ€” it's free and works well for reads.

## Setup

### 1. Get API Credentials

1. Go to https://developer.x.com/en/portal/dashboard
2. Create a Project and App
3. Set App permissions to **Read and Write**
4. Get your keys from "Keys and tokens" tab:
   - API Key (Consumer Key)
   - API Key Secret (Consumer Secret)
   - Access Token
   - Access Token Secret

### 2. Configure Credentials

**Option A: Environment variables**
```bash
export X_API_KEY="your-api-key"
export X_API_SECRET="your-api-secret"
export X_ACCESS_TOKEN="your-access-token"
export X_ACCESS_SECRET="your-access-token-secret"
```

**Option B: Config file** at `~/.clawdbot/secrets/x-api.json`
```json
{
  "consumerKey": "your-api-key",
  "consumerSecret": "your-api-secret",
  "accessToken": "your-access-token",
  "accessTokenSecret": "your-access-token-secret"
}
```

### 3. Install Dependency

```bash
npm install -g twitter-api-v2
```

## Post a Tweet

```bash
x-post "Your tweet text here"
```

Or with full path:
```bash
node /path/to/skills/x-api/scripts/x-post.mjs "Your tweet text here"
```

Supports multi-line tweets:
```bash
x-post "Line one

Line two

Line three"
```

Returns the tweet URL on success.

## Limits

- Free tier: 1,500 posts/month (requires credits in X Developer Portal)
- Basic tier ($100/mo): Higher limits

## Reading (use bird)

For reading, searching, and monitoring โ€” use the `bird` CLI:

```bash
bird home                    # Timeline
bird mentions                # Mentions
bird search "query"          # Search
bird user-tweets @handle     # User's posts
bird read <tweet-url>        # Single tweet
```

## Troubleshooting

**402 Credits Depleted**: Add credits in X Developer Portal โ†’ Dashboard

**401 Unauthorized**: Regenerate Access Token (ensure Read+Write permissions are set first)

**No credentials found**: Set env vars or create config file (see Setup above)

Attribution

sundial-orgsundial-org
View sourceMore from sundial-org โ†’
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots ยท $299/mo ยท GSC-verified traffic ยท sponsors can never buy grades.

See placements

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

Your tool, in front of Claude Code builders.

3 founder slots ยท $299/mo ยท GSC-verified traffic ยท sponsors can never buy grades.

See placements

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284972 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2192 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch โ€” SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions โ€” even if they don't name TanStack Start specifically. No template repo โ€” Claude generates every file fresh per ...

10311 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development โ†’