Reference library of official Google Ads API code samples. Auto-invoke when building NEW Google Ads scripts, agents, or functionality (campaigns, mutations, reporting, account management). Helps find relevant examples in /examples/ folder before writing custom code. Improves efficiency by starting from proven patterns rather than guessing API implementation.
Purpose: Automatically reference official Google Ads API examples when building new functionality.
Type: Reference/efficiency skill (auto-invokes when implementing new Google Ads features)
Status: Production - Use before writing new Google Ads code
Claude should invoke this skill automatically whenever user asks to:
Examples that trigger this skill:
DO NOT trigger for:
We have 39 official Google example scripts organized by category:
Located: ../google-ads-mcp/examples/account_management/
Key examples:
get_account_hierarchy.py - MCC account traversallist_accessible_customers.py - Available customer accountsget_change_summary.py - Account change historyget_change_details.py - Detailed change trackingcreate_customer.py - Creating new accountslink_manager_to_client.py - MCC linkinginvite_user_with_access_role.py - User managementupdate_user_access.py - Permissions managementverify_advertiser_identity.py - Identity verificationLocated: ../google-ads-mcp/examples/campaign_management/
Key examples:
add_complete_campaigns_using_batch_job.py - Bulk campaign creationget_all_disapproved_ads.py - Ad disapproval checkingvalidate_ad.py - Pre-flight ad validationadd_campaign_labels.py - Label managementcreate_experiment.py - Campaign experimentsset_ad_parameters.py - Dynamic ad parametersupdate_campaign_criterion_bid_modifier.py - Bid adjustmentsLocated: ../google-ads-mcp/examples/advanced_operations/
Key examples:
add_performance_max_campaign.py - Performance Max setupadd_responsive_search_ad_full.py - RSAs with all assetsadd_smart_campaign.py - Smart campaignsadd_demand_gen_campaign.py - Demand Gen campaignsadd_dynamic_search_ads.py - DSA campaignscreate_and_attach_shared_keyword_set.py - Shared negative keywordsfind_and_remove_criteria_from_shared_set.py - Shared set managementuse_portfolio_bidding_strategy.py - Portfolio biddinguse_cross_account_bidding_strategy.py - Cross-account biddingadd_ad_group_bid_modifier.py - Bid modifiersget_ad_group_bid_modifiers.py - Reading bid modifiersLocated: ../google-ads-mcp/examples/reporting/
Key examples:
parallel_report_download.py - Efficient multi-account reportingWhen invoked, follow this protocol:
Parse what the user is asking for:
Based on the operation, search the appropriate category:
# For campaign/ad creation
ls ../google-ads-mcp/examples/campaign_management/
ls ../google-ads-mcp/examples/advanced_operations/
# For mutations and shared sets
grep -r "SharedSet" ../google-ads-mcp/examples/
grep -r "mutate" ../google-ads-mcp/examples/
# For account operations
ls ../google-ads-mcp/examples/account_management/
# For specific keywords
grep -r "CustomerNegativeCriterion" ../google-ads-mcp/examples/
grep -r "PerformanceMax" ../google-ads-mcp/examples/
Once you identify 1-3 relevant examples, read them:
# Read the full example to understand the pattern
Read: ../google-ads-mcp/examples/advanced_operations/add_performance_max_campaign.py
Pay attention to:
client.get_service("CampaignService"))CampaignOperation)operation.create.name = "...")Before writing code, tell the user:
I found a relevant example: add_performance_max_campaign.py
This shows the pattern for:
- Creating asset groups
- Setting up audience signals
- Linking to merchant center
- Batch creating all resources in one call
I'll adapt this pattern to your specific needs...
Create new code based on the example, but adapted for:
In the new script, add a comment:
"""
Create Performance Max campaigns for property management accounts
Based on official example:
../google-ads-mcp/examples/advanced_operations/add_performance_max_campaign.py
Adapted for:
- Example portfolio structure
- MutationGuard safety system
- CSV-driven batch creation
"""
User asks: "Create a script to add account-level negative keywords to multiple accounts"
Your process:
Search for relevant examples:
grep -r "negative" ../google-ads-mcp/examples/advanced_operations/
grep -r "CustomerNegativeCriterion" ../google-ads-mcp/examples/
Find: create_and_attach_shared_keyword_set.py (closest match)
Read the example:
Read: ../google-ads-mcp/examples/advanced_operations/create_and_attach_shared_keyword_set.py
Explain to user:
"I found
create_and_attach_shared_keyword_set.pywhich shows how to create shared negative keyword sets. However, for TRUE account-level negatives (that appear in Account Settings), we needCustomerNegativeCriterionService, notSharedSetService. Let me check if there's a more specific example..."
Search more specifically:
grep -r "CustomerNegativeCriterion" ../google-ads-mcp/examples/
If not found:
"The examples don't have a CustomerNegativeCriterion example, but the shared keyword pattern shows the proper structure for mutations. I'll adapt it using CustomerNegativeCriterionService based on the API docs..."
Create the script using the shared keyword pattern as a template
advanced_operations/add_performance_max_campaign.pyadvanced_operations/add_demand_gen_campaign.pyadvanced_operations/add_smart_campaign.pyadvanced_operations/add_dynamic_search_ads.pycampaign_management/add_complete_campaigns_using_batch_job.pyadvanced_operations/create_and_attach_shared_keyword_set.pycampaign_management/add_campaign_labels.pyadvanced_operations/add_ad_group_bid_modifier.pyadvanced_operations/add_responsive_search_ad_full.pyadvanced_operations/add_call_ad.pyadvanced_operations/add_display_upload_ad.pycampaign_management/validate_ad.pycampaign_management/get_all_disapproved_ads.pyaccount_management/get_account_hierarchy.pyaccount_management/list_accessible_customers.pyaccount_management/get_change_summary.py + get_change_details.pyaccount_management/create_customer.pyaccount_management/invite_user_with_access_role.pyadvanced_operations/use_portfolio_bidding_strategy.pyadvanced_operations/use_cross_account_bidding_strategy.pyreporting/parallel_report_download.pySkip this skill when:
/queries/)This skill works well with:
This skill is successful when:
Created: 2025-10-28 Status: Production - Auto-invoke for new Google Ads development Trigger: User requests new Google Ads scripts/agents/functionality