Official agent skill

Meridian Budget Optimization

by google in google/meridian

Reopens a fitted Meridian MMM from a saved file and runs budget allocation scenarios, producing an HTML report and a Python script that repeats the run.

OfficialApache-2.0Auto-check passedMarketing & SEO

Install Meridian Budget Optimization

skills CLI
$ npx skills add google/meridian --skill meridian-budget-optimization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install google/meridian meridian-budget-optimization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/google/meridian.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/meridian_budget_optimization .claude/skills/meridian-budget-optimization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
meridian-budget-optimization
GitHub stars
1.6k
Token cost
~1.1k tokens
SKILL.md length
508 words
Files
3 (incl. references)
Skills in repo
5
Repo updated
First seen
Licence
Apache-2.0

At a glance

Reopens a fitted Meridian MMM from a saved file and runs budget allocation scenarios, producing an HTML report and a Python script that repeats the run.

  • Works in 6 steps: Initial Setup → Configure Optimization Parameters &… → Add Model Loading Code → …
  • Working out how to split a media budget across channels using a saved Meridian model
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Finding the spend needed to reach a target ROI

What it does

The agent asks where the serialized model lives, `meridian_model.binpb` by default, where to write the optimization report, `optimization.html` by default, and where to save the generated script, `model_build/run_budget_optimization.py` by default. After you confirm those paths, it moves on to configuring the scenario, using a reference file that lists every optimization parameter.

Scenario choices include a fixed budget versus a flexible budget aimed at a target ROI or marginal ROI, the total budget (historical spend by default) and per-channel spend shift bounds, defaulting to 0.3 for fixed and 1.0 for flexible budgets. The workflow has mandatory interactive checkpoints where the agent shows its proposals and waits for a multiple-choice answer, even when the request said to run autonomously. Plotting model performance and fitting the model are left to sibling skills.

When your agent uses it

  • Working out how to split a media budget across channels using a saved Meridian model
  • Finding the spend needed to reach a target ROI
  • Testing how far each channel's spend may shift in a scenario

Example prompts

  • “Load meridian_model.binpb and optimize the budget with total spend fixed at last year's level.”
  • “How much do we need to spend across channels to reach our target ROI? Use the saved Meridian model.”
  • “Rerun the optimization with tighter per-channel spend limits and write the report to reports/optimization.html.”

Requirements

  • A fitted Meridian model saved as a serialized file
  • Python with Meridian installed

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Initial Setup
  2. Configure Optimization Parameters & Interactive Checkpoint
  3. Add Model Loading Code
  4. Add Budget Optimization Code
  5. Pre-execution Checkpoint
  6. Execution & Script Setup

What it can do on your machine

Read from SKILL.md and the folder at commit 88a4434. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Meridian Budget Optimization loads about 1.1k tokens when it runs, and up to ~2k if it reads all its reference files. Until then it costs about 87 tokens; SKILL.md has 508 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from google/meridian at commit 88a4434, republished under its Apache-2.0 licence (© google). 508 words, ~1,147 tokens.

Download SKILL.mdSave it as .claude/skills/meridian-budget-optimization/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
meridian-budget-optimization
description
Loads a fitted Meridian model and runs budget optimization scenarios. Use when the user wants to load a saved model and find the optimal budget allocation or target ROI spending. Don't use for visualizing model performance (use meridian-result-visualization) or building/fitting the model (use meridian-model-building).

Meridian Budget Optimization

A skill for loading a fitted Meridian model and running budget optimization reports.

Core Workflow

Interactivity Checkpoint Rule

Throughout this workflow, you will encounter CRITICAL INTERACTIVE CHECKPOINTs. At each checkpoint, you MUST:

  1. Present the current proposed configurations, report paths, script path, or status to the user for approval.
  2. Ask the user if they are ready to proceed using the available user-interaction tool (e.g., ask_question), structured as a multiple-choice question. Do NOT use raw chat text.
  3. Wait for their response before proceeding.
    • MANDATORY: You MUST pause at every checkpoint regardless of the initial prompt instructions (even if the user request contains phrases like "run autonomously", "execute directly", "fix autonomously", etc.). The initial request does NOT bypass these interactive checkpoints.
    • Note: If the user replies to a checkpoint with a generic approval (e.g., "proceed", "do what you think is best"), proceed with the proposed defaults.

