xcli
Installation
SKILL.md
X CLI Operations
Procedures
Step 1: Identify the Operation
- Determine the intent of the request (e.g., post a tweet, read bookmarks, search users).
- Run
python3 scripts/find-operation.py --search "<keyword>"to locate the matching operation ID. - If the keyword search returns no results, broaden the search or run
python3 scripts/find-operation.py --tag "<tag>"with one of:Tweets,Users,Bookmarks,Lists,Direct Messages,Spaces,Media,Communities,Trends,News. - If uncertain about an operation's parameters, run
xcli spec <operationId>to inspect required and optional fields.
Step 2: Construct the Command
- Read
references/operations.mdto identify the correct parameter format and common field sets for the target operation. - Build the xcli command following these rules:
- Path parameters (e.g., user ID, tweet ID) use
-p "key=value"and auto-substitute in the URL. - Query parameters (e.g.,
tweet.fields,max_results) also use-p "key=value". - Request body fields use
-f "key=value"for simple payloads or-b '{"json": "here"}'for complex nested bodies. - Append
-rwhen piping output or when raw JSON is needed for further processing.
- Path parameters (e.g., user ID, tweet ID) use