margin-analyzer

margin-analyzer is a skill for Claude Code, Codex from alebgl77/claude-inc. It costs 101 tokens per session (1,134 once invoked), scanned A, original, MIT.

An analysis of profitability for individual products, services, or clients. It compares revenue with direct costs, assigns overhead, calculates net margins, and estimates the lowest workable price.

In plain words
What is it for?
Use it to rank contribution margins, set price floors, assess discounts, compare product or client profitability, and quantify possible pricing changes.
Why use it?
It shows where profit is actually made when total revenue alone is misleading. It helps identify items to promote, fix, reprice, or stop selling.

Skill for Claude CodeCodex

Part of the claude-inc plugin — 46 skills, 3 commands, 8 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/alebgl77/claude-inc/margin-analyzer
Any agent
npx skills add alebgl77/claude-inc --skill margin-analyzer
Clone the repo
git clone --depth 1 https://github.com/alebgl77/claude-inc

Made for: Claude Code, Codex.

Or install claude-inc, the plugin that ships this one along with the rest of its 46 skills, 3 commands, 8 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for margin-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/skills/alebgl77/claude-inc/margin-analyzer.svg)](https://agentmods.dev/skills/alebgl77/claude-inc/margin-analyzer)
Your own site
<a href="https://agentmods.dev/skills/alebgl77/claude-inc/margin-analyzer"><img src="https://agentmods.dev/badge/skills/alebgl77/claude-inc/margin-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,134 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00101 $0.01134
Opus 5 $0.00051 $0.00567
Sonnet 5 $0.00020 $0.00227
Haiku 4.5 $0.00010 $0.00113

Measured 3d ago against content hash a26c8daf57c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

margin-analyzer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/margin-analyzer/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Margin Analyzer — Margin Analyst

"Analyse margins."

Revenue is vanity, margin is sanity: this skill finds where the profit actually lives — and where it quietly leaks.

When to use

  • "Revenue is up 20% but the bank account isn't — where does the money go?"
  • "Which products / services / clients actually make us money?"
  • "Should we raise prices, and on what?"
  • "A client is pushing for a discount — where's my floor?"
  • Before adding a product line or killing one: run the mix first.

Workflow

  1. Pick the unit and ingest data. Product, service line, or client — whichever the decision is about. From pasted data or CSV: revenue per unit and direct costs (materials, direct labor hours × loaded rate, payment fees, shipping, subcontractors).
  2. Compute contribution margin with code. Revenue − direct costs, per unit; rank by CM%. Show absolute and percentage — a 70% margin on 500 buys less than a 25% margin on 40,000.
  3. Allocate overhead and state the method. Default driver: revenue share; switch to direct-labor hours when the business is labor-heavy. Compute net margin per unit. The allocation choice changes the answer — say which was used and why.
  4. Set price floors. Floor = direct cost ÷ (1 − target CM%). Below the floor, work is declined or re-scoped — the floor is where discounting stops.
  5. Run the mix analysis. Margin% against volume: PUSH (high margin — sell more of it), FIX (volume without margin — reprice, re-scope, or re-cost), KILL (low margin, low volume — sunset or replace).
  6. Model three pricing moves with code. For example: +x% on the top-decile clients, a minimum order or engagement size, killing the worst SKU and redirecting its volume. Quantify annual margin impact and name every assumption.
  7. Pick the first move. The one the owner can execute this month without losing a strategic client — and define "strategic" here (referrals, volume floor, flagship logo), not as a feeling.

Output format

MARGIN ANALYSIS — <business> — <period> — unit: <product / service / client>

CONTRIBUTION MARGIN RANKING
Rank | Unit   | Revenue | Direct costs | CM     | CM% | Volume
1    | <name> | 38,000  | 14,400       | 23,600 | 62% | ...
...  | ...    | ...     | ...          | ...    | ... | ...

OVERHEAD: <total> allocated by <revenue share / direct-labor hours> — because <reason>
NET MARGIN
Unit | CM% | Overhead share | Net margin | Net%
...  | ... | ...            | ...        | ...

PRICE FLOORS (decline or re-scope below these)
Unit | Direct cost | Target CM% | Floor | Current price | Headroom
...  | ...         | ...        | ...   | ...           | ...

MIX
PUSH: <units> — <why, and the move that grows them>
FIX:  <units> — <reprice / re-scope / re-cost, with the number>
KILL: <units> — <sunset plan and where the freed capacity goes>

PRICING MOVES (modeled)
1. <move> → +<amount>/yr margin (<assumptions>)
2. <move> → +<amount>/yr (<assumptions>)
3. <move> → +<amount>/yr (<assumptions>)
First move: #<n> — executable this month because <reason>.

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 75 lines · 0 tokens per session scan A a26c8daf57c4

Subscribe to this mod's changes

margin-analyzer is a skill published in the GitHub repository alebgl77/claude-inc (12 stars, last pushed 4d ago), licensed MIT. It adds 101 tokens to every session and 1,134 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

convex-add

Add a capability to the CURRENT Convex app — consults the served Convex capability catalog for always-current procedures (billing, crons, auth, agent, search, …); falls back to built-in hosting or @convex-dev component search. TRIGGER when the user runs /add, or asks to add hosting/publishing or any backend capability…

openclaw/clawhub · 81 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

chenhao-limit-up

Use when evaluating A-share limit-up (涨停板) setups through Chen Hao's sentiment and momentum lens: market emotion cycles, board strength, follow-through, and short-term aggressive momentum trading.

questflowai/investorskills · 44 tokens

southwest

Search Southwest Airlines fares and points pricing via Patchright browser automation. SW is not in any GDS or API. Covers all fare classes, Companion Pass value, and fare drop monitoring.

borski/travel-hacking-toolkit · 40 tokens

trading-risk-gate

Unified pre-trade safety gate: Ruin check (Law #1), ergodicity audit, and win-rate dominance validation. Absorbs: ergodicity-check, law-of-ruin, win-rate-dominance.

winstonkoh87/Athena-Public · 53 tokens

cwv-optimizer

Diagnose and fix Core Web Vitals issues on AEM Edge Delivery Services pages. Goes deeper than generic CWV advice by understanding EDS-specific performance patterns including the 100KB LCP budget, E-L-D loading phases, block rendering behavior, and third-party script impact. Produces specific fixes for LCP, CLS, and…

adobe/skills · 112 tokens