1. Initial Setup
  • Prompt the user for the path to the serialized model file (meridian_model.binpb by default).
  • Prompt the user for the output path for the Budget Optimization report (optimization.html by default).
  • Prompt the user for the desired path for the generated Python script. If unspecified, default to model_build/run_budget_optimization.py (or relative to the model directory).
  • CRITICAL INTERACTIVE CHECKPOINT: Present the gathered paths to the user and obtain confirmation before configuring optimization parameters.
2. Configure Optimization Parameters & Interactive Checkpoint
  • Prompt the user to configure the optimization scenario. See optimization.md for the full list of available parameters. Key configurations include:
    • Fixed vs Flexible Budget: Is the total budget fixed, or are we looking for a budget to hit a target ROI/mROI? (Defaults to Fixed).
    • Total Budget: If fixed, what is the total budget? (Defaults to historical spend).
    • Spend Constraints: What are the upper/lower bounds for spend shift per channel? (Defaults to 0.3 for fixed, 1.0 for flexible).
    • Target ROI / Target mROI: If flexible, what are the target ratios?
    • Reach & Frequency Parameters: Should optimal frequency be used? (Defaults to True for RF channels).
  • CRITICAL INTERACTIVE CHECKPOINT: Present the proposed optimization configurations to the user and obtain approval before continuing to generate the code.
Show full SKILL.md (159 more words)Show less
3. Add Model Loading Code
  • Use meridian_serde.load_meridian() to load the model.
  • See load_model.md for code template.
  • CRITICAL INTERACTIVE CHECKPOINT: Present the model load path configuration and proposed Python code snippet to the user, and obtain approval before continuing to specify budget optimization.
4. Add Budget Optimization Code
  • Use optimizer.BudgetOptimizer to run optimization and generate the summary, applying the confirmed configuration.
  • See optimization.md for code template.
5. Pre-execution Checkpoint
  • CRITICAL INTERACTIVE CHECKPOINT: Ask the user for final confirmation to execute the budget optimization script now.
6. Execution & Script Setup
  • Write the accumulated Python script to the user-specified path. When writing the file using write_to_file, explicitly set ArtifactMetadata.RequestFeedback=false to avoid pausing execution.
  • Execute the script using Python: prefer the active virtual environment if available (e.g. .venv/bin/python3 or /tmp/meridian_eval_cache/bin/python3, otherwise python3).
  • CRITICAL: Do NOT delete the generated reports, the script, or the output directory at the end of the task. These are the deliverables requested by the user and must be preserved.

© google, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/meridian_budget_optimization of google/meridian.

  • SKILL.md
  • references/load_model.md
  • references/optimization.md

Open the folder on GitHubat commit 88a4434

Compare with similar skills

Meridian Budget Optimization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Meridian Budget Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Meridian Budget Optimization this skillgoogle/meridian1.6k—~1.1kAutomated safety check: PassApache-2.0
Google Ads Managementivangfalco/ads-skills278—~2.1kAutomated safety check: NotesCustom licence
Campaign Analyticsalirezarezvani/claude-skills28k1 repos~2.1kAutomated safety check: PassMIT
Google AdsaAAaqwq/AGI-Super-Team1051 repos~1.4kAutomated safety check: PassMIT
Soku CLIAbout-Intelligence/soku-cli304—~2.4kAutomated safety check: PassMIT
Paid Ads AuditAgriciDaniel/claude-ads9.8k—~1.5kAutomated safety check: PassMIT

