x-analytics-cli
X (Twitter) analytics and data retrieval via x-analytics-cli. Use when the user wants to search tweets, count tweet volumes, look up user profiles, get tweet details, or pull a user's timeline from X (formerly Twitter). Triggers: "X analytics", "Twitter analytics", "tweet search", "tweet lookup", "tweet counts", "X user profile", "Twitter user", "tweet timeline", "X API", "Twitter API", "search tweets", "tweet volume", "trending tweets", "X data", "Twitter data".
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/bin-huang/x-analytics-cliX Analytics CLI Skill
You have access to x-analytics-cli, a read-only CLI for the X API v2. Use it to search recent tweets, count tweet volumes over time, look up users and tweets by ID, and retrieve the authenticated user's timeline. All requests use OAuth 1.0a signing.
Quick start
# Check if the CLI is available
x-analytics-cli --help
# Get the authenticated user's profile
x-analytics-cli me
# Search recent tweets
x-analytics-cli search "OpenAI"
If the CLI is not installed, install it:
npm install -g x-analytics-cli
Authentication
The CLI requires four OAuth 1.0a credentials: API Key, API Secret, Access Token, and Access Token Secret. Credentials are resolved in this order:
--credentials <path>flag (per-command)- Environment variables:
X_API_KEY,X_API_SECRET,X_ACCESS_TOKEN,X_ACCESS_TOKEN_SECRET - Auto-detected file:
~/.config/x-analytics-cli/credentials.json
The credentials JSON file must contain these four fields:
{
"api_key": "...",
"api_secret": "...",
"access_token": "...",
"access_token_secret": "..."
}
API access tiers affect which commands are available:
- Free tier -- authenticated user lookup (
me) - Basic or higher -- tweet lookup (
tweet,tweets), user lookup (user), search (search), tweet counts (tweet-counts), timelines (timeline)
Before running any command, verify credentials are configured by running x-analytics-cli me. If it fails with a credentials error, ask the user to set up authentication.
Output format
All commands output pretty-printed JSON by default. Use --format compact for single-line JSON (useful for piping). The only valid format values are json (default) and compact.
Errors are written to stderr as JSON with an error field and a non-zero exit code, e.g. {"error": "Unauthorized - Invalid or expired token"}.
The response shape follows the X API v2 convention: data (primary results), includes (expanded objects), and meta (pagination info). Not all fields are present in every response.
Commands reference
User lookup
me
Get the authenticated user's profile.
x-analytics-cli me
x-analytics-cli me --user-fields public_metrics,description,created_at
x-analytics-cli me --expansions pinned_tweet_id --tweet-fields created_at,public_metrics
Options:
--user-fields <fields>-- user fields to include--expansions <expansions>-- expansions to include--tweet-fields <fields>-- tweet fields to include (useful with expansions)
user
Get a user by username or numeric ID. Accepts usernames with or without the leading @. Numeric IDs are auto-detected and routed to the ID-based endpoint.
x-analytics-cli user elonmusk
x-analytics-cli user @elonmusk
x-analytics-cli user 44196397
x-analytics-cli user elonmusk --user-fields public_metrics,description,created_at
x-analytics-cli user elonmusk --expansions pinned_tweet_id --tweet-fields text
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-bin-huang-x-analytics-cli": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
tiktok-ads-cli
TikTok Ads data analysis and reporting via tiktok-ads-cli. Use when the user wants to check TikTok ad performance, pull campaign/ad group/ad stats, manage audiences, inspect creatives, check pixel tracking, or create async reports. Triggers: "TikTok Ads", "TikTok ad performance", "TikTok campaign stats", "TikTok ad spend", "TikTok report", "TikTok pixel", "TikTok audience", "TikTok creatives", "TikTok ad account", "TikTok ad groups", "TikTok async report".
spotify-ads-cli
Spotify Ads data analysis and reporting via spotify-ads-cli. Use when the user wants to check Spotify ad performance, pull aggregate or insight reports, explore businesses and ad accounts, manage audio creatives, analyze targeting and audiences, track measurement pixels and datasets, or estimate audience/bid ranges. Triggers: "Spotify Ads", "Spotify ad performance", "Spotify campaign stats", "Spotify ad spend", "Spotify insight report", "Spotify aggregate report", "Spotify pixel", "Spotify audience", "Spotify ad account", "Spotify targeting", "Spotify audio ads", "Spotify ad set", "Spotify CSV report", "Spotify bid estimate".
camoufox-cli
Anti-detect browser automation CLI & Skills for AI agents. Use when the user needs to interact with websites with bot detection, CAPTCHAs, or anti-bot blocks, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task that requires bypassing fingerprint checks.
apple-ads-cli
Apple Search Ads data analysis and reporting via apple-ads-cli. Use when the user wants to check Apple Search Ads performance, pull campaign/ad group/keyword stats, explore account structure, inspect ads and keywords, analyze budget orders, or check app eligibility. Triggers: "Apple Ads", "Apple Search Ads", "App Store ads", "apple ad performance", "apple campaign stats", "apple ad spend", "apple keyword report", "apple ads budget", "app eligibility", "search ads".
linkedin-ads-cli
LinkedIn Ads data analysis and reporting via linkedin-ads-cli. Use when the user wants to check LinkedIn ad performance, pull campaign analytics with pivot breakdowns, explore ad account structure, inspect creatives, analyze audiences, retrieve lead form submissions, forecast ad delivery, or get budget recommendations. Triggers: "LinkedIn Ads", "LinkedIn ad performance", "LinkedIn campaign stats", "LinkedIn ad spend", "LinkedIn analytics", "LinkedIn audience", "LinkedIn lead forms", "LinkedIn creatives", "LinkedIn ad account", "LinkedIn targeting", "LinkedIn budget forecast".