agentleFS
fourteenwmfourteenwm/ppc-ai-skills/rsa-single-account/SKILL.md

rsa-single-account

Skill72 starsChanged 4 months agoMITView on GitHub

Generate a full Responsive Search Ad set for ONE account — 15 headlines + 4 descriptions per active ad group — from website-verified content plus live SERP competitive analysis and a website→Google-Business-Profile review fallback. Ships all seven workflow scripts. Auto-invoke when user says "create RSAs for [account]", "generate RSAs for [account]", or "build RSA copy for [account]". Outputs an import-ready Google Sheet. Read-only on Google Ads (no mutations).

  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Type: Read-only generation skill.

    line 11
  2. Distinctive:

    Do not invent business facts: All USPs, services, hours, credentials, and social proof must be verified from the scrape or reviews.

    line 29
  3. Distinctive:

    ALL copy website- or review-verified.

    line 101

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

RSA Single-Account Generator

Purpose: Produce a complete, import-ready RSA set for a single account — find its active Search ad groups, scrape its website for verified claims, analyze competitors for differentiation, pull reviews, and generate 15 headlines + 4 descriptions per ad group. Output lands in a Google Sheet ready to copy/paste into Google Ads Editor.

Type: Read-only generation skill. It does not mutate Google Ads — it writes ad copy to a review Sheet; you import via Editor.

Which RSA skill? This one builds a full set from scratch. If the account already has RSAs with performance labels and the job is replacing the LOW slots while keeping proven copy, load rsa-refresh instead. If the job is a uniform literal text swap across existing ads (rebrand, spelling, customizer retirement) — no new copy at all — load rsa-bulk-edit.


What This Skill Wraps

The skill is a procedural wrapper around seven small scripts, all shipped in scripts/. The scripts gather and verify inputs (Steps 1–6) and land output (Step 8) — no script writes a headline. Generation itself (Step 7) is yours, governed by two companion skills (both in this repo; the README install block fetches them):

  • ad-copy-verification-standard — every claim must come from the website (or a verified review). No "Free" copy. Empty > Inaccurate.
  • ad-copy-generation-framework — the 23-element framework + the headline/description distribution.

Do not invent business facts. All USPs, services, hours, credentials, and social proof must be verified from the scrape or reviews. If the scrape fails, STOP — do not fall back to generic copy.

The scripts are generic and self-contained — Google Ads credentials from google-ads.yaml, API keys from environment variables, output Sheet via --sheet-id. Every script's exact selection filters, thresholds, and output contract live in references/pipeline-contract.md, so you can swap any script for your own implementation (different SERP provider, different scraper) as long as the contract holds.


What This Skill Deliberately Does NOT Do

  • No Google Ads mutations — it writes a review Sheet; a human imports via Google Ads Editor. There is no approval flow or rollback here because nothing is ever pushed.
  • No editing of existing ads — replacing LOW-labeled assets in live RSAs is rsa-refresh; uniform literal text swaps are rsa-bulk-edit.
  • No invented facts, ever — no generic fallback on scrape failure, no assumed reviews, no industry-template copy.
  • No multi-account batching — one account per run, by design. Run it once per account.
  • No copy validation by script — the 30/90 limits, counts, Title Case, and verification rules are enforced by you at Step 7; the sheet writer checks JSON key presence only.
  • No keyword or structure strategy — the ad group name is taken as the primary keyword; restructuring campaigns is out of scope.

Prerequisites

  • google-ads.yaml at project root (or --config <path>) — see the google-ads-api-setup skill for creating it. Its OAuth credentials are reused for the Google Sheets write; set login_customer_id to your MCC so Step 1 can walk your accounts without a registry.
  • SERP_API_KEY environment variable — for the competitive analysis (Step 3) and the GBP review fallback (Step 6). Get a key at serpapi.com. Each lookup costs an API credit.
  • FIRECRAWL_API_KEY environment variable — for the website scrape (Step 5). Get a key at firecrawl.dev.
  • ANTHROPIC_API_KEY environment variable — for the structured extraction in Step 5. All three keys can live in a .env file at project root.
  • Python packages: pip install google-ads google-search-results firecrawl-py anthropic google-api-python-client google-auth pyyaml python-dotenv
  • An output Google Sheet — create an empty spreadsheet and pass its ID via --sheet-id in Step 8.
  • Optional: accounts.json registry for Step 1 name→CID resolution (same schema as the ads-checker skill; documented in the script header). Without it, Step 1 walks the MCC in your google-ads.yaml.

