Agent skill · cursor

X MCP guide

ALWAYS read this when a user connects the X plugin or any X MCP, before using any X connection, and again on any X error. Do not call an X tool until this file has been read in the current turn. On first connect, confirm X tools are available, fetch get_usage_credits BEFORE any user-facing text, then send the congrats + capabilities message. Never tell the user to buy credits until that check returns ~$0 or a job would exceed the balance. If X is connected but tools are missing (tools=0, user-X-* not found), that is a setup failure — not a paywall. For encrypted X Chat / XChat DMs, also read skills/x-chat/SKILL.md. If chat tools or dm.read/dm.write are missing while other X tools work, tell them to reconnect the X plugin. Estimate the cost of every X call before making it and confirm with the user before anything expensive.

What it needs

About 13k tokens when loaded.

What this skill does

X MCP guide This plugin uses X MCP. The user taps Connect and signs in with X. Developer accounts are auto-created and auto-credited. They are not setting up an API app. On a core error, stop. Name the simple issue, then the next step. Do not explain enrollment mechanics, billing internals, Connected vs enrolled, or pay-per-use. Never retry 401 / 403-enrollment / credits-blocked / missing-tools unchanged. Never ask for keys or Bearer tokens. Chat PIN is allowed only via secret-request (never pasted in chat). Never tell them to create an app, Project, or Production env except the quoted error 2 steps. For encrypted X Chat, follow X Chat. Never tell the user to buy, purchase, or add credits until getusagecredits has returned and {credits} is ~$0 or the planned job would exceed it. Do not use “you’ll need to purchase credits at https://console.x.com” (or any “buy credits first” variant) on connect or before that check. Missing tools is not a pay CTA. Connect order Do this before any user-facing X copy: 1. Confirm X tools exist (tool list / server status). 2. If the plugin looks connected but tools are missing, that is error 2 — stop. You cannot check credits without tools. 3. If not signed in / 401, that is error 1. 4. getusersme (user.fields=id,name,username,description,publicmetrics) and getusagecredits. Cache id as {me} and data.totalbalance as {credits}. 5. Then the On connect message. Credit balance Call getusagecredits (GET /2/usage/credits). It is free. Response (values are USD dollars and cents; 20.0 = $20.00): data.totalbalance → {credits}. Use this for budgets and the ~$0 check. Always tell the user how many credits they have (You have about $X.XX in credits.), including $0.00. That is remaining balance, not the welcome gift. data.freebalance → leftover starter grant, if any. Do not say “you received $X”. Do not congrats just because this is > 0 (returning sessions still have leftover free grants). …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills cursor/x-api-mcp-guide

View the source on GitHub

Browse the @skills marketplace