agentsclimarketplace

Semrush cli setup

Skill osodevops/intelligence-layer-skills/skills/semrush-cli-setup

Agent Skills for Semrush CLI SEO, paid search, backlinks, traffic, local SEO, and batch workflows

Install
npx -y skills add osodevops/intelligence-layer-skills --skill semrush-cli-setup

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Install, configure, validate, and troubleshoot the semrush CLI. Use when the user needs Semrush API auth, SEMRUSH_API_KEY or SEMRUSH_OAUTH_TOKEN setup, output/cache/rate-limit configuration, shell completions, API balance checks, structured error handling, or a prerequisite check before running other Semrush CLI skills.

SKILL.md

4.0 KB, as published. Nobody here has run it

Semrush CLI Setup

Prepare the semrush CLI for agent-safe Semrush API work. Use this skill before domain, keyword, backlink, paid search, local SEO, traffic, or batch workflows when install state, credentials, output format, or API units are uncertain.

Baseline Checks

Run non-destructive checks first:

command -v semrush
semrush --version
semrush account auth status --output json --quiet
semrush account balance --output json --quiet
semrush cache stats --output json --quiet

If semrush is missing, install the semrush binary from the package source approved for the current project, then verify it is on PATH:

semrush --version

Use Rust 1.80+ when installing from source.

Authentication

Prefer environment variables for agent sessions:

export SEMRUSH_API_KEY="<set-locally>"
export SEMRUSH_OAUTH_TOKEN="<set-locally>"

Use SEMRUSH_API_KEY for v3 analytics endpoints: domain, keyword, backlink, trends, overview, account balance, and batch recipes. Use SEMRUSH_OAUTH_TOKEN for v4 endpoints: project and local SEO.

Use this precedence model when debugging auth:

  1. --api-key flag
  2. SEMRUSH_API_KEY environment variable
  3. ~/.config/semrush/config.toml

Config file shape:

[auth]
api_key = "<set-locally>"

[defaults]
database = "us"
output = "json"
cache_ttl = 3600

[rate_limit]
requests_per_second = 10

[cache]
enabled = true

Agent Defaults

For machine parsing, force JSON and suppress non-data noise:

semrush domain overview example.com --database us --output json --quiet

Use --dry-run before broad, expensive, or unfamiliar calls:

semrush domain organic example.com --limit 1000 --dry-run --output json --quiet

Use cache intentionally:

semrush cache stats --output json --quiet
semrush domain overview example.com --cache-ttl 86400 --output json --quiet
semrush domain overview example.com --no-cache --output json --quiet
semrush cache clear

Global Options

Recognize and apply these options across workflows:

OptionUse
--database usRegional database such as us, uk, de, or mobile-us.
--limit 100Cap result count before parsing or exporting.
--offset 0Page through large result sets.
--output jsonMachine-readable output for analysis.
--output csvSpreadsheet export.
--output jsonlStreaming-friendly export for large lists.
--quietSuppress non-data messages.
--verboseDebug unexpected behavior.
--dry-runEstimate API unit cost without calling the API.

Error Handling

Treat CLI exit codes as actionable signals:

ExitMeaningNext action
0SuccessParse stdout.
1Auth errorCheck API key, OAuth token, config precedence, and plan access.
2Rate limitRetry later or reduce batch size.
3Input errorFix command, required args, region, filters, or limits.
4API/network errorRetry with --verbose; check Semrush status and network.

When a command fails, do not infer metrics. Report the failing command, stderr summary, exit code, and the smallest next diagnostic command.

Related Skills

  • Use semrush-keyword-research for keyword expansion, difficulty, questions, and SERP ranking domains.
  • Use semrush-competitor-research for organic domain and content gap work.
  • Use semrush-backlink-audit for off-page and authority analysis.
  • Use semrush-paid-search-intelligence for paid keyword, ad copy, and PLA research.
  • Use semrush-traffic-trends for traffic source, geo, page, and trend analysis.
  • Use semrush-local-seo for local listings and map-rank workflows.
  • Use semrush-batch-workflows for reusable multi-step recipes.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.