agentleFS
0-shiv0-shiv/secondstep-claude-skills/skills/google-ads-scripts-claude/CLAUDE.md

secondstep-claude-skills / google-ads-scripts-claude

CLAUDE.md2 starsChanged 9 months agoMITView on GitHub

A Claude Code skill that generates, debugs, and optimizes Google Ads Scripts — JavaScript automations running directly inside Google Ads accounts. 50+ ready-to-use scripts across 10 categories: budget alerts, bid rules, reporting, link checking, Quality Score, search terms, anomaly detection, labeling, script generation, and script auditing.

The file

We split this CLAUDE.md into the rules it gives an agent

9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always generate complete, runnable JavaScript — never pseudocode

    line 77
  2. Distinctive:

    Add try/catch error handling to every script

    line 79
  3. Distinctive:

    Use GAQL (Google Ads Query Language) for reports — never deprecated AWQL

    line 81
  4. Very specific:

    Every script must have a function main() {} entry point

    line 82
  5. Very specific:

    Default date ranges to LAST_30_DAYS unless user specifies otherwise

    line 85
  6. Very specific:

    Use var for broadest compatibility (some environments are ES5 only)

    line 89
  7. Distinctive:

    Use descriptive variable names

    line 90
  8. Distinctive:

    Use helper functions for reusable logic

    line 92
  9. Very specific:

    When a user runs a /script command, load the corresponding sub-skill from skills/script-*/SKILL.md for detailed context and templates.

    line 96

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md 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
CLAUDE.md

Claude Code Configuration — Google Ads Scripts

Project Overview

A Claude Code skill that generates, debugs, and optimizes Google Ads Scripts — JavaScript automations running directly inside Google Ads accounts. 50+ ready-to-use scripts across 10 categories: budget alerts, bid rules, reporting, link checking, Quality Score, search terms, anomaly detection, labeling, script generation, and script auditing.

Architecture

google-ads-scripts-claude/
├── SKILL.md                      # Master skill reference (loaded by Claude Code)
├── CLAUDE.md                     # This file — project config & dev rules
├── .claudeignore                 # Files excluded from Claude context
├── scripts-skill/
│   └── SKILL.md                  # Script skill entry point
├── skills/                       # Sub-skills (one per script category)
│   ├── script-budget-alerts/     # /script budget
│   ├── script-bid-management/    # /script bids
│   ├── script-reporting/         # /script report
│   ├── script-link-checker/      # /script links
│   ├── script-quality-score/     # /script qs
│   ├── script-search-terms/      # /script search-terms
│   ├── script-anomaly-detection/ # /script anomaly
│   ├── script-labeling/          # /script labels
│   ├── script-generator/         # /script generate
│   └── script-report/            # /script audit
├── agents/                       # Claude Code agents
│   ├── script-builder.md         # Generates scripts from descriptions
│   ├── script-debugger.md        # Diagnoses and fixes script errors
│   └── script-optimizer.md       # Improves script performance
├── scripts/                      # Python utilities
│   ├── validate-script.py        # Syntax validation for generated scripts
│   └── template-renderer.py      # Renders templates with user config
├── templates/                    # JavaScript script templates
│   ├── budget-pacing.js
│   ├── bid-adjustments.js
│   ├── daily-report.js
│   ├── link-checker.js
│   ├── qs-tracker.js
│   ├── search-term-miner.js
│   ├── anomaly-alert.js
│   └── auto-labeler.js
├── docs/                         # Reference documentation
│   ├── google-ads-scripts-api.md
│   ├── execution-limits.md
│   ├── troubleshooting.md
│   └── best-practices.md
└── assets/
    └── .gitkeep

Commands

CommandDescription
/script generateGenerate a custom script from plain English description
/script budgetBudget pacing and alert scripts
/script bidsBid adjustment and optimization scripts
/script reportAutomated reporting scripts
/script linksURL validation and broken link detection scripts
/script qsQuality Score tracking scripts
/script search-termsSearch term mining and negative keyword scripts
/script anomalyPerformance anomaly detection scripts
/script labelsAuto-labeling scripts
/script auditScript inventory and health check

Dev Commands

python scripts/validate-script.py templates/budget-pacing.js   # Validate a template
python scripts/template-renderer.py templates/daily-report.js   # Render with defaults

Dev Rules

Script Generation

  • Always generate complete, runnable JavaScript — never pseudocode
  • Include a CONFIG object at the top of every script for easy customization
  • Add try/catch error handling to every script
  • Include Logger.log() statements for debugging
  • Use GAQL (Google Ads Query Language) for reports — never deprecated AWQL
  • Every script must have a function main() {} entry point
  • Respect execution limits: 30 min runtime, 250K API calls, 50 URL fetches
  • For MCC accounts, use MccApp.accounts() pattern
  • Default date ranges to LAST_30_DAYS unless user specifies otherwise
  • Cost values from API are in micros — always divide by 1,000,000

Code Style

  • Use var for broadest compatibility (some environments are ES5 only)
  • Use descriptive variable names
  • Group configuration constants at the top
  • Use helper functions for reusable logic
  • Format email HTML with inline styles (no external CSS in Google Ads email)

Sub-Skill Loading

When a user runs a /script command, load the corresponding sub-skill from skills/script-*/SKILL.md for detailed context and templates.

File Conventions

  • JavaScript templates: kebab-case .js files in templates/
  • Skill definitions: SKILL.md inside each skills/script-*/ directory
  • Agent definitions: kebab-case .md files in agents/
  • Python utilities: kebab-case .py files in scripts/

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.