Workflow

The numbered path is the default, not a ritual — rules.md § "Step sequencing" says which steps are skippable when (CID already known → skip 1; URL provided → skip 2; ≥ 2 site testimonials → skip 6) and how cached artifacts let a re-run resume at Step 7.

Step 1 — Find the account

python scripts/check_active_accounts.py [--name "<query>"] → lists accounts with spend this month (accounts.json registry if present, MCC walk otherwise); resolve the account name to a Customer ID (CID) from the list. Multiple matches → ask the user. No match → list candidates.

Step 2 — Get the website URL

get_account_website_url.py reads the CID from stdin, so pipe it:

echo "<CID>" | python scripts/get_account_website_url.py

→ business website (from ad final URLs) + business name. No ads found → ask the user for the URL.

Step 3 — Competitive analysis (the differentiator)

python scripts/analyze_competitors_for_rsa.py "<service>" "<location>" [--vertical <vertical>] (needs SERP_API_KEY) → SERP-based competitor messaging analysis: common USPs (with saturation counts), services, CTAs, cached to competitive_insights.json for Step 7. Verticals are defined in scripts/vertical_configs.json — three example sets ship (auto_repair, plumbing, property_management); add your own.

  • Derive service from the first active campaign/ad group name; location from the account/ad-group names (fallback: ask).
  • The script's own gap printout runs against built-in example client USPs (real client USPs don't exist until the Step-5 scrape) — the saturation counts are the real half. At Step 7 you apply the gap logic to the client's actual USPs: emphasize what competitors don't mention; de-emphasize/skip USPs 3+ competitors use; differentiate through specificity. Mechanics + misread traps: references/pipeline-contract.md and rules.md.

Step 4 — Query campaign structure

python scripts/get_search_campaign_structure.py <CID> → active Search campaigns (name contains "Search", for production safety) + active ad groups. The ad group name is the primary keyword for that RSA.

Step 5 — Scrape the website (once per account)

The scrape uses Firecrawl + an LLM for structured extraction, so it needs FIRECRAWL_API_KEY + ANTHROPIC_API_KEY in the environment:

python scripts/scrape_website_firecrawl.py "<website_url>" --output website_data.json

→ verified business overview, USPs, services, credentials, hours, specializations. --output caches the extraction — reuse it across all ad groups. If scraping fails → STOP (no generic fallback).

