Back to Skills

google-mobile-ads-banner

Provides instructions to implement, integrate, or configure Google Mobile Ads (GMA) banner ads in Android, iOS, or Unity mobile applications. Use when the task involves setting up banner ads in a mobile application. Don't use for other ad formats like interstitial or rewarded ads.

18,550stars1,470forksUpdated 8/20/2026

Security Assessment

Safe(95/100)
Security Score95/100

About google-mobile-ads-banner

This skill gives an AI coding agent step-by-step instructions for implementing Google Mobile Ads (GMA) banner ads inside Android, iOS, or Unity mobile applications. It solves the problem of correctly wiring up the GMA Next-Gen SDK banner APIs, which involve platform-specific classes, ad-size selection, callback registration, and threading rules that are easy to get wrong. The skill defaults to a Large Anchored Adaptive Banner when the user just asks for a 'banner' and steers them toward adaptive sizes.

The SKILL.md defines a short workflow: determine the platform, read the matching reference guide (android-banner.md, ios-banner.md, or unity-banner.md), then follow an ordered checklist to define the ad view, set the ad size, register for ad-load events, load the banner, and verify the build. The reference guides carry concrete API details such as the required imports, method signatures (BannerAdRequest.Builder, loadAd with AdLoadCallback), test ad unit IDs, and platform gotchas — most notably that GMA SDK callbacks fire on a background thread so all UI operations must be marshalled to the main thread (runOnUiThread, Dispatchers.Main, or MobileAdsEventExecutor.ExecuteInUpdate on Unity). It also reminds the agent to swap the test ad unit ID for a real one after implementation.

The target users are mobile developers and AI agents integrating monetization into Android, iOS, or Unity apps. Typical use cases include adding an anchored adaptive banner to an app layout, choosing between anchored and inline adaptive banners, and verifying a clean build via gradle or dotnet. It is scoped strictly to banner ads and explicitly excludes interstitial and rewarded formats.

FAQ

Which platforms does this skill support?

Android, iOS, and Unity. It asks the agent to determine the platform first and then read the corresponding reference guide. Inline adaptive banners are noted as only available for Android and iOS.

What banner type does it use by default?

Large Anchored Adaptive Banner. If the user does not specify a type, the skill defaults to that and recommends anchored adaptive banners when other types are suggested.

Does it use real ad unit IDs?

No. It uses Google test ad unit IDs (such as ca-app-pub-3940256099942544/9214589741 for Android) during implementation and reminds the user to replace them with their own before publishing.

What is the most important implementation gotcha?

GMA Next-Gen SDK callbacks run on a background thread, so all UI-related operations must be scheduled on the main thread or the app will crash.

Can I use it for interstitial or rewarded ads?

No. The skill is explicitly scoped to banner ads only and directs users to other skills for interstitial or rewarded formats.

All Files

4 files
references/android-banner.md3.0 KB
View
references/unity-banner.md3.1 KB
View
references/ios-banner.md1.7 KB
View
SKILL.md1.8 KB
View

Install google-mobile-ads-banner

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

google/skills