structure-audit
Audit a Google Ads account for internal structural consistency against ITS OWN inferred convention — keywords ↔ ad groups ↔ campaigns aligned by theme, match…
by portermetricsample★ 22 GitHub stars
Install structure-audit in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Google Ads — Structure Audit
Goal (job-to-be-done)
Validate that the account is internally consistent with its own convention — that keywords fit their ad group, ad groups fit their campaign, the match type fits the name, the real config matches what the name promises, and there's no redundancy or broken naming. It does NOT validate against a universal ideal: it infers the account's convention and checks against THAT.
- Who: media buyer / agency — especially when auditing or inheriting an account.
- When: at account onboarding and as a periodic hygiene check.
- Decision it drives: which keyword to move, which match type to fix, what to rename, which duplicate to consolidate — so the structure is clean and manageable.
The 4 checks (narrow scope)
- Theme alignment — keyword ↔ ad group ↔ campaign agree on theme (the only semantic part).
- Match-type in the name — if the ad group says "- Broad", its keywords are broad.
- Consistent naming — ad groups/campaigns that break the dominant pattern.
- Keyword redundancy — same keyword defined across several ad groups (separating intentional from accidental).
Scope
- ✅ Structural alignment only, against the account's OWN inferred convention.
- ❌ Out of scope (the hard line): bids, budgets, ad copy, extensions, Quality Score, negative lists. That is NOT structure alignment.
- This skill is at the defined-keyword level. The served search term level belongs to
term-routing(search-terms) — different unit.
Consumes the account_profile
This skill consumes the account_profile produced by structure-map (see
../../../_framework/account-profile.md). The
profile supplies the advertiser's vocabulary (products.code_of_line,
products.keyword_lexicon) so the cross-product theme check knows what the account sells.
Without a profile that one check runs in a degraded "generic" mode derived from the
campaign names (noisier, best-effort) — never with a wrong hardcoded guess. Code knows
Google's universal vocabulary (BROAD/PHRASE/EXACT, channel types); the profile supplies the
account-specific vocabulary.
Components (read these references as needed)
- Tools / data plan:
references/tools.md— the structure query (1)- the optional audience query (2).
- Framework / rubric:
references/framework.md— the brain: infer→check method, the 4 checks, the intentional-vs-accidental rule, severity. - Output schema:
references/output.md— the JSON this skill emits. - Deterministic core:
scripts/process.py+scripts/query.json— see Pipeline.
Pipeline (don't improvise — execute; declarative + deterministic)
This is a DETERMINISTIC skill. The work is split into artifacts; the model only makes the irreducible semantic judgment.
- Execute
scripts/query.json— substitute the<placeholders>and run the MCP call (do not re-compose the query) → thestructureresult. - Run
scripts/process.pyover that result (optionally pass theaccount_profile.jsonas a 2nd arg) → returnsconvention+findings(checks A/B/C/D, already with severity) +theme_suspects(only the cross-family candidates). Runs in milliseconds. - The model ONLY judges
theme_suspects— is the keyword really from another family/product? confirm or discard each one. (On the Acme Insurance dogfood that was 13 candidates, not 1,415.) Everything else comes already resolved and ranked. - Emit the JSON in
references/output.md, merging the deterministicfindings+ the confirmed theme suspects.
process.py runs in scripts/, executed not read. Where process.py ends (deterministic
checks A/B/C/D + theme_suspects) and the LLM begins (judging theme_suspects = check 1) is the
split brain: code computes the universal, the LLM judges the business criterion.
Operate
Input: per row — keyword text, real match type, campaign name, real campaign
channel type, real bidding strategy, ad-group name (impressions only to fetch rows). Plus
business context: product lines and how campaigns/ad groups are organized — read from the
names first; confirm the doubtful. The account_profile supplies this when available.
Process:
- Phase 1 — Infer the convention and state it (the user confirms): do campaigns separate by product / audience / geo / brand / funnel? do ad groups encode theme + match type? Output a short "this is how your account is organized" summary + which checks apply.
- Phase 2 — Run the applicable checks per the rubric in
references/framework.md. Only applicable checks run (e.g. the match-type check only if the account encodes match type in the name). - Assig
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- references/framework.md
- references/output.md
- references/tools.md
- scripts/process.py
- scripts/query.json
FAQ
What does the structure-audit skill do?
Audit a Google Ads account for internal structural consistency against ITS OWN inferred convention — keywords ↔ ad groups ↔ campaigns aligned by theme, match type coherent with the ad-group name, consistent naming (campaigns AND ad groups), and no accidental keyword redundancy. Use this skill whenever the user is auditing or onboarding/inheriting a Google Ads account, asks to clean up account structure, mentions misplaced keywords, ad-group/campaign naming chaos, default names like "Ad group 1", duplicate keywords across ad groups, or "does my match type match the name" — even if they don't say "structure audit". Checks structural alignment ONLY; bids, budgets, ad copy, extensions, Quality Score and negative lists are out of scope.
How do I install the structure-audit skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the structure-audit skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…