Step 6 — Reviews: website → GBP fallback

  • Website first: parse the scrape for testimonials (need ≥2 for social-proof headlines).
  • GBP fallback (if <2): python scripts/get_gmb_reviews.py "<business_name>" "<location>" (needs SERP_API_KEY) → rating, review count, recent snippets. A rating+count headline only exists at rating ≥ 4.5 (the script's gate); verify the returned panel is actually the client, and read any snippet's original_rating before using it — details in rules.md § "Review usability".
  • Reviews from website or GBP only — never assumed.

Step 7 — Generate RSAs (per ad group)

Invoke ad-copy-generation-framework. Distribution:

Headlines (15): 3 keyword · 2 social proof · 4 generic USP · 2 CTA · 1 pun · 3 flexible. Descriptions (4): 2 = keyword + product USP + CTA · 2 = keyword + generic USPs (no CTA). Composed from verified claims.

Apply competitive insights: prioritize unique client USPs in the first USP slots; skip claims 3+ competitors use (or only combine them inside descriptions); differentiate through specificity; lead with differentiators.

Verification rules (MANDATORY):

  • ALL copy website- or review-verified.
  • NO "Free" copy even if verified on the site (premium-customer avatar filter).
  • NO generic placeholders / unverified ratings ("Rated 5★ By Happy Customers" with no verified count).
  • Empty > Inaccurate — leave a slot empty rather than fabricate.
  • No reviews at all (site or GBP): skip the 2 social-proof headlines, add 2 more verified flexible headlines (5 flexible total). Never placeholders.

Validation: headlines ≤30 chars · descriptions ≤90 chars · Title Case · all claims verified · no "Free" · flag (don't silently drop) any violations for review.

Step 8 — Write to the Sheet

Serialize your generated copy (you author rsa_data.json — no script produces it), then:

python scripts/write_rsa_to_sheet.py --sheet-id "<YOUR_RSA_SHEET_ID>" rsa_data.json

JSON per ad group: {account_name, campaign_name, ad_group_name, headlines:[15], descriptions:[4]}. The script clears the Sheet, writes a header row + data, and handles Sheets auth (a token-sheets.json if present, otherwise the OAuth credentials in your google-ads.yaml). It validates key presence only — your Step-7 validation is the sole guard on counts and lengths.

Step 9 — Summary

Report ad groups processed (by campaign), the Sheet URL, validation results (within/over limits, flagged), competitive insights applied, and warnings (limited website content, GBP fallback used, no reviews found).


Output Configuration

SettingValue
Sheet ID--sheet-id <YOUR_RSA_SHEET_ID> (bare ID or full URL; dedicated sheet — first tab A:Z is cleared each run)
ColumnsA Account · B Campaign · C Ad Group · D–R Headlines 1–15 · S–V Descriptions 1–4
Authtoken-sheets.json if present, else OAuth reuse from google-ads.yaml

Exact write semantics (clear range, padding behavior, validation scope): references/pipeline-contract.md § Step 8.


After a Run

No script writes a timestamp — the working directory is the run record: competitive_insights.json (Step 3), the Step-5 cache (e.g. website_data.json), and rsa_data.json (authored by you at Step 7) mark how far a run got; the Sheet's first tab holds only the latest successful write. The cold-read table is in references/pipeline-contract.md § "Reading run state cold".

Anything that looks wrong — an account missing from Step 1, a [ERROR] at Step 4, everything flagged "unique," misaligned Sheet columns — check rules.md § "False alarms and misreads" before re-running or escalating; most of these are reads, not failures. After the human imports via Editor, change-history-checker confirms what actually landed in the account.

Worked end-to-end runs (a clean set, a thin-review business, and a [ERROR]-that-isn't): examples.md.


Files in This Skill

FileRole
SKILL.mdThis workflow — entry point and routing
rules.mdJudgment layer: invariants, step sequencing, JSON/review reading, false alarms, escalation
examples.mdThree worked runs, two edge-shaped
references/pipeline-contract.mdExact per-script mechanics — selection filters, thresholds, output contracts (scripts win)
scripts/check_active_accounts.pyStep 1 — name → CID over registry or MCC walk
scripts/get_account_website_url.pyStep 2 — website + business name from ad final URLs
scripts/analyze_competitors_for_rsa.pyStep 3 — SERP saturation analysis
scripts/vertical_configs.jsonStep 3 — per-vertical keyword maps (the operative lever)
scripts/get_search_campaign_structure.pyStep 4 — ENABLED "Search"-named campaigns + ad groups
scripts/scrape_website_firecrawl.pyStep 5 — Firecrawl scrape + LLM extraction (the verification source)
scripts/get_gmb_reviews.pyStep 6 — GBP review fallback (4.5 gate)
scripts/write_rsa_to_sheet.pyStep 8 — clear-then-write Sheet output

Runtime artifacts (competitive_insights.json, the Step-5 cache, rsa_data.json) land in your working directory, never in this folder.


When to Load Sibling Skills

LoadWhen
ad-copy-verification-standardAlways, at Step 7 — the verification law every claim passes through
ad-copy-generation-frameworkAlways, at Step 7 — the 23-element framework behind the distribution
rsa-refreshThe account already has RSAs with performance labels and the job is replacing LOW slots
rsa-bulk-editThe job is a uniform literal text swap across existing ads — no new copy
competitor-analysis-v2Step 3's ad-text saturation counts aren't enough — you need a full strategic teardown of named competitors
change-history-checkerAfter the Editor import — confirm what actually changed in the account
google-ads-api-setupFirst run — creating google-ads.yaml (and the Sheets-scoped token this skill reuses)

License

MIT — use freely in your own brain / repo / agency.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.