Hopkin – Paid Ads: Meta, TikTok, Google, LinkedIn, Reddit
by @nemo
Query ad platform data (Meta, Google, LinkedIn, Reddit) using the Hopkin CLI. Use this skill when the user asks about ad accounts, campaigns, ad performance,...
clawhub install hopkin-paid-ads📖 About This Skill
name: hopkin-skill description: Query ad platform data (Meta, Google, LinkedIn, Reddit) using the Hopkin CLI. Use this skill when the user asks about ad accounts, campaigns, ad performance, or any advertising platform data. version: 0.1.0
Hopkin CLI Skill
When to Use
Use this skill when the user:
Do NOT use this skill for:
Setup
Installation
Before using Hopkin, ensure it's installed and up to date:
# Install globally from npm
npm install -g @hopkin/cliOr if already installed, check if an update is needed (do this if last check was >7 days ago)
npm outdated -g @hopkin/cli && npm install -g @hopkin/cli@latest
Authentication
Check if the user is authenticated before making any data requests:
hopkin auth status --json
If not authenticated, ask the user for their API key:
hopkin auth set-key
Users can get an API key from https://app.hopkin.ai/settings/api-keys
Discover Available Commands
After authenticating, run hopkin --help to see all platforms, commands, and global flags. This also automatically refreshes the tool cache if it's stale (cache lasts 7 days).
hopkin --help
Then drill down into a specific platform to see its resources and commands:
hopkin meta --help
hopkin google --help
hopkin linkedin --help
hopkin reddit --help
And further into a resource to see its verbs and a specific command to see its flags:
hopkin meta campaigns --help
hopkin meta campaigns list --help
Always use --help to discover what's available before guessing command names — platforms differ in their resource naming and available tools.
How to Use
Query Data
The CLI follows a consistent pattern:
hopkin [verb] [flags]
meta, google, linkedin, redditad-accounts, campaigns, adsets, ads, etc.list, get (defaults to list if omitted)--reason (required for most commands), --account, --limit, etc.Common Commands
# List ad accounts
hopkin meta ad-accounts list --reason "checking accounts" --json
hopkin google accounts list --reason "listing accounts" --jsonList campaigns for an account
hopkin meta campaigns list --account --reason "reviewing campaigns" --jsonGet performance insights
hopkin meta insights --account --reason "performance review" --jsonPing a platform (health check)
hopkin meta ping --reason "connectivity test" --json
Format Output
Always use --json when processing data programmatically. Other formats are available:
# JSON (best for parsing)
hopkin meta ad-accounts list --reason "..." --jsonCSV (for spreadsheet export)
hopkin meta ad-accounts list --reason "..." --format csvTSV
hopkin meta ad-accounts list --reason "..." --format tsvFilter specific fields
hopkin meta ad-accounts list --reason "..." --json --fields id,name,currencyFetch all pages (for large result sets)
hopkin meta ad-accounts list --reason "..." --json --all
Important Notes
--reason flag: Most commands require --reason "..." for audit trail purposes. Always include a brief, honest description of why you're querying the data.--account . List accounts first to discover available IDs.--all to fetch everything, or --limit N to control page size.--refresh to a command if the user needs real-time data.accounts (not ad-accounts), LinkedIn has campaign-groups and creatives (not adsets and ads). Always check hopkin --help first.Update Check
Before each session where you use Hopkin, check if the CLI needs updating. Do this if you haven't checked in the last 7 days:
hopkin --version
npm view @hopkin/cli version
If the npm version is newer, update:
npm install -g @hopkin/cli@latest
Troubleshooting
# Check auth status
hopkin auth status --jsonDebug a failing command
hopkin meta ad-accounts list --reason "debug" --json --debugRe-authenticate
hopkin auth set-key Re-discover available commands (also refreshes tool cache)
hopkin --help
⚡ When to Use
⚙️ Configuration
Installation
Before using Hopkin, ensure it's installed and up to date:
# Install globally from npm
npm install -g @hopkin/cliOr if already installed, check if an update is needed (do this if last check was >7 days ago)
npm outdated -g @hopkin/cli && npm install -g @hopkin/cli@latest
Authentication
Check if the user is authenticated before making any data requests:
hopkin auth status --json
If not authenticated, ask the user for their API key:
hopkin auth set-key
Users can get an API key from https://app.hopkin.ai/settings/api-keys
Discover Available Commands
After authenticating, run hopkin --help to see all platforms, commands, and global flags. This also automatically refreshes the tool cache if it's stale (cache lasts 7 days).
hopkin --help
Then drill down into a specific platform to see its resources and commands:
hopkin meta --help
hopkin google --help
hopkin linkedin --help
hopkin reddit --help
And further into a resource to see its verbs and a specific command to see its flags:
hopkin meta campaigns --help
hopkin meta campaigns list --help
Always use --help to discover what's available before guessing command names — platforms differ in their resource naming and available tools.
📋 Tips & Best Practices
# Check auth status
hopkin auth status --jsonDebug a failing command
hopkin meta ad-accounts list --reason "debug" --json --debugRe-authenticate
hopkin auth set-key Re-discover available commands (also refreshes tool cache)
hopkin --help