yandex-analytics-methodology
Skill4 starsChanged 29 days agoMITView on GitHub
[TOOL] Unified Yandex analytics hub configuration (shared tokens, cross-service workflows across Webmaster, Metrika, Wordstat, Direct, Search, seo-auditing, semantic-drift). Preloaded by marketing-web-analyst agent.
- Reads credentials
In this repository48 other files it gives its agents.
- skills/dev-methodology/references/agents.mdAGENTS.md
- skills/skill-authoring/references/agents.mdAGENTS.md
- acceptance-protocolSkill
- agency-intakeSkill
- ai-visibility-methodologySkill
- banner-design-guideSkill
- benchmark-researchSkill
- brand-methodologySkill
- code-reviewingSkill
- code-writingSkill
- codex-bridgeSkill
- deploy-pipelineSkill
- design-assets-guideSkill
- design-system-methodologySkill
- design-task-decompositionSkill
- dev-methodologySkill
- docs-pipelineSkill
- documentation-writingSkill
- engagement-contractSkill
- engagement-protocolSkill
- feature-researchSkill
- human-voiceSkill
- infrastructure-setupSkill
- marketing-task-decompositionSkill
- post-deploy-qaSkill
- pre-deploy-qaSkill
- presentation-designSkill
- project-planningSkill
- prompt-engineeringSkill
- security-auditingSkill
- semantic-drift-methodologySkill
- seo-auditingSkill
- skill-authoringSkill
- skill-test-designSkill
- skill-testingSkill
- system-optimization-protocolSkill
- task-decompositionSkill
- tech-spec-planningSkill
- testing-methodologySkill
- ui-styling-guideSkill
- ui-ux-methodologySkill
- user-spec-planningSkill
- validation-pipelineSkill
- yandex-direct-guideSkill
- yandex-metrika-guideSkill
- yandex-search-guideSkill
- yandex-webmaster-guideSkill
- yandex-wordstat-guideSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
Run bash scripts/check.sh to verify which services are configured.
- Distinctive: line 108
All four use the same OAuth token if you add all scopes when creating the app.
- Distinctive: line 147
Search API использует совершенно другую авторизацию (API-ключ Yandex Cloud, не OAuth)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
yandex-analytics
Informational skill — unified Yandex analytics hub with single config and cross-service workflows.
Config
Single config file for all Yandex services: config/.env
# === OAuth Token (Webmaster + Metrika + Direct + Wordstat) ===
# One token with all scopes — see config/README.md for setup
YANDEX_OAUTH_TOKEN=y0_your_token
# === Metrika ===
# Counter ID is PER-PROJECT — pass via --counter flag when running metrika scripts
# Set here only as default if you mostly work with one site:
# YANDEX_METRIKA_COUNTER=12345678
# === Yandex Cloud Search API v2 ===
YANDEX_SEARCH_API_KEY=your_api_key
YANDEX_CLOUD_FOLDER_ID=your_folder_id
# === Optional: Direct sandbox ===
# YANDEX_DIRECT_SANDBOX=true
# YANDEX_DIRECT_LOGIN=agency_client_login
# === Semantic Drift ===
# No API keys needed — uses local sentence-transformers modelNote: Metrika counter ID varies per project. All metrika scripts accept --counter ID flag.
Run bash scripts/check.sh to verify which services are configured.
Architecture
This skill is an orchestrator over individual Yandex skills:
yandex-analytics/ <- unified entry point
config/.env <- SINGLE config for all services
scripts/
check.sh <- verify all connections
sync-config.sh <- propagate config to individual skills
dashboard.sh <- quick status of all services
SKILL.md <- this file
yandex-webmaster/ <- indexing, queries, diagnostics
yandex-metrika/ <- traffic, behavior, conversions
yandex-wordstat/ <- search demand, semantics
yandex-direct/ <- ad campaigns, statistics
yandex-search/ <- SERP positions, competitors
seo-audit/ <- comprehensive SEO audit orchestrator
semantic-drift/ <- topical drift analysisSetup (one-time)
Step 1: Configure tokens
cp config/.env.example config/.env
# Edit config/.env with your tokensStep 2: Sync config to all skills
bash scripts/sync-config.shThis propagates the unified config to individual skill config directories.
Step 3: Verify connections
bash scripts/check.shQuick Reference
What do I need for...?
| Task | Required Services | Command |
| Site traffic overview | Metrika | bash ~/...metrika/scripts/overview.sh --counter ID |
| Check indexing | Webmaster | bash ~/...webmaster/scripts/indexing.sh |
| Search positions | Search XML | bash ~/...search/scripts/positions.sh |
| Keyword research | Wordstat | bash ~/...wordstat/scripts/top_requests.sh |
| Ad campaign stats | Direct | bash ~/...direct/scripts/report.sh |
| Full SEO audit | All | invoke seo-auditing skill |
| Semantic drift | Webmaster + Metrika | python ~/...semantic-drift/scripts/analyze.py |
Token Scopes Required
| Service | OAuth Scope |
| Webmaster | Яндекс.Вебмастер -> Получение информации о сайтах |
| Metrika | Яндекс.Метрика -> Получение статистики, чтение параметров |
| Direct | Яндекс.Директ -> Управление кампаниями, Получение статистики |
| Wordstat | API Вордстата |
All four use the same OAuth token if you add all scopes when creating the app.
Нюансы регистрации
Wordstat API
- Использует OAuth-токен (тот же, что Вебмастер/Метрика), но требует отдельное одобрение доступа к API
- Ошибка без одобрения: 403 Forbidden
- Как получить доступ: отправить запрос через поддержку Яндекс Директа с логином и ClientId из OAuth-приложения
- Одобрение Wordstat и Direct — отдельные процессы, одно может быть одобрено без другого
- После одобрения существующий OAuth-токен сразу работает — новый токен получать не нужно
Direct API
- Использует тот же OAuth-токен, тоже требует отдельное одобрение доступа к API
- Ошибка без одобрения: код 58 «Незавершенная регистрация»
- Как получить доступ:
- Зайти на
direct.yandex.ru→ Настройки (шестерёнка) → Настройки API - Вкладка «Мои заявки» → «Новая заявка»
- Прямая ссылка:
https://direct.yandex.ru/registered/main.pl?cmd=apiSettings - Указать ClientId из OAuth-приложения, описать назначение
- Ждать от 1 часа до 3 рабочих дней (рассмотрение пн-пт 10:00-19:00 МСК)
- Зайти на
- Одна заявка на приложение — покрывает всех пользователей этого приложения
Search API v2 (Yandex Cloud)
- Не использует OAuth — полностью отдельная авторизация через Yandex Cloud
- Старый XML API (
xml.yandex.ru) мёртв с ~2025 года (ошибка 4002) - Шаги настройки:
- Зарегистрироваться в
console.yandex.cloud - Создать сервисный аккаунт
- Назначить роли:
search-api.executor+search-api.webSearch.user(обе обязательны) - Создать API-ключ для сервисного аккаунта
- Скопировать folder ID из консоли Cloud (выпадающий список слева вверху → копировать ID)
- Зарегистрироваться в
- Частая ошибка: неправильный folder ID. Каталог должен быть в том же облаке, где у сервисного аккаунта назначены роли
- API асинхронный: POST для отправки запроса → опрос endpoint операций → получение XML в base64
- Тарификация: оплата за запрос (бесплатного лимита, как у старого XML API, нет)
Общие советы
- Создавайте одно OAuth-приложение со всеми скоупами на
oauth.yandex.ru/client/new— экономит время - Скоупы для включения: Вебмастер, Метрика, Директ, Вордстат (4 галочки)
- После создания OAuth-приложения всё равно нужно отдельно подать заявки на доступ к API Директа и Вордстата
- Search API использует совершенно другую авторизацию (API-ключ Yandex Cloud, не OAuth)
Workflow Examples
"How's the site doing?" (quick dashboard)
bash scripts/dashboard.sh --host https://example.comRuns: Metrika overview + Webmaster summary + SQI. Shows combined metrics.
"Full SEO audit"
Invoke the seo-auditing skill — it will use data from all configured services.
"Semantic drift analysis"
# Resolve skills root (default ~/.claude/skills, override via SKILLS_ROOT env)
SKILLS_ROOT="${SKILLS_ROOT:-$HOME/.claude/skills}"
# 1. Collect data
bash "$SKILLS_ROOT"/yandex-webmaster/scripts/search_queries.sh \
--host https://example.com --limit 500 --csv /tmp/queries.csv
# 2. Analyze
python "$SKILLS_ROOT"/semantic-drift/scripts/analyze.py \
--queries /tmp/queries.csv --output /tmp/drift.html"Research keyword + check position + see traffic"
# 1. Demand in Wordstat
bash "$SKILLS_ROOT"/yandex-wordstat/scripts/top_requests.sh \
--phrase "купить кирпич" --regions 213
# 2. Current position
bash "$SKILLS_ROOT"/yandex-search/scripts/positions.sh \
--domain example.com --query "купить кирпич" --region 213
# 3. Current traffic to related pages (pass counter ID for the project)
bash "$SKILLS_ROOT"/yandex-metrika/scripts/pages.sh --counter 12345678 --url "/kirpich/"Limits Summary
| Service | Rate Limit | Daily Limit |
| Webmaster | ~5 req/s | depends on token |
| Metrika | ~5 req/s | depends on token |
| Wordstat | 10 req/s | 1000 req/day |
| Direct | 5 req/s | reports async |
| Search API v2 | 1 req/s | pay-per-use |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

