google-ads · acedatacloud — скилл для Claude Code: что делает и как установить
Скилл для Claude Code запрашивает через Google Ads API кампании, группы объявлений, ключевые слова и расходы. Получает данные о кликах и конверсиях для отчётов.
Apache-2.0 177 установок ★ 17 обновлён 2026-10-25
npx skills add AceDataCloud/Skills --skill google-ads -a claude-codeЧто делает google-ads
Скилл обращается к Google Ads API через curl и jq, получает доступные аккаунты и выполняет запросы GAQL методом searchStream. Он умеет читать данные кампаний, групп объявлений, ключевых слов и аккаунта, включая расходы, клики и конверсии. Результаты потокового ответа нужно разворачивать из .results[], а стоимость в metrics.cost_micros переводится делением на 1e6.
Для запросов нужны OAuth-токен пользователя в GOOGLE_ADS_TOKEN и токен разработчика в GOOGLE_ADS_DEVELOPER_TOKEN. Для обращений через управляющий аккаунт добавляется login-customer-id; при прямом доступе этот заголовок не нужен. Идентификатор клиента в URL и заголовках пишется только цифрами. Без GOOGLE_ADS_DEVELOPER_TOKEN коннектор не запускает запросы, потому что API вернёт ошибку авторизации.
Какие задачи решает
- получить доступные аккаунты Google Ads
- собрать расходы кампаний за период
- сравнить клики и конверсии по кампаниям
- выгрузить данные групп объявлений и ключевых слов
- разобраться с доступом через управляющий аккаунт
Примеры запросов агенту
- Покажи доступные мне аккаунты Google Ads и их идентификаторы.
- Собери расходы, клики и конверсии по кампаниям за последние 30 дней.
- Проверь данные кампании для клиента
1234567890через управляющий аккаунт.
Как установить google-ads
1Через Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill google-ads -a claude-code2Вручную: положить файлы
~/.claude/skills/google-ads/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/google-ads/
1Через Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill google-ads -a codex2Вручную: положить файлы
.agents/skills/google-ads/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill google-ads -a cursor2Вручную: положить файлы
.cursor/skills/google-ads/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install AceDataCloud/Skills skills/google-ads2Вручную: положить файлы
.github/skills/google-ads/SKILL.md1Через Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill google-ads -a gemini-cli2Командой платформы
gemini skills install https://github.com/AceDataCloud/Skills --path skills/google-adsВручную: положить файлы
.devin/skills/google-ads/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill google-ads -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о google-ads
Как установить google-ads в Claude Code?
Выполните npx skills add AceDataCloud/Skills --skill google-ads -a claude-code, затем проверьте файл ~/.claude/skills/google-ads/SKILL.md.
Что делает google-ads?
Скилл читает Google Ads через API и GAQL searchStream: получает доступные аккаунты, данные кампаний, групп объявлений, ключевых слов, расходов, кликов и конверсий.
Что нужно для работы google-ads через Google Ads API?
Нужны GOOGLE_ADS_TOKEN с OAuth-доступом и GOOGLE_ADS_DEVELOPER_TOKEN. Для запросов в контексте MCC добавляется GOOGLE_ADS_LOGIN_CUSTOMER_ID, а идентификатор клиента передаётся цифрами без дефисов.
Исходный текст
SKILL.md · Apache-2.0
---
name: google-ads
description: Query Google Ads campaigns, ad groups, keywords and spend via the Google Ads API (GAQL searchStream). Use when the user mentions Google Ads, ad campaigns, ad spend / cost, impressions / clicks / conversions on ads, or campaign performance.
when_to_use: |
Trigger when the user wants Google Ads reporting — list accessible
customers, campaign / ad-group / keyword performance, spend and
conversions. Read via GAQL. Needs the OAuth token PLUS a platform
developer token; if the developer token is absent the connector
isn't fully provisioned yet — tell the user.
connections: [google/ads]
allowed_tools: [Bash]
license: Apache-2.0
metadata:
author: acedatacloud
version: "1.0"
---
Query the **Google Ads API** via `curl + jq`. Two credentials plus one context
header:
- `$GOOGLE_ADS_TOKEN` — the user's OAuth bearer (`adwords` scope) →
`Authorization: Bearer $GOOGLE_ADS_TOKEN`
- `$GOOGLE_ADS_DEVELOPER_TOKEN` — the platform's developer token (injected
server-side) → header `developer-token: $GOOGLE_ADS_DEVELOPER_TOKEN`
- `login-customer-id` — **only for manager (MCC) scoped calls**: the manager id
the request runs under, or `$GOOGLE_ADS_LOGIN_CUSTOMER_ID` if set (digits
only, no dashes). Not needed by `customers:listAccessibleCustomers`.
> **API version:** the base is `https://googleads.googleapis.com/<vNN>`. Google
> ships a new `vNN` every ~4 months and retires old ones, so a hardcoded version
> eventually stops working. The example uses `v25` (supported as of 2026-07). If
> **every** call 404s, the version is unavailable — either retired or not yet
> released. Probe `customers:listAccessibleCustomers`: a supported version
> answers 401/200, an unavailable one 404. Step **down** one version at a time
> from the example, and check Google's supported-versions table before assuming
> a newer `vNN` exists.
If `$GOOGLE_ADS_DEVELOPER_TOKEN` is empty, the connector isn't fully provisioned —
say so rather than calling the API (it would 401/DEVELOPER_TOKEN_NOT_APPROVED).
```bash
VER="v25"; BASE="https://googleads.googleapis.com/$VER"
AUTH="Authorization: Bearer $GOOGLE_ADS_TOKEN"; DEV="developer-token: $GOOGLE_ADS_DEVELOPER_TOKEN"
# Customers the OAuth user can access (ids are returned as customers/<id>)
curl -sS -H "$AUTH" -H "$DEV" "$BASE/customers:listAccessibleCustomers" | jq '.resourceNames'
```
## Report with GAQL (searchStream)
```bash
CID="1234567890" # target customer id, digits only
# Manager (MCC) access → send login-customer-id; direct access → drop the header.
# Array, not a plain string: the header value contains a space and would split.
LOGIN=(); [ -n "$GOOGLE_ADS_LOGIN_CUSTOMER_ID" ] && LOGIN=(-H "login-customer-id: $GOOGLE_ADS_LOGIN_CUSTOMER_ID")
curl -sS -H "$AUTH" -H "$DEV" "${LOGIN[@]}" \
-H "Content-Type: application/json" -d '{
"query":"SELECT campaign.name, metrics.cost_micros, metrics.clicks, metrics.conversions FROM campaign WHERE segments.date DURING LAST_30_DAYS ORDER BY metrics.cost_micros DESC"
}' "$BASE/customers/$CID/googleAds:searchStream" \
| jq '.[].results[]? | {campaign: .campaign.name, cost_usd: (.metrics.costMicros|tonumber/1e6), clicks: .metrics.clicks, conv: .metrics.conversions}'
```
GAQL resources: `campaign`, `ad_group`, `ad_group_criterion` (keywords),
`customer`. Cost is `metrics.cost_micros` (÷ 1,000,000 = account currency).
## Gotchas
- **A 404 on *every* endpoint points at `VER`, not at credentials** — the
version is retired or unreleased. A 404 on a *single* call is about that call:
a missing resource (bad customer id) or a wrong path. Sanity-check the version
with `customers:listAccessibleCustomers` before debugging auth.
- **Two credentials plus a context header.** `developer-token` is required on
every call; `login-customer-id` is only needed when acting under a manager
(MCC) account — `customers:listAccessibleCustomers` works without it. Omitting
it on a manager-scoped call is the #1 cause of 401/403 here.
- Customer ids are **digits only** in URLs/headers (strip the dashes from
`123-456-7890`).
- `searchStream` returns an array of chunks each with `.results[]` — flatten with
`.[].results[]?`.
- Cost is in **micros** of the account currency; divide by 1e6.
© acedatacloud · Apache-2.0 · AceDataCloud/Skills
Похожие скиллы
Все скиллы по теме «Маркетинг и контент» →Сначала — google-ads от других авторов.