ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

x-ads-cli

X Ads data analysis and reporting via x-ads-cli. Use when the user wants to check X/Twitter ad performance, pull campaign/line item/promoted tweet stats, explore ad account structure, inspect media creatives, analyze targeting criteria, check conversion events, or estimate reach. Triggers: "X Ads", "Twitter Ads", "X ad performance", "X campaign stats", "X ad spend", "X analytics", "X targeting", "X audience", "X creatives", "Twitter ad account", "line item performance", "X billing", "promoted tweets".

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/bin-huang/x-ads-cli
Or

X Ads CLI Skill

You have access to x-ads-cli, a read-only CLI for the X Ads API (v12). Use it to query ad accounts, pull synchronous analytics, inspect promoted tweets and media creatives, review targeting criteria, check funding instruments, and estimate reach. Handles OAuth 1.0a signing natively with Node.js crypto -- no external dependencies.

Quick start

# Check if the CLI is available
x-ads-cli --help

# List all accessible ad accounts
x-ads-cli accounts

# Get a specific ad account
x-ads-cli account abc1x2

If the CLI is not installed, install it:

npm install -g x-ads-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:

  1. --credentials <path> flag (per-command)
  2. Environment variables: X_ADS_API_KEY, X_ADS_API_SECRET, X_ADS_ACCESS_TOKEN, X_ADS_ACCESS_TOKEN_SECRET
  3. Auto-detected file: ~/.config/x-ads-cli/credentials.json

The credentials file format:

{
  "api_key": "YOUR_API_KEY",
  "api_secret": "YOUR_API_SECRET",
  "access_token": "YOUR_ACCESS_TOKEN",
  "access_token_secret": "YOUR_ACCESS_TOKEN_SECRET"
}

The Access Token must belong to a user who has access to at least one X Ads account. Ads API access requires separate approval from the X Developer Portal.

Before running any command, verify credentials are configured by running x-ads-cli accounts. If it fails with a credentials error, ask the user to set up authentication.

Entity hierarchy

Ad Account
 +-- Campaign
 |    +-- Line Item (ad group)
 |         +-- Promoted Tweet
 |         +-- Targeting Criteria
 +-- Media Creative
 +-- Card (website, app install, etc.)
 +-- Custom Audience
 +-- Funding Instrument (payment method)
 +-- Conversion Event (web event tag)

Line items sit under campaigns and contain targeting, budget, and bid settings. Promoted tweets are attached to line items.

Monetary values

The X Ads API returns monetary values (e.g., billed_charge_local_micro) in microcurrency -- the value multiplied by 1,000,000. Divide by 1,000,000 to get the actual amount in the major currency unit. For example, 5000000 means $5.00.

Output format

All commands output pretty-printed JSON by default. Use --format compact for single-line JSON (useful for piping).

Pagination for listing commands uses cursor-based --cursor values from the next_cursor field in the response.

Commands reference

Account discovery

# List all accessible ad accounts
x-ads-cli accounts

# Include deleted accounts
x-ads-cli accounts --with-deleted

# Get a specific ad account
x-ads-cli account abc1x2

accounts options:

  • --with-deleted -- include deleted accounts

account takes a single required argument: the account ID.

Campaigns

# List all campaigns for an account
x-ads-cli campaigns abc1x2

Metadata

Author@bin-huang
Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-bin-huang-x-ads-cli": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.

Related Skills

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".

bin-huang 4473

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".

bin-huang 4473

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".

bin-huang 4473

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.

bin-huang 4473

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".

bin-huang 4473