modeling-margin-analysis

Deconstructs gross, operating, and net margin trends with driver attribution and normalization. Use when analyzing profitability, attributing margin changes, or benchmarking margins.

11 stars

Best use case

modeling-margin-analysis is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Deconstructs gross, operating, and net margin trends with driver attribution and normalization. Use when analyzing profitability, attributing margin changes, or benchmarking margins.

Teams using modeling-margin-analysis should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/modeling-margin-analysis/SKILL.md --create-dirs "https://raw.githubusercontent.com/CaseMark/skills/main/skills/finance/modeling-margin-analysis/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/modeling-margin-analysis/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How modeling-margin-analysis Compares

Feature / Agentmodeling-margin-analysisStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Deconstructs gross, operating, and net margin trends with driver attribution and normalization. Use when analyzing profitability, attributing margin changes, or benchmarking margins.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Modeling Margin Analysis

Deconstructs gross, operating, and net margin trends with driver attribution and normalization for equity research and investment analysis.

## When To Use

- Analyzing historical profitability trends across reporting periods (quarterly or annual)
- Attributing margin expansion or contraction to specific cost or revenue drivers
- Benchmarking a company's margin profile against peers or sector medians
- Building forward margin assumptions for DCF, LBO, or earnings models
- Evaluating management guidance on margin trajectory against historical patterns
- Assessing the impact of mix shifts, pricing changes, or cost restructuring on profitability

## Inputs To Gather

- **Income statement data**: Revenue, COGS, SG&A, R&D, D&A, other operating expenses, interest, taxes — minimum 3 years quarterly or 5 years annual
- **Segment-level detail**: Revenue and operating income by business segment or product line where available
- **Management commentary**: Earnings call transcripts, investor presentations referencing margin drivers
- **Peer financials**: Comparable company income statements for benchmarking
- **One-time items**: Restructuring charges, litigation costs, asset impairments, gain/loss on disposals — for normalization
- **Industry context**: Input cost indices (e.g., commodity prices, labor rates) relevant to COGS or opex [VERIFY sector-specific cost drivers]

## Workflow

1. **Extract and organize margin data**
   - Calculate gross margin, operating margin (EBIT), EBITDA margin, and net margin for each period
   - Separate segment-level margins where segment reporting is available
   - Flag any periods with restated financials or accounting standard changes [VERIFY GAAP vs. IFRS treatment]

2. **Normalize for non-recurring items**
   - Identify and exclude one-time charges: restructuring, impairments, legal settlements, M&A transaction costs
   - Adjust for stock-based compensation treatment if comparing GAAP vs. non-GAAP peers
   - Document every normalization adjustment with source reference and dollar amount

3. **Decompose margin changes period-over-period**
   - Perform margin bridge analysis: isolate the basis-point impact of each line item on margin change
   - Attribute gross margin movement to: volume leverage, price/mix, input cost changes, FX translation
   - Attribute operating margin movement to: gross margin flow-through, SG&A leverage/deleverage, R&D intensity changes, D&A step-ups
   - Express each driver as bps contribution to total margin change

4. **Benchmark against peers**
   - Compare normalized margins to peer group medians and interquartile range
   - Identify structural margin gaps — scale advantage, business mix, geographic exposure, vertical integration
   - Note where accounting policy differences distort peer comparisons (e.g., capitalization of development costs, lease treatment) [VERIFY comparability adjustments needed]

5. **Build forward margin assumptions**
   - Project each margin layer based on identified drivers and management guidance
   - Model base, bull, and bear scenarios with explicit assumptions per driver
   - Sensitize key variables: gross margin to input cost changes (e.g., +/- 100bps per 10% commodity move), operating margin to revenue growth (incremental margins)
   - Calculate implied incremental margins and compare to historical range for reasonableness

6. **Compile output and document**
   - Assemble margin trend tables, bridge charts, and peer comparison matrices
   - Summarize key findings: dominant margin drivers, structural vs. cyclical factors, forecast risks
   - Flag all assumptions with confidence level and mark uncertain inputs with [VERIFY]

## Output

- **Margin trend table**: Gross, EBITDA, EBIT, and net margins by period (reported and normalized)
- **Margin bridge**: Period-over-period waterfall showing bps contribution by driver for each margin layer
- **Peer comparison matrix**: Normalized margins ranked against comps with structural explanations for outliers
- **Forward margin build**: Base/bull/bear projections with explicit driver assumptions per scenario
- **Sensitivity table**: Key margin sensitivities (e.g., margin impact per unit change in top 3 cost drivers)
- **Assumptions log**: Every normalization adjustment and forecast assumption with source citation

## Quality Checks