Similar skills

  • Google Ads Management

    ivangfalco/ads-skills

    Manages Google Ads accounts with Python scripts for the Google Ads API, backed by an intent-first B2B strategy knowledge base.

    278 GitHub stars~2.1k tokensUpdated 2 mo ago
    Marketing & SEOAuto-check: notes
  • Campaign Analytics

    alirezarezvani/claude-skills

    Calculates attribution, funnel and ROI figures for marketing campaigns with three Python scripts that need only the standard library.

    28k GitHub starsUsed in 1 repo~2.1k tokens
    Marketing & SEOAuto-check passed
  • Google Ads

    aAAaqwq/AGI-Super-Team

    Query, audit, and optimize Google Ads campaigns. An agent skill from aAAaqwq/AGI-Super-Team.

    105 GitHub starsUsed in 1 repo~1.4k tokens
    Marketing & SEOAuto-check passed
  • Soku CLI

    About-Intelligence/soku-cli

    Guides an agent through the soku command line tool for ads, GA4 and PostHog data reads, ads writes, SEO hosting, automations, files and skill management.

    304 GitHub stars~2.4k tokensUpdated today
    Marketing & SEOAuto-check passed
  • Paid Ads Audit

    AgriciDaniel/claude-ads

    Runs a source-grounded paid advertising audit across up to 12 ad platforms, with parallel platform workers, deterministic scoring and a versioned JSON bundle.

    9.8k GitHub stars~1.5k tokensUpdated yesterday
    Marketing & SEOAuto-check passed
  • Google Ads

    zapier/connectors

    Official

    Agent-callable Google Ads tools — search campaigns, ad groups, and ads via GAQL, build performance reports, manage campaign status and budgets, and set up conversion tracking.

    176 GitHub starsUsed in 1 repo~3.7k tokens
    Marketing & SEOAuto-check passed

More from google/meridian

  • Official

    Finds and reads the right Meridian marketing-mix-modeling documentation file to answer a concept or parameter question, instead of guessing.

    1.6k GitHub stars~896 tokensUpdated today
    Auto-check passed
  • Official

    Takes a user through building a Meridian marketing mix model, from loading CSV data and mapping columns to running EDA, fitting and saving the model.

    1.6k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Official

    Loads a saved Meridian MMM model and produces an HTML results summary, with optional health checks and approval checkpoints at each step.

    1.6k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Official

    Generates Scenario Planner data from a fitted Meridian marketing mix model and prepares it for a Looker Studio dashboard through a Colab handoff.

    1.6k GitHub stars~1.5k tokensUpdated today
    Auto-check passed

Works with

Questions about Meridian Budget Optimization

What does Meridian Budget Optimization do?

Reopens a fitted Meridian MMM from a saved file and runs budget allocation scenarios, producing an HTML report and a Python script that repeats the run. py` by default. After you confirm those paths, it moves on to configuring the scenario, using a reference file that lists every optimization parameter.

When should I use Meridian Budget Optimization?

Meridian Budget Optimization fits situations like: working out how to split a media budget across channels using a saved Meridian model; finding the spend needed to reach a target ROI; testing how far each channel's spend may shift in a scenario.

How do I install Meridian Budget Optimization in Claude Code?

Run `npx skills add google/meridian --skill meridian-budget-optimization -a claude-code`. Or copy the skill folder (skills/meridian_budget_optimization in google/meridian) into .claude/skills/meridian-budget-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Meridian Budget Optimization in Codex?

Run `npx skills add google/meridian --skill meridian-budget-optimization -a codex`. Or copy the skill folder (skills/meridian_budget_optimization in google/meridian) into .agents/skills/meridian-budget-optimization in your project. Codex loads it when a task matches its description.

Can I use Meridian Budget Optimization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add google/meridian --skill meridian-budget-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/meridian-budget-optimization, .gemini/skills/meridian-budget-optimization, .github/skills/meridian-budget-optimization and .opencode/skills/meridian-budget-optimization in your project.

What does Meridian Budget Optimization need to run?

SKILL.md names no scripts, command-line tools or credentials: Meridian Budget Optimization is instructions for the agent only. Our summary lists: A fitted Meridian model saved as a serialized file; Python with Meridian installed.

Does Meridian Budget Optimization access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Meridian Budget Optimization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Meridian Budget Optimization use?

Meridian Budget Optimization is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Meridian Budget Optimization use?

About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 861 tokens, read only when the agent opens those files.

What are the alternatives to Meridian Budget Optimization?

Skills that share tags, products or a category with Meridian Budget Optimization: Google Ads Management (ivangfalco/ads-skills, 278 stars), Campaign Analytics (alirezarezvani/claude-skills, 28k stars), Google Ads (aAAaqwq/AGI-Super-Team, 105 stars) and Soku CLI (About-Intelligence/soku-cli, 304 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Meridian Budget Optimization?

google (a GitHub organization, an official publisher) maintains it in google/meridian, which has 1,558 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 7, 2026.

Source: google/meridian on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.