google-ads
できること
このスキルは、tregコネクタを通じてGoogle Adsのキャンペーンを分析したり変更したりするときの落とし穴を挙げます。広告の効果、支出、入札、予算を扱うマーケターやエージェント向けです。
使う場面
- ✓Google Adsの広告の効果や支出を分析するよう頼まれたとき。
- ✓Google Adsのキャンペーン、予算、入札を作成または変更する必要があるとき。
- ✓メディアの購入を行っていて、高くつくAPIのミスを避けたいとき。
スキルのリンク
https://github.com/superdesigndev/treg/blob/main/.agents/skills/google-ads/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“先月のGoogle Adsのキャンペーンの成果を確認し、支出がどこに行ったかを教えてもらえますか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、まず落とし穴のリストを読み、接続のリストからアカウントを選び、正しいAPIのバージョンを固定します。その後、キャンペーンのデータを読み、有効に見える誤った答えのエラーに注意しながら結果を報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Google Ads via treg — the traps
Verified live on 2026-07-22 against a live account, via treg call google-ads.
Each trap is tagged with how many independent agents hit it when working without this file, so
you know which are real and which are here for insurance.
Account id: treg connections ls → the google-ads row; treg connections resources <id> to list.
Never guess an account id — you may be spending someone else's money.
1. Pin the API version — there is no discovery ⚠️ 2/2 agents hit this
Paths are versioned and a wrong guess returns a Google HTML 404, not JSON. Nothing in the API
or in treg tool ls reports the current version — one agent burned five calls walking v14→v18
before recovering the answer from the treg calls audit log.
Use v25 (released 2026-07-22, live-verified through the proxy 2026-08-17; sunsets ~Aug 2027).
Do not guess downward.
Two different failures, two different fixes:
- HTML 404 — the version never existed (you guessed too high, or typo'd the path).
- JSON 400
UNSUPPORTED_VERSION— the version existed and has been sunset. Google ships a major roughly quarterly and each lives ~12 months, so a pin that worked for months dies on a date, not on a deploy. v21 died this way on 2026-08-05. Always jump to the newest GA version, not the next one up — the next one up may be months from its own sunset.
Release notes and sunset dates: https://developers.google.com/google-ads/api/docs/sunset-dates
2. contains_eu_political_advertising is required on campaign create ⚠️ 3/3 hit this
Absent from essentially every code sample. Campaign create fails REQUIRED without it:
"containsEuPoliticalAdvertising": "DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING"
3. Bidding strategy must be the sub-message, not the enum ⚠️ 1/2 hit this
"biddingStrategyType":"TARGET_SPEND" alone fails REQUIRED on campaign_bidding_strategy. It's
a protobuf oneof — send the field itself: "targetSpend":{}, "manualCpc":{},
"maximizeConversions":{}. The enum is output-only.
4. Removing a parent orphans children — and their status lies ⚠️ 2/2 confused by this
Remove a campaign and its ad groups/criteria/ads become immutable but keep reporting their old
status — a removed campaign's ad group still reads ENABLED. Mutating one returns
OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE.
Verify teardown on campaign.status, never on a child's. Checking the child looks like cleanup
silently failed. Remove campaign first, then its budget — the budget is not removed for you, and an
orphaned budget is easy to leave behind.
Nothing is ever hard-deleted: REMOVED is terminal. Filter with WHERE campaign.status != 'REMOVED'
or your campaign list fills with corpses.
5. Money is in micros ✅ 0/2 got this wrong — kept for asymmetry
amountMicros: 3000000 = $3.00/day. Both agents handled this correctly, so it is not a common
failure — but a 10⁶ slip creates a $3,000/day budget that the API accepts without any error, and
it is the only mistake here that spends money silently. Compute dollars * 1_000_000 explicitly and
re-read it before sending.
Currency is not always USD — the account may bill in a non-USD currency (e.g. AUD):
SELECT customer.currency_code, customer.time_zone FROM customer
6. updateMask controls what changes
{"operations":[{"updateMask":"amount_micros",
"update":{"resourceName":"customers/<CID>/campaignBudgets/<BID>","amountMicros":3000000}}]}
Only listed fields change; a field you set but don't list is ignored, one you list but don't set is
cleared. Both amount_micros and amountMicros are accepted (verified).
7. login-customer-id failures look like auth failures
Acting on a client account under a manager needs the header:
treg call google-ads "<path>" --method POST --header 'login-customer-id: 9876543210' --data '...'
A wrong or unauthorised value returns 401 UNAUTHENTICATED, not a targeting error. Check the
header before debugging OAuth.
validateOnly — free insurance on any mutation
{"validateOnly":true,"operations":[...]} // returns {} on success, changes nothing
Verified: a validateOnly budget change returned {} and left the value untouched. Neither
unskilled agent used it and neither needed it — their mistakes were rejected by the API anyway. Its
real value is the case they never hit: a mutation that is **val
よくある質問
なぜアカウントIDを慎重に推測するのですか?
間違ったアカウントでは、他人のお金を使ってしまうかもしれないと警告しています。
どのAPIバージョンを使いますか?
現在の固定すべきバージョンとしてv25を挙げ、古いバージョンを推測することを避けるよう警告しています。
バージョンが廃止されたらどうなりますか?
廃止されたバージョンは特定のエラーを返すため、エージェントは最新の安定版に移るべきだとしています。
詳細
作者による元の説明
Traps when running Google Ads through treg — the API requirements and cleanup semantics that cost round-trips or money. Use whenever asked to analyse ad performance, audit spend, create or change campaigns, adjust budgets or bids, or do media buying.
repo: superdesigndev/treg
人気
- GitHubのスター
- 7.0k
- ランキング
- #13697
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
code-quality
7.0kエージェントに、明確なコードの基準を教えます。機械で規則を強制する、コメントはまれにする、テストが失敗しうるようにする、ドキュメントは短く保つ、などです。
google-analytics
7.0kエージェントが、部分的な日付や誤ったゼロを避けて、Google Analytics 4から正確なトラフィック、コンバージョン、収益の数字を得られるよう支援します。
google-search-console
7.0kエージェントが、Search Consoleから有機検索のクリック、表示回数、順位を報告し、直近の不完全な日を減少と誤認しないよう支援します。
portrait-clone
7.0kエージェントが人物の参考写真を、見た目のすべてを固定した一つの詳細なJSON画像プロンプトに変換できるよう支援します。
似ているスキル
xurl
394k認証済みのxurlツールを使い、Xに投稿、返信、検索、閲覧し、ダイレクトメッセージを送り、メディアをアップロードするようエージェントを支援します。
connections-optimizer
280kソーシャルネットワークのつながりを改善します。フォローやフォロー解除の候補を提案し、パーソナライズされたメッセージの作成を支援して、ネットワークを広げます。
content-engine
280kさまざまなプラットフォーム向けのコンテンツを作成します。X、LinkedIn、YouTubeなどのネットワークで効果的な投稿、台本、コンテンツカレンダーの作成を支援します。