# Yandex Auth

> |

- **Type:** Skill
- **Install:** `agentstack add skill-atomachinskiy-claude-yandex-skills-yandex-auth`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [atomachinskiy](https://agentstack.voostack.com/s/atomachinskiy)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [atomachinskiy](https://github.com/atomachinskiy)
- **Source:** https://github.com/atomachinskiy/claude-yandex-skills/tree/main/plugins/yandex-auth/skills/yandex-auth

## Install

```sh
agentstack add skill-atomachinskiy-claude-yandex-skills-yandex-auth
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# yandex-auth — единая точка авторизации

Базовый плагин пакета `claude-yandex-skills`. Без него остальные скиллы (metrika, webmaster, direct, forms и т.д.) не работают — они ходят за токеном сюда.

## Как использовать

### Первый раз (выпустить токен)

```bash
bash plugins/yandex-auth/skills/yandex-auth/scripts/oauth-flow.sh
```

Что произойдёт:
1. Откроется браузер на authorize-странице Яндекса.
2. Юзер логинится под нужным аккаунтом и жмёт «Разрешить».
3. Скрипт ловит `access_token` из адресной строки (юзер копирует и вставляет).
4. Валидирует через `https://login.yandex.ru/info` (узнаёт login + user_id).
5. Сохраняет в `~/.claude/secrets/yandex-app.json` с правами 600.

### Проверить статус

```bash
bash plugins/yandex-auth/skills/yandex-auth/scripts/oauth-flow.sh --status
```

Покажет аккаунт, дату выпуска и проверит токен живым запросом.

### Из других плагинов

Каждый yandex-* плагин в своих скриптах:

```sh
. "$HOME/.claude/skills/yandex-auth/scripts/common.sh"  # путь после установки
yandex_load_token   # экспортирует YANDEX_ACCESS_TOKEN, YANDEX_LOGIN, YANDEX_USER_ID

curl -H "$(yandex_auth_header)" "https://api.metrika.yandex.net/management/v1/counters"
```

## Файл с токеном

`~/.claude/secrets/yandex-app.json`:
```json
{
  "access_token": "...",
  "client_id": "2f69a4396d684385a5f6578dd5eb7863",
  "issued_at": "2026-05-05T15:30:00Z",
  "expires_at_estimate": "2027-05-05T15:30:00Z",
  "yandex_login": "andrey...",
  "yandex_user_id": "1234567"
}
```

⚠️ **Файл секретный.** Права 600. Не коммитить, не пересылать.

## Когда токен умер

Yandex implicit-flow токены живут до ~1 года, могут быть отозваны раньше:
- юзер сменил пароль
- юзер вручную отозвал в `https://id.yandex.ru/security/apps`
- приложение заблокировано Яндексом

Восстановление — `oauth-flow.sh` ещё раз.

## Scope

Scope в authorize-URL не передаём → юзер получает **все scope**, которые
админ вшил в приложение в кабинете `oauth.yandex.ru/client/`.

Если в приложение добавили новый сервис — старый токен новый scope не
покрывает. Нужно переавторизоваться (`oauth-flow.sh`) — Яндекс выдаст
обновлённый токен с расширенным scope.

⚠️ **Wordstat scope** требует ручной заявки в поддержку Яндекса.
Получают не все. Если у юзера нет доступа к Wordstat — общий токен всё
равно работает, просто `yandex-wordstat` будет ловить 403 от Яндекса.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [atomachinskiy](https://github.com/atomachinskiy)
- **Source:** [atomachinskiy/claude-yandex-skills](https://github.com/atomachinskiy/claude-yandex-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-atomachinskiy-claude-yandex-skills-yandex-auth
- Seller: https://agentstack.voostack.com/s/atomachinskiy
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
