Yandex Metrica Skill for Claude Code
A Claude Code skill for Yandex Metrica built on bash scripts over curl: preset reports, goals, counters and raw log exports
Medium risk
We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.
Why this level
- Reads traffic and conversion data, including commercially sensitive statistics
- The token is requested with the metrika:write scope, though the README documents only reporting scenarios
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/yandex-metrica-skill-for-claude-codeDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Run in a terminal in the project folder
npx skills add elsvv/yandex-metrica-skill --skill yandex-metrica -a claude-code -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Run in a terminal in the project folder
npx skills add elsvv/yandex-metrica-skill --skill yandex-metrica -a cursor -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Run in a terminal in the project folder
npx skills add elsvv/yandex-metrica-skill --skill yandex-metrica -a github-copilot -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Run in a terminal in the project folder
npx skills add elsvv/yandex-metrica-skill --skill yandex-metrica -a codex -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Run in a terminal in the project folder
npx skills add elsvv/yandex-metrica-skill --skill yandex-metrica -a gemini-cli -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Run in a terminal in the project folder
npx skills add elsvv/yandex-metrica-skill --skill yandex-metrica -a cline -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Run in a terminal in the project folder
npx skills add elsvv/yandex-metrica-skill --skill yandex-metrica -a roo -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
A fork of Roo Code, same .roo folders.
Run in a terminal in the project folder
npx skills add elsvv/yandex-metrica-skill --skill yandex-metrica -a opencode -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Install the skill with claude skill install elsvv/yandex-metrica-skill, register an application at oauth.yandex.ru/client/new with metrika:read and metrika:write scopes, then run bash scripts/get_token.sh --client-id your_id and verify with bash scripts/check_connection.sh.
Other ways from the author
claude skill install elsvv/yandex-metrica-skillInstall via Claude Code's built-in skill command.
This is third-party code. Review the repository files before installing.
What it does
The skill gives Claude Code a set of bash scripts over curl for the Yandex Metrica API. check_connection.sh verifies the token and lists counters, counters.sh works with counters, stats.sh builds reports either from ready presets (traffic, sources, geo, content, technology) or from custom metrics, dimensions and dates, goals.sh reads goals, and logs.sh runs the full Logs API cycle: evaluating volume, creating the request, downloading a multi-part file and cleaning up processed logs. Coverage is also described for the Management API: counters, goals, filters, operations, grants, labels, segments, user parameters. The scripts are meant to run strictly via bash with absolute paths, not sourced from zsh.
Who it is for. For people who want Yandex Metrika reports right inside Claude Code without a separate MCP server, via simple bash scripts.
Good fit when
- You want quick preset reports on traffic, sources, geography, content or technology
- You need a raw visit log export via the Logs API
- You prefer a light bash-and-curl skill over running a separate MCP server
Not a fit when
- You need it on Windows without bash: the scripts assume a unix environment
- curl, jq and python3 are not on the system: they are needed for requests, formatted output and URL encoding in filters
Example request
Show me the traffic sources report for counter 12345678 for JanuaryLimitations
The repository metadata does not explicitly declare a license, though the README mentions MIT. curl, jq and python3 are required on the system. The token is requested with metrika:read and metrika:write scopes, though the scripts documented in the README are reporting-focused and do not show explicit write calls. Scripts must be run strictly via bash with absolute paths.
How to disable. Delete the skill folder from ~/.claude/skills/yandex-metrica and revoke the OAuth token at oauth.yandex.ru.
Security check
- Reads traffic and conversion data, including commercially sensitive statistics
- The token is requested with the metrika:write scope, though the README documents only reporting scenarios
README in short
The English README describes the skill as a set of scripts for the Yandex Metrica API: counters, reports, goals, raw log export. It gives a table of five scripts with their purpose, example calls for presets and a custom report with metrics and dimensions, and an example of creating a Logs API request. It separately lists coverage of the Management, Reporting and Logs APIs with a link to the full references/api-reference.md. It states the curl, jq and python3 system requirements, a list of skill activation triggers, and the MIT license.
SKILL.md
--- name: yandex-metrica description: | Работа с Yandex Metrica API: аналитика, отчеты, цели, логи. Use when the user needs web analytics data from Yandex Metrica, traffic stats, conversion reports, goal management, raw log exports, counter management, segments, filters, or grants. Triggers: метрика, metrica, аналитика, счетчик, визиты, конверсии, отчет по трафику, источники трафика, Logs API, экспорт логов. --- # yandex-metrica Yandex Metrica API, web analytics: counters, reports, goals, logs export. ## Config Requires YANDEX_METRICA_TOKEN in config/.env. See config/README.md for token setup (OAuth, permissions: metrika:read, metrika:write). ## Quick Start IMPORTANT: Always run scripts with bash prefix and absolute paths from the skill directory. Scripts use bash-specific features and will not work if sourced from zsh. Do NOT source scripts/common.sh directly, use the wrapper scripts below. ```bash # 1. Setup token bash scripts/get_token.sh --client-id YOUR_CLIENT_ID # 2. Check connection bash scripts/check_connection.sh # 3. List counters bash scripts/counters.sh --action list # 4. Get traffic stats bash scripts/stats.sh --counter 12345678 --preset traffic # 5. Export raw logs bash scripts/logs.sh --action create --counter 12345678 --date1 2025-01-01 --date2 2025-01-31 ``` ## API Overview Base URL: https://api-metrika.yandex.net
FAQ
Are there ready report presets?
Yes, stats.sh supports the traffic, sources, geo, content and technology presets, plus custom metrics and dimensions.
Can raw visit data be exported?
Yes, logs.sh runs the full Logs API cycle: evaluating volume, creating the request, downloading a multi-part file, and cleaning up processed logs.
Related
Official DataLens (Yandex) skills for Claude Code, Codex and OpenCode: SDK, HTML reports and RLS resolution
A Yandex Metrika MCP server generated from the API spec: 108 methods, 10 tools declared by default, transparent filters and response metadata
An open MCP server and agent skill set for SEO: keyword research, competitors, backlinks and site audits powered by DataForSEO
A Claude Code plugin for SEO audits: technical SEO, E-E-A-T, schema, local and AI search via parallel subagents