Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/rockyco/claude-x-plugin/x-apinpx skills add rockyco/claude-x-plugin --skill x-apigit clone --depth 1 https://github.com/rockyco/claude-x-pluginWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/rockyco/claude-x-plugin/x-api)<a href="https://agentmods.dev/skills/rockyco/claude-x-plugin/x-api"><img src="https://agentmods.dev/badge/skills/rockyco/claude-x-plugin/x-api.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00070 | $0.02144 |
| Opus 5 | $0.00035 | $0.01072 |
| Sonnet 5 | $0.00014 | $0.00429 |
| Haiku 4.5 | $0.00007 | $0.00214 |
Grade A, and why
x-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.
X API Knowledge
Post Creation
X API v2 endpoint for creating posts:
POST https://api.x.com/2/tweets
Authorization: Bearer {access_token}
Content-Type: application/json
{"text": "Hello world"}
With media:
{
"text": "Check this out",
"media": {
"media_ids": ["1234567890"]
}
}
Authentication
X uses OAuth 2.0 with PKCE (Proof Key for Code Exchange):
- Authorization URL:
https://x.com/i/oauth2/authorize - Token URL:
https://api.x.com/2/oauth2/token - Access tokens expire in 2 hours
- Refresh tokens valid for 6 months (requires
offline.accessscope) - The plugin auto-refreshes tokens before each API call
Required scopes: tweet.read tweet.write users.read media.write offline.access
Media Upload
Single-shot upload to POST https://api.x.com/2/media/upload:
- Format:
multipart/form-data - Fields:
media_data(base64),media_category("tweet_image") - Returns
data.id(media ID string)
Constraints
- Max 4 images per post
- Images: max 5 MB (JPG, PNG, GIF, WEBP)
- GIFs: max 15 MB, resolution max 1280x1080
- Videos: max 512 MB, 0.5-140 seconds (requires chunked upload)
Post Content Guidelines
- Free tier: 280 characters per post
- Premium/X Blue: 25,000 characters
- Hashtags: use sparingly, 2-3 max
- @mentions count toward character limit
- URLs are shortened to 23 characters by t.co
- Line breaks are preserved
Writing an attractive, readable post (ALWAYS craft, never dump raw text)
Every time you compose for X, deliberately write the post for the platform. Do NOT paste an article abstract or a LinkedIn body verbatim. Source material (a WeChat article, a LinkedIn post) is INPUT to be re-cut for X, not the post itself. Re-cut it every time.
Hook the first line. The opening line is the post: it is what shows in-feed and decides the scroll-stop. Lead with one of: a surprising/specific stat, a bold claim, a provocative question, or a concrete value proposition. Put the most counterintuitive fact first. Never open with throat-clearing ("In this post I want to talk about...").
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 185 lines · 70 tokens per session scan A 07e263af75b0
x-api is a skill published in the GitHub repository rockyco/claude-x-plugin (1 stars, last pushed 2mo ago), licensed MIT. It adds 70 tokens to every session and 2,144 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
configuring-oauth2-authorization-flow
Configure secure OAuth 2.0 authorization flows including Authorization Code with PKCE, Client Credentials, and Device Authorization Grant. This skill covers flow selection, PKCE implementation, token.
linkedin-api
Use when composing LinkedIn posts - writes post text and carousel/image assets to a local directory for manual review and publishing. Optimized for the 2026 LinkedIn algorithm (dwell time, Golden Hour, document carousel format).
configuring-oauth2-authorization-flow
Configures secure OAuth 2.0 authorization flows, including Authorization Code with PKCE, Client Credentials, and Device Authorization Grant, covering flow selection, PKCE implementation, token lifecycle management, and scope design per OAuth 2.1. Use when implementing or hardening OAuth 2.0…
This skill should be used when the user asks to "post a tweet", "read timeline", "check twitter", "like a tweet", "retweet", "search twitter", "manage twitter lists", "twitter auth", "get twitter user", "delete tweet", "trending topics", "what's trending", "bookmarks", "bookmark a tweet", "saved tweets", or mentions…
create-site
Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…
review
5-pass structured code review — correctness, security, performance, readability, consistency.