Budget Optimizer logo

Budget Optimizer

Community
indranilbanerjee
budget-optimizer

Optimize channel budget with diminishing-returns models. Pacing → budget-tracker. "is our channel split right"

Overview

Publisherindranilbanerjee
Repositorydigital-marketing-pro
Skill namebudget-optimizer
Stars
866
Forks
138
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by indranilbanerjee on GitHub. Read the source before you install it.

Installation

Install the Budget Optimizer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/indranilbanerjee/digital-marketing-pro/tree/main/skills/budget-optimizer
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/indranilbanerjee/digital-marketing-pro.git /tmp/digital-marketing-pro
mkdir -p .claude/skills
cp -r /tmp/digital-marketing-pro/skills/budget-optimizer .claude/skills/budget-optimizer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Budget Optimizer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Budget Optimizer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Budget Optimizer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

/digital-marketing-pro:budget-optimizer

Script location. If your host does not set ${CLAUDE_PLUGIN_ROOT}, the scripts are in this plugin's scripts/ folder, next to skills/. Run them with Python 3.10 or newer: python, or python3 where python is not found (macOS, many Linux systems).

Purpose

Data-driven marketing budget optimization across channels using performance data and industry benchmarks. Analyzes current spend efficiency, models diminishing returns per channel, and produces an optimized allocation with projected ROI improvement and a phased reallocation timeline.

Input Required

The user must provide (or will be prompted for):

  • Current budget by channel: How spend is distributed today (e.g., paid search, paid social, SEO, email, content, display, affiliate, events, etc.)
  • Performance data by channel: Key metrics per channel — spend, revenue or conversions, CPA, ROAS, and conversion volume over the measurement period
  • Total budget available: Overall marketing budget for the optimization period (monthly, quarterly, or annual)
  • Business goals: Primary objective — maximize revenue, minimize CPA, hit a specific lead or revenue target, balance growth with efficiency
  • Constraints: Minimum spend requirements, channel mandates from leadership, seasonal considerations, contractual commitments, or platform minimums
  • Measurement period: Timeframe the performance data covers (last 30, 60, 90 days, or custom range)
  • Attribution model: How conversions are currently attributed (last-click, first-click, linear, data-driven, or unknown)
  • Seasonality factors: Upcoming seasonal peaks, promotional periods, or industry events that affect channel performance
  • Historical context: Whether performance data reflects a typical period or was influenced by one-time events (product launch, viral moment, outage)

Process

  1. Load brand context: Read ~/.claude-marketing/brands/_active-brand.json for the active slug, then load ~/.claude-marketing/brands/{slug}/profile.json. Apply brand voice, compliance rules for target markets (skills/context-engine/compliance-rules.md), and industry context. Also check for guidelines at ~/.claude-marketing/brands/{slug}/guidelines/_manifest.json — if present, load restrictions and relevant category files. Check for custom templates at ~/.claude-marketing/brands/{slug}/templates/. Check for agency SOPs at ~/.claude-marketing/sops/. If no brand exists, ask: "Set up a brand first (/digital-marketing-pro:brand-setup)?" — or proceed with defaults.
  2. Run budget-optimizer.py script: Execute python "${CLAUDE_PLUGIN_ROOT}/scripts/budget-optimizer.py" --channels '[{"name":"google_ads","spend":10000,"roas":4.2}]' --total-budget {amount} (--total-budget is required; pass channel data via --channels JSON or --file) to compute baseline efficiency metrics and generate optimization scenarios
  3. Calculate efficiency metrics per channel: Compute ROAS, CPA, cost per lead, revenue per dollar, contribution margin, and marginal cost of acquisition for each channel
  4. Rank channels by marginal efficiency: Order channels by incremental return per additional dollar spent, accounting for current saturation levels and historical performance trends
  5. Apply diminishing returns model: Model how each channel's efficiency degrades as spend increases — identify the inflection point and saturation ceiling for each channel
  6. Generate optimized allocation: Redistribute budget to maximize the stated objective while respecting all constraints and minimum viable spend thresholds
  7. Compare current vs optimized: Build a side-by-side comparison showing spend shifts, projected metric changes, and net improvement across all KPIs
  8. Project ROI improvement: Estimate total revenue, conversion volume, ROAS, and CPA gains from the reallocation with confidence intervals
  9. Account for minimum viable spend thresholds: Ensure no channel drops below the minimum spend needed to generate meaningful data, maintain auction competitiveness, or fulfill contractual obligations
  10. Include testing budget: Reserve 10-15% of total budget for experimentation — new channels, creative testing, audience expansion, or emerging platforms
  11. Flag attribution caveats: Note where attribution model limitations may skew efficiency calculations and recommend adjustments
  12. Create reallocation timeline: Phase budget shifts over 4-8 weeks to avoid performance disruption — gradual ramp-up and ramp-down with weekly checkpoints and rollback triggers

Output

A structured budget optimization plan containing:

  • Current vs optimized allocation table: Side-by-side channel budgets with dollar amounts, percentage of total, and change from current
  • Projected ROI improvement: Expected gains in revenue, conversions, ROAS, and CPA with confidence ranges
  • Channel efficiency ranking: Channels ordered by marginal return with diminishing returns curves and saturation indicators
  • Reallocation recommendations: Specific dollar shifts with clear rationale for each increase, decrease, or hold
  • Scenario comparison: Best-case, expected, and conservative projections for the optimized allocation
  • Implementation timeline: Phased reallocation schedule with weekly checkpoints, performance triggers, and rollback criteria
  • Risk assessment: Potential downsides of each shift, minimum viable spend warnings, attribution blind spots, and mitigation strategies
  • Testing budget plan: Recommended experiments with allocated budget, hypotheses, success criteria, and measurement approach
  • Attribution notes: Caveats on how the current attribution model may over- or under-credit specific channels
  • Executive summary: 1-page overview of key findings and recommended actions for stakeholder presentation

Agents Used

  • analytics-analyst — Performance data analysis, efficiency calculations, diminishing returns modeling, ROI projections, attribution assessment
  • media-buyer — Channel-level budget strategy, spend threshold expertise, reallocation sequencing, platform-specific benchmarks, auction dynamics

Frequently asked questions

What does the Budget Optimizer AI skill do?

Optimize channel budget with diminishing-returns models. Pacing → budget-tracker. "is our channel split right"

Why use Budget Optimizer on TypingMind?

Because you install it once and use it with any model. Budget Optimizer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Budget Optimizer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/indranilbanerjee/digital-marketing-pro/tree/main/skills/budget-optimizer. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Budget Optimizer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Budget Optimizer?

As many as you like. As long as a model supports skills, you can use Budget Optimizer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Budget Optimizer AI skill free?

Yes. It is published on GitHub by indranilbanerjee under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