mutation-safety
Skill72 starsChanged 4 months agoMITView on GitHub
MANDATORY safety system for ALL Google Ads mutations AND destructive Google Sheets writes. Auto-invoke whenever ANY agent, skill, or script attempts to modify Google Ads accounts or overwrite Google Sheets data. Enforces two-step approval to prevent accidental changes.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Vibha-Ramprakash/automate-google-adsword for word, first seen Sep 14, 2026
Other versions1 project uses a version of this.
Word for word · 1
- Vibha-Ramprakash/automate-google-ads★ 0100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository41 other files it gives its agents.
- account-diagnosticSkill
- ad-copy-generation-frameworkSkill
- ad-copy-verification-standardSkill
- add-account-negative-keywordsSkill
- ads-checkerSkill
- budget-guardianSkill
- budget-recommendation-calculatorSkill
- change-history-checkerSkill
- client-communication-standardsSkill
- competitor-analysis-v2Skill
- conversion-tracking-healthSkill
- dgen-automation-disableSkill
- fair-housing-complianceSkill
- ga4-campaign-cross-referenceSkill
- ga4-cross-analysisSkill
- ga4-lead-quality-investigationSkill
- gaql-query-patternsSkill
- geo-conflict-analyzerSkill
- google-ads-api-setupSkill
- google-ads-querySkill
- google-ads-samplesSkill
- impression-share-diagnosticsSkill
- investigation-methodologySkill
- lead-quality-pattern-analysisSkill
- lead-quality-recommendation-prioritizationSkill
- markdown-to-sheets-presenterSkill
- mcc-hack-auditSkill
- neg-conflict-finderSkill
- non-serving-keyword-scannerSkill
- pmax-asset-automationSkill
- pmax-builderSkill
- portfolio-health-prioritizationSkill
- portfolio-pacing-rulesSkill
- rsa-bulk-editSkill
- rsa-refreshSkill
- rsa-single-accountSkill
- shared-budget-updaterSkill
- sqr-classifierSkill
- sqr-pipelineSkill
- underspending-investigationSkill
- youtube-placement-auditSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 9 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 38
ALL mutations MUST use exact matching for identifiers to prevent accidental modifications.
- Distinctive: line 50
Default to exact match for all mutations (no flag needed)
- Distinctive: line 62
Before executing any mutation:
- Distinctive: line 64
If an account is not in the known accounts list, STOP and ask
- Distinctive: line 65
When asked to modify "this account," confirm which specific account is meant
- Distinctive: line 66
When asked to modify "all accounts," clarify the exact scope before proceeding
- Distinctive: line 79
If your system uses approval codes or confirmation tokens:
- Distinctive: line 114
When presenting the dry-run preview, use this structure:
- Distinctive: line 157
If a mutation needs to be undone:
- Very specific: line 159
Budget changes: Use op.update with the original budget value
- Very specific: line 160
Paused entities: Use op.update to set status back to ENABLED
- Very specific: line 161
Renamed entities: Use op.update with the original name
- Very specific: line 162
Added negative keywords: Use op.remove with the keyword criterion resource name
- Very specific: line 163
Conversion action changes: Use op.update with original values (name, default_value, lookback windows)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Mutation Safety
Purpose: Enforce two-step approval for ALL mutations to Google Ads accounts AND destructive Google Sheets writes.
Type: Safety enforcement skill (MANDATORY — auto-invokes for all mutations)
What This Skill Deliberately Does NOT Do
- Choose the mutation. Producing skills decide WHAT to change; this protocol governs how any change gets approved and executed. Clearing the two-step gate is control, not endorsement — an approved mutation can still be a bad idea.
- Check content or compliance. Whether copy is verified (
ad-copy-verification-standard) or targeting is lawful (fair-housing-compliance) is decided upstream; this skill only guarantees a human saw the exact change first. - Gate reads. Queries, reports, and audits run freely — the "NOT Mutations" list below is explicit about what needs no approval.
- Undo for you. Revert Knowledge documents HOW to reverse each mutation type, but some operations (removed conversion actions) are permanent — which is why the dry-run must flag irreversibility BEFORE execution, not after.
Core Rules
Rule 1: No Mutations Without Two-Step Approval
Any operation that writes, updates, or deletes data in Google Ads or Google Sheets MUST follow this flow:
- Dry Run — Show exactly what will change, with current and proposed values
- User Approval — Wait for explicit user confirmation before executing
- Execute — Only after approval, run the mutation
Never skip the dry run. Never auto-approve.
Rule 2: Exact Match Required for All Identifiers
ALL mutations MUST use exact matching for identifiers to prevent accidental modifications.
Identifiers requiring exact match:
- Customer IDs (CIDs)
- Conversion action names
- Campaign names
- Ad group names
- Keyword text
- Shared set names
- Any other named entity
Implementation rules:
- Default to exact match for all mutations (no flag needed)
- Pattern matching requires an explicit opt-in flag
- GAQL queries for mutations MUST use
= 'value'instead ofLIKE '%value%' - Fuzzy/partial matching is ONLY allowed for read-only queries (reports, audits)
Why this matters:
- "Form_Submit" and "Form_Submit_BC" are different conversion actions
- CID
1234567890and1234567809are different accounts - One character difference can affect the wrong entity
Rule 3: Scope Verification Before Execution
Before executing any mutation:
- Confirm the target account is one the user actually manages
- If an account is not in the known accounts list, STOP and ask
- When asked to modify "this account," confirm which specific account is meant
- When asked to modify "all accounts," clarify the exact scope before proceeding
Rule 4: Show What Will Change
The dry-run preview MUST include:
- Target: Which account(s) and entities
- Current state: What the values are now
- Proposed state: What they will be after the mutation
- Count: How many entities are affected
- Reversibility: Whether this change can be undone (and how)
Rule 5: Never Generate Approval Codes
If your system uses approval codes or confirmation tokens:
- The USER must provide the approval code
- Claude/AI must NEVER generate, guess, or auto-fill approval codes
- The approval code exists so the human controls execution
What Counts as a Mutation
Google Ads API Mutations
- Creating campaigns, ad groups, keywords, or ads
- Updating budgets, bids, or bid strategies
- Pausing or enabling campaigns/ad groups/keywords
- Adding or removing negative keywords
- Modifying conversion action settings (values, attribution, counting)
- Updating ad copy (headlines, descriptions)
- Any
mutatecall to the Google Ads API
Google Sheets Destructive Writes
- Clearing a sheet tab
- Overwriting existing data
- Deleting rows or columns
- Replacing tab contents
NOT Mutations (No Approval Needed)
- Reading/querying Google Ads data (SELECT queries)
- Reading Google Sheets data
- Writing to a NEW (empty) sheet tab
- Appending rows to the end of existing data
- Local file operations
Dry-Run Output Format
When presenting the dry-run preview, use this structure:
MUTATION PREVIEW
================
Target: [Account Name] (CID: XXXXXXXXXX)
Operation: [What will change]
Entities affected: [Count]
Current → Proposed:
- [Entity 1]: [current value] → [new value]
- [Entity 2]: [current value] → [new value]
Reversibility: [Yes/No — how to undo if needed]
Type APPROVE to execute, or CANCEL to abort.Worked Example (Synthetic Data)
A skill proposes raising Acme Plumbing's search budget. The dry-run preview it must show first:
MUTATION PREVIEW
================
Target: Acme Plumbing (CID: 1234567890)
Operation: Campaign budget increase
Entities affected: 1
Current → Proposed:
- Budget "Search - General": $50.00/day → $54.00/day (+8%)
Reversibility: Yes — op.update back to $50.00/day restores the original state.
Type APPROVE to execute, or CANCEL to abort.Nothing has executed yet. If the user replies APPROVE, exactly this change runs — same account, same entity, same values. If the user replies CANCEL, asks a question, or says anything else, the account stays untouched. And the approval is typed by the user — never generated on their behalf (Rule 5).
Revert Knowledge
If a mutation needs to be undone:
- Budget changes: Use
op.updatewith the original budget value - Paused entities: Use
op.updateto set status back to ENABLED - Renamed entities: Use
op.updatewith the original name - Added negative keywords: Use
op.removewith the keyword criterion resource name - Conversion action changes: Use
op.updatewith original values (name, default_value, lookback windows) - Deleted/removed conversion actions: Cannot be restored via API — these are permanent
Important: Some operations are irreversible. Always flag irreversible mutations in the dry-run preview.
Common Mistakes This Prevents
- Wrong account scope — Script meant for one account runs across the entire MCC
- Partial name match — LIKE query matches 3 conversion actions instead of 1
- Transposed CID — Digits swapped, mutation hits wrong account entirely
- Auto-approve in batch — Script processes 50 accounts without stopping for review
- Overwrite vs. append — Sheet write replaces existing data instead of adding to it
- Test vs. production — Mutation runs against live account instead of test account
When to Load Other Skills
This skill is a gate, not a workflow — producing skills route INTO it whenever they reach a write step. In this repo that includes add-account-negative-keywords and sqr-pipeline (negative-keyword uploads), dgen-automation-disable (ad-automation settings), pmax-asset-automation (campaign-level automation fixes), and budget-recommendation-calculator (when an approved recommendation is written to the account).
Load alongside:
| Skill | When |
ad-copy-verification-standard | When the mutation writes ad copy — verification gates the content, this skill gates the write |
fair-housing-compliance | When the mutation touches targeting on housing accounts — compliance gates the targeting choice, this skill gates the write |
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
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.