- Verify that normalized margins reconcile back to reported figures plus/minus documented adjustments
- Confirm margin bridge bps contributions sum to actual margin change (no residual > 5bps without explanation)
- Check that forward margins imply reasonable incremental margins relative to historical patterns (flag if incremental operating margin exceeds 60% or is negative without clear cause)
- Validate peer comparisons use consistent fiscal periods and accounting treatments
- Ensure every [VERIFY] tag has a clear description of what requires confirmation and by whom
- Confirm that segment margins, when summed with appropriate corporate overhead allocation, reconcile to consolidated margins
- Cross-check projected margins against management's stated targets and flag material deviations

Related Skills

performing-frozen-section-analysis

11
from CaseMark/skills

Guides intraoperative frozen section evaluation with rapid diagnostic protocols and communication. Use when performing frozen sections, providing intraoperative diagnoses, or communicating preliminary results.

conducting-stark-law-analysis

11
from CaseMark/skills

Evaluates physician self-referral arrangements against Stark Law exceptions with documentation. Use when analyzing Stark compliance, evaluating referral arrangements, or documenting exception applicability.

conducting-false-claims-analysis

11
from CaseMark/skills

Evaluates billing practices for False Claims Act risk with qui tam and voluntary disclosure considerations. Use when assessing FCA risk, evaluating billing compliance, or considering self-disclosure.

conducting-anti-kickback-analysis

11
from CaseMark/skills

Evaluates payment arrangements against Anti-Kickback Statute safe harbors with documentation. Use when analyzing AKS compliance, evaluating compensation arrangements, or documenting safe harbor applicability.

tax-return-analysis

11
from CaseMark/skills

Produces litigation-ready financial memoranda from multi-year tax returns, covering income trends, filing status changes, deduction patterns, red flags, and trustee considerations. Use when reviewing Form 1040s for bankruptcy means testing, family law support calculations, personal injury damages, or financial discovery analysis.

risk-analysis

11
from CaseMark/skills

Generates structured risk analysis summaries for legal matters, identifying and evaluating risks by severity and likelihood with quantified exposures and mitigation strategies. Use when preparing risk assessments, exposure analyses, liability summaries, or pre-filing risk evaluations across litigation, regulatory, contractual, reputational, and operational domains.

patent-infringement-analysis

11
from CaseMark/skills

Generates a structured patent infringement analysis mapping claims to accused product features via claim charts. Covers Phillips claim construction, literal infringement, doctrine of equivalents, validity defenses, damages, and strategic recommendations. Use when analyzing patent infringement, preparing claim charts, evaluating IP litigation risk, or assessing licensing and design-around options.

medical-billing-analysis

11
from CaseMark/skills

Produces a litigation-ready analysis of medical bills and supporting records for personal injury, medical-malpractice, workers'-compensation, and disability cases. Validates CPT/HCPCS/ICD-10 codes against documentation, applies a per-charge causation screen, runs a UCR/FAIR Health/MPFS reasonableness review, surfaces unbundling, upcoding, duplicate and phantom billing, flags letter-of-protection inflation, identifies collateral-source and lien interfaces, and outputs a memo whose every finding cites document, page, and Bates. Trigger on: medical billing analysis, medical bill audit, billing reasonableness review, UCR review, CPT/ICD code review, NCCI/unbundling/upcoding review, billed vs. paid analysis, letter of protection (LOP) analysis, collateral source review, chargemaster markup, causation chain, IME rebuttal prep, demand-package billing exhibit, mediation statement billing section, lien interface identification.

ip-infringement-analysis

11
from CaseMark/skills

Produces structured IP infringement memoranda evaluating patents, trademarks, copyrights, and trade secrets. Performs claim-by-claim patent comparisons, likelihood-of-confusion trademark tests, substantial similarity copyright assessments, and trade secret misappropriation evaluations with defense and remedies analysis. Use for infringement opinions, pre-filing assessments, cease-and-desist support, licensing disputes, or settlement valuation.

ime-report-analysis

11
from CaseMark/skills

Analyzes defense Independent Medical Examination (IME) reports for personal injury litigation, producing a plaintiff-side strategic memorandum with findings summary, treating-physician comparison, bias indicators, and cross-examination roadmap. Use when reviewing defense IME reports during discovery or pre-trial, preparing to depose or cross-examine a defense medical expert, or evaluating IME impact on case valuation. Trigger keywords: IME, independent medical examination, defense expert, medical examination report, cross-examination, bias indicators, impairment rating.

financial-analysis-summary

11
from CaseMark/skills

Generates structured summaries of financial analyses for commercial litigation. Use when summarizing expert financial reports, economic damages analyses, lost profits calculations, business valuations, or financial dispute evidence for litigation support.

expert-witness-report-analysis

11
from CaseMark/skills

Critiques opposing expert witness reports for admissibility challenges, disclosure deficiencies, and cross-examination vulnerabilities. Triggers when the user provides an expert report for analysis, needs Daubert/Frye assessment, requests a motion to exclude or limit expert testimony, or prepares deposition or trial cross-examination of an opposing expert.