MCPInstall

meridian-scenario-planner

Generates Scenario Planner data from a fitted Meridian model and exports it for Looker Studio dashboard creation via Colab handoff. Use when the user wants to generate scenario planning data, budget grids, or Looker Studio dashboards from a saved model. Don't use for visualizing model results (use meridian-result-visualization) or running standard budget optimization (use meridian-budget-optimization).

Installs
57
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/google/meridian --skill meridian-scenario-planner
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads meridian-scenario-planner automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Meridian Scenario Planner Generation

This skill guides the agent to generate Scenario Planner data, serialize it as a proto file for Colab handoff (zero GCP setup required), and provide the link to the Meridian Looker Studio Scenario Planner Colab notebook.

Prerequisites

  • The agent must have access to a fitted Meridian model (serialized as meridian_model.binpb).
  • [!IMPORTANT] meridian_model.binpb is a binary file. Do NOT try to read its content directly using file viewing tools or grep, as this will produce invalid UTF-8 errors. Always use meridian_serde.load_meridian() in a Python script to load it.

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, paths, 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 proto path (default: model_build/scenario_planner_data.binpb).
  • Prompt the user for the desired path for the generated Python script. If unspecified, default to model_build/run_scenario_planner.py (or relative to the model directory).
  • CRITICAL INTERACTIVE CHECKPOINT: Present the gathered paths to the user and obtain confirmation before configuring spec parameters.

2. Configure Scenario Planner Spec & Interactive Checkpoint

  • Prompt the user for the following Scenario Planner spec configurations (or confirm defaults):
    • optimization_name (String, e.g., "Scenario Planner")
    • include_non_paid_channels (Boolean, default: True)
    • Time breakdown: yearly (default: False), quarterly (default: True), monthly (default: False)
    • min_spend_shift_ratio (Float 0-1, default: 1.0)
    • max_spend_shift_ratio (Float > 0, default: 1.0)
    • use_optimal_frequency (Boolean, default: True)
    • max_frequency (Float > 0, default: 10.0)
  • CRITICAL INTERACTIVE CHECKPOINT: Present the proposed Scenario Planner spec configurations to the user and obtain approval before continuing to load the model.

3. Add Model Loading Code

  • Use meridian_serde.load_meridian() to load the model.
  • See script_template.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 data generation.

4. Add Scenario Planner Data Generation & Colab Handoff Code

  • Create specs for ModelFitSpec, MarketingAnalysisSpec, and BudgetOptimizationSpec using the user-provided configurations.
  • Use mmm_ui_gen.create_mmm_ui_data_proto() to create the proto, including the requested time breakdown generators.
  • Serialize and save the proto to disk (e.g. model_build/scenario_planner_data.binpb).
  • Instruct the user to upload the saved file to the Meridian Scenario Planner Colab notebook: https://colab.research.google.com/github/google/meridian/blob/main/demo/Meridian_Scenario_Planner_Beta.ipynb
  • See script_template.md for code template.
  • CRITICAL INTERACTIVE CHECKPOINT: Present the proposed scenario planner spec configuration and export code snippet to the user, and obtain approval before continuing to execution.

5. Pre-execution Checkpoint

  • CRITICAL INTERACTIVE CHECKPOINT: Ask the user for final confirmation to execute the scenario planner generation script now.

6. Execution & Script Setup

  • Write the accumulated Python script to the user-specified path. If your file-writing tool can ask the user to review the written file, don't request that review: the pre-execution checkpoint already asks for approval, and an extra prompt pauses the workflow.
  • You can use the full script template in script_template.md as a guide.
  • Execute the script with the Python interpreter of the environment where google-meridian is installed: the one the user named; else python3 if a virtual environment is already active (VIRTUAL_ENV or CONDA_PREFIX is set); else the project directory's virtual environment (.venv/ or venv/, e.g., .venv/bin/python3) if there is one; else python3. If import meridian fails, ask the user which environment to use instead of searching the machine or installing packages unprompted.
  • If the script keeps running in the background, wait for it to finish and check its final output before reporting results.
  • CRITICAL: Do NOT delete the generated script, output proto files, or deliverables at the end of the task. These are the deliverables requested by the user and must be preserved.

FAQ

What does the meridian-scenario-planner skill do?

Generates Scenario Planner data from a fitted Meridian model and exports it for Looker Studio dashboard creation via Colab handoff. Use when the user wants to generate scenario planning data, budget grids, or Looker Studio dashboards from a saved model. Don't use for visualizing model results (use meridian-result-visualization) or running standard budget optimization (use meridian-budget-optimization).

How do I install meridian-scenario-planner?

Run npx skills add https://github.com/google/meridian --skill meridian-scenario-planner in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/meridian-scenario-planner/ (personal) or .claude/skills/meridian-scenario-planner/ (project).

Which AI agents can use meridian-scenario-planner?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is meridian-scenario-planner safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains meridian-scenario-planner?

It is published by google in google/meridian. It has 57 recorded installs.

More from google/meridian

View all →

Assists users with questions about Meridian Marketing Mix Modeling and Meridian GeoX geo-experiment concepts, parameters, and best practices by finding and consulting the relevant documentation on developers.google.com/meridian. Use when the user asks for explanations or guidance on Meridian MMM or GeoX topics. Don't use for writing code or running models directly.

Docs & Writing66 installs

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).

Loads a fitted Meridian model and generates standard visualization reports: Model Results Summary. Use when the user wants to load a saved model and view results (model performance, fit, health). Don't use for running budget optimization (use meridian-budget-optimization) or building/fitting the model (use meridian-model-building).

Guides users through building a Meridian Marketing Mix Modeling (MMM) model. Use when a user wants to load data, map columns, configure ModelSpec, run Exploratory Data Analysis (EDA), fit a model, and save the model. Don't use for visualizing results or creating a scenario planner.

Marketing & SEO55 installs

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.