roi-calculator
Calculate marketing ROI. Use when: measuring campaign ROAS, CAC, CPL, LTV, or multi-channel attribution returns.
What this skill does
# /digital-marketing-pro:roi-calculator
## Purpose
Campaign ROI calculator with multi-touch attribution models. Produces a comprehensive ROI analysis across channels for budget justification, optimization recommendations, and executive reporting.
## Input Required
The user must provide (or will be prompted for):
- **Campaign spend by channel**: Dollar amounts invested per channel (paid search, paid social, email, SEO, content, events, etc.)
- **Conversions and revenue by channel**: Number of conversions and total revenue attributed to each channel
- **Time period**: The date range for the analysis (week, month, quarter, year)
- **Attribution model preference**: Last-touch, first-touch, linear, time-decay, or position-based (or compare all models)
- **Customer LTV**: Optional -- average customer lifetime value for long-term ROI projection
- **Industry vertical**: For benchmark comparison context
- **Conversion definitions**: What counts as a conversion (purchase, lead, signup, demo request, trial start, etc.)
- **Cost inputs beyond ad spend**: Optional -- agency fees, tool costs, creative production costs, team time
## 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 voice, compliance, industry context. Check `guidelines/_manifest.json` for restrictions, messaging, channel styles, voice-and-tone rules, and templates. If a template matching this command exists in `~/.claude-marketing/brands/{slug}/templates/`, apply its format. If no brand exists, prompt for `/digital-marketing-pro:brand-setup` or proceed with defaults.
2. **Check campaign history**: Run `python campaign-tracker.py --brand {slug} --action list-campaigns` to pull historical campaign data for trend comparison and period-over-period analysis.
3. **Run ROI calculator**: Execute `scripts/roi-calculator.py` with spend, revenue, and conversion data to compute channel-level and blended metrics.
4. **Calculate channel-level ROI and ROAS**: For each channel, compute ROI ((revenue - cost) / cost), ROAS (revenue / cost), CPA (cost / conversions), CPL (cost / leads), and contribution margin percentage.
5. **Apply attribution model**: Redistribute credit across channels using the selected attribution model. If the user wants a comparison, run all five models (last-touch, first-touch, linear, time-decay, position-based) and show how each model shifts credit between channels.
6. **Calculate blended ROI**: Aggregate all channels into a total campaign ROI, blended ROAS, and overall CPA. Factor in LTV if provided to project short-term vs long-term ROI and payback period.
7. **Compare against industry benchmarks**: Reference `skills/context-engine/industry-profiles.md` to contextualize whether channel performance is above, at, or below industry averages for the brand's vertical.
8. **Identify efficiency opportunities**: Flag channels with declining marginal returns, channels where increased spend could yield disproportionate gains, and channels where CPA exceeds LTV (unsustainable spend).
9. **Calculate payback period**: If LTV data is provided, compute the months to break even on customer acquisition cost per channel, identifying which channels pay back fastest and which require patience for long-term value.
10. **Model budget reallocation scenarios**: Generate 2-3 reallocation scenarios shifting budget from underperformers to high-performers, with projected impact on total ROI, total conversions, and blended CPA.
11. **Log results to campaign tracker**: Record the ROI analysis in `campaign-tracker.py` so future analyses can compare period-over-period trends and validate whether recommended reallocations improved performance.
12. **Compile executive report**: Format the analysis for stakeholder presentation with clear takeaways, data tables ready for visualization, and actionable next steps.
## Output
A structured ROI analysis report containing:
- Channel-by-channel performance table (spend, revenue, conversions, ROI, ROAS, CPA, CPL)
- Blended campaign ROI and overall ROAS with total spend and revenue summary
- Attribution model comparison showing credit distribution shifts across models
- LTV-adjusted ROI projection and payback period analysis (if customer LTV was provided)
- Industry benchmark comparison with above/at/below performance ratings per channel
- Efficiency analysis identifying diminishing returns and scaling opportunities
- Budget reallocation recommendations with 2-3 modeled scenarios and projected outcomes
- Underperforming channel diagnosis with specific improvement actions
- Period-over-period trend comparison (if historical data is available from campaign tracker)
- Executive summary with top 3 insights and recommended next steps
- Visualization-ready data tables formatted for Google Sheets or slide deck export
## Agents Used
- **analytics-analyst** -- ROI computation, attribution modeling, benchmark comparison, efficiency analysis, payback period calculation, and data-driven recommendations
- **marketing-strategist** -- Budget optimization strategy, channel mix recommendations, reallocation scenario design, and executive-level insight framing for stakeholder communication
Related in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".