Skip to content
Back to skills

Twitter Api

ASecurity

Post, quote, reply to, and delete X (Twitter) tweets via the local X CLI script using API keys. Use when the user asks to tweet, quote tweet, reply, or delete on X/Twitter.

  • 11 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 10, 2026
content-marketinggoshellbashapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 10, 2026

npx -y skills add luokai0/ai-agent-skills-by-luo-kai --skill twitter-api --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Twitter Api?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Twitter Api
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/luokai0-twitter-api/badge)](https://www.skillsdirectory.com/skills/luokai0-twitter-api)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: twitter-api
description: Post, quote, reply to, and delete X (Twitter) tweets via the local X CLI script using API keys. Use when the user asks to tweet, quote tweet, reply, or delete on X/Twitter.
metadata:
  author: 0.zo.computer
  category: Community
  display-name: Post to X (Twitter)
  emoji: 🐦
---

# X (Twitter) API CLI

Post, quote, reply to, and delete tweets using the local X CLI script in `Community/twitter-api/scripts/`.

## Setup

The USER must complete these steps in the X Developer Portal:

1. Sign in with their X account.
2. Create a new project (or use the default).
3. Create a new app under the project.
4. Change the app permissions to **Read & Write** before generating keys.
5. Go to the app's "Keys and Tokens" tab and generate:
   - API Key and Secret (Consumer Keys)
   - Access Token and Secret (User Context)

Then the USER must set secrets in [Settings > Developers](/settings#developers) or export them locally:
- `X_API_KEY`
- `X_API_KEY_SECRET` (or `X_API_SECRET`)
- `X_ACCESS_TOKEN`
- `X_ACCESS_TOKEN_SECRET` (or `X_ACCESS_SECRET`)

Optional local setup: copy `scripts/.env.example` to `scripts/.env` and fill in values.

If required keys are missing, stop and ask the user to configure them before posting.

## Commands

Run from `Community/twitter-api/scripts/`:

```bash
bun x.ts post "Your tweet text here"
bun x.ts quote https://x.com/user/status/123 "Your commentary"
bun x.ts reply https://x.com/user/status/123 "Your reply text"
bun x.ts delete https://x.com/user/status/123
```

### Media

Attach media by repeating `--media`:

```bash
bun x.ts post --media /path/to/image.png "Caption"
bun x.ts quote https://x.com/user/status/123 --media /path/to/image.png "Commentary"
```

## Notes

- Max length is 280 characters. If over, trim before posting.
- Use actual line breaks in the shell for multi-paragraph tweets.
- Tweet IDs or full URLs are accepted for quote/reply/delete.

Files in this skill

  • DISPLAY.json749 B
  • SKILL.md1.9 KB
  • scripts/bun.lock1.5 KB
  • scripts/package.json280 B
  • scripts/x.ts9.3 KB

Attribution

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

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.