
meridian-budget-optimization
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).
- 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-budget-optimization- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads meridian-budget-optimization automatically when relevant.
- 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 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:
- Present the current proposed configurations, report paths, script path, or status to the user for approval.
- 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. - 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.binpbby default). - Prompt the user for the output path for the Budget Optimization report
(
optimization.htmlby 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.
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.BudgetOptimizerto 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. 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.
- Execute the script with the Python interpreter of the environment where
google-meridianis installed: the one the user named; elsepython3if a virtual environment is already active (VIRTUAL_ENVorCONDA_PREFIXis set); else the project directory's virtual environment (.venv/orvenv/, e.g.,.venv/bin/python3) if there is one; elsepython3. Ifimport meridianfails, ask the user which environment to use instead of searching the machine or installing packages unprompted. - 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.
FAQ
What does the meridian-budget-optimization skill do?
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).
How do I install meridian-budget-optimization?
Run npx skills add https://github.com/google/meridian --skill meridian-budget-optimization 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-budget-optimization/ (personal) or .claude/skills/meridian-budget-optimization/ (project).
Which AI agents can use meridian-budget-optimization?
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-budget-optimization 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-budget-optimization?
It is published by google in google/meridian. It has 57 recorded installs.
More from google/meridian
meridian-scenario-planner
google/meridian
Open the skill to read its SKILL.md instructions.
meridian-result-visualization
google/meridian
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).
meridian-model-building
google/meridian
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.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
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.