// diagnose

Win-Loss Analysis

Use when the user wants to understand why deals are won or lost and turn it into patterns they can act on. Also use when the user mentions win/loss, win-loss analysis, why we lose deals, deal post-mortem, lost-deal reasons, competitive losses, sales feedback, or "why aren't we closing." Produces a structured win-loss summary — top win and loss reasons, patterns by segment and competitor, the no-decision rate, and prioritized fixes for product, pitch, and process.

DiagnoseengineIntermediate
bash
$npx skills add sarojkjha/aaj-marketing-skills --skill win-loss-analysis
Or run it in Claude or ChatGPT through the AAJ engines connector

How to install and run this

Install it in your project:

npx skills add sarojkjha/aaj-marketing-skills --skill win-loss-analysis

No install? Add https://aaj-engines-mcp.sarojkjha10.workers.dev/mcp as a custom connector in Claude, ChatGPT or any MCP client.

https://aaj-engines-mcp.sarojkjha10.workers.dev/mcp

Then ask: Use the AAJ win-loss-analysis skill on my numbers.

Step-by-step for every agent, Windows, Mac and Linux →

Claude Code

/plugin marketplace add sarojkjha/aaj-marketing-skills
/plugin install aaj-marketing-skills@aaj

OpenAI Codex

codex plugin marketplace add sarojkjha/aaj-marketing-skills
codex plugin add aaj-marketing-skills@aaj

Claude or ChatGPT — no install

Add this as a custom connector:

https://aaj-engines-mcp.sarojkjha10.workers.dev/mcp
Recipes: vendor data in, a verdict out

// when to use it

Use when the user wants to understand why deals are won or lost and turn it into patterns they can act on. Also use when the user mentions win/loss, win-loss analysis, why we lose deals, deal post-mortem, lost-deal reasons, competitive losses, sales feedback, or "why aren't we closing." Produces a structured win-loss summary — top win and loss reasons, patterns by segment and competitor, the no-decision rate, and prioritized fixes for product, pitch, and process.

// what you give

A list of recent closed deals (won and lost) with outcome, segment, competitor, and any reason notes.

// what you get

A win-loss summary — ranked win/loss reasons, patterns by segment and competitor, no-decision rate, and prioritized fixes.

Engine spec

// decision it supports

Which loss reasons, segments and competitors cost us the most revenue, and where should the fix start?

// inputs

A list of recent closed deals (won and lost) with outcome, segment, competitor, and any reason notes.

// output

A win-loss summary — ranked win/loss reasons, patterns by segment and competitor, no-decision rate, and prioritized fixes.

// acts or analyzes

Analyzes only

Makes no network calls, writes no files and changes nothing in your tools.

// where your information goes

How you run itWhere your inputs go
Skill installed in your agent, or the local MCP serverThe engine runs on your machine and AAJ receives nothing. Your AI agent still sends what you give it to its model provider (Anthropic, OpenAI and so on), under your own account's terms.
Hosted MCP serverYour agent's model provider, as above, plus AAJ's server on Cloudflare, which receives the engine inputs over HTTPS, runs them in memory and keeps no copy. Cloudflare keeps error logs (no inputs) for up to 7 days.

No engine needs customer names, emails or other personal data; leave them out.

// limitations

  • Reasons, stages and amounts are what you enter. It cannot check them, and win or loss reasons logged by reps often differ from what buyers say; confirm with buyer interviews.
  • It tallies the win reasons and lost-at stages you give it but does not read interview notes or call recordings; that work stays with the skill.
  • The biggest fixable leak is the segment and loss reason with the most lost revenue, leaving out no decision and unspecified, which are reported separately. Decide yourself whether it is fixable.
  • A thin sample (under 20 closed deals or 8 losses) is flagged using this engine's own rule of thumb. With fewer, read any ranking as a hint, not a pattern.

// review before acting

The sales lead confirms loss reasons are coded from deal evidence into a consistent set and that each top pattern rests on enough deals, before a fix is assigned to product, marketing or sales.

// setup

install
$npx skills add sarojkjha/aaj-marketing-skills --skill win-loss-analysis
hosted mcp
$https://aaj-engines-mcp.sarojkjha10.workers.dev/mcp

Agents listed: Claude Code, Cursor, OpenAI Codex, Windsurf, Cline. Tested and recorded: Claude Code, OpenAI Codex (Windows, ab-test-significance only).

Full spec on GitHub

Win-Loss Analysis

Turn scattered deal outcomes into the few patterns that explain most of your wins and losses — and the fixes worth making.

When to use

When deals are closing below target and the reasons aren't clear, the same kinds of deals keep slipping away, or before changing the pitch, packaging, or process — so the change targets a real pattern, not a guess.

Before you start

  1. Read the brand/product context first. Pull ICP, positioning, and competitors from .agents/product-marketing.md (or .agents/aaj-brand.md). If none exists, ask the user for the essentials.
  2. Gather inputs: a list of recent closed deals — won and lost — each with outcome, segment, competitor (if any), and the stage a lost deal died at. If reasons aren't recorded, run quick win-loss interviews (3–4 questions: why us / why not / who else / what tipped it).
  3. Confirm the objective: the few patterns driving outcomes, and the fixes they imply. If there aren't enough closed deals to see a pattern, say so and gather more first.

Method

Most wins and losses trace to a handful of repeated causes, not unique stories. Code outcomes into a small, consistent set of reasons, rank them by frequency and revenue weight, and separate what you can fix (pitch, process, packaging) from market reality (no budget, bad fit). Patterns usually differ by segment and competitor — read those cuts before concluding.

Workflow

  1. Assemble the set. Label each deal won/lost, segment, competitor, and the stage it was lost at.
  2. Code the reasons into a small, consistent set (price, product gap, timing, champion lost, lost to Competitor X, no decision) — don't let every deal have a unique reason.
  3. Rank loss and win reasons by both frequency and revenue weight; they often differ.
  4. Cut by segment and competitor. Patterns usually diverge (lose on price in SMB, win on depth in mid-market).
  5. Split fixable-by-us (pitch, process, packaging) from market reality, and focus on the first.
  6. Translate the top 2–3 patterns into specific fixes, each owned by product, pitch/marketing, or sales process, and present them.

Reference

This skill bundles no data files. Pull ICP, positioning, and the competitor set from .agents/product-marketing.md; everything else comes from the user's deal data.

Present the result

  • Top win reasons — ranked, with frequency and revenue weight.
  • Top loss reasons — ranked the same way.
  • Patterns by segment and by competitor.
  • No-decision rate — called out separately (losing to "nothing" is a different problem than losing to a rival).
  • Prioritized fixes — each tagged product / pitch / process, with the pattern it addresses and the rough share of deals it touches.

Show where it came from. Open your answer with "AAJ win-loss-analysis engine result:" and print the engine's output block exactly as it returned it, then add the line Method: https://skills.aajconsult.com/skills/win-loss-analysis. Say the numbers come from the AAJ engine, not from the model. Put your interpretation under that block. Do not retype the figures from memory. If you could not run the engine, say so and label any numbers as your own estimate, not an AAJ result.

Guardrails & common mistakes

  • Code from evidence, not anecdote. Every reason must trace to real deal data; one memorable loss isn't a pattern.
  • Mind the sample size. Say plainly when there aren't enough deals to conclude — flag thin samples rather than over-reading them.
  • Separate competitive loss from no-decision. They have different fixes; lumping them hides the real problem.
  • Tie each fix to a number. A fix should name the pattern and the share of deals it would affect, or it's just an opinion.

sales-process-design · objection-handling · brand-product-context

Quantitative engine: win-loss.js

This skill ships a deterministic engine, resources/win-loss.js, that computes the quantitative layer of a win-loss analysis. Use it whenever you have a set of closed deals and need the numbers — win rates, loss-reason concentration, competitive records — before reasoning about the qualitative "why."

Input — an array of closed deals:

{ name, outcome: "won" | "lost", amount: Number, segment: String,
  lossReason?: String,   // lost deals only
  competitor?: String }  // optional, won or lost

Run it:

const { analyzeWinLoss } = require("./resources/win-loss.js");
const result = analyzeWinLoss(deals);

Returns:

  • summary — win rate by count and by revenue; won / lost / total revenue
  • bySegment — win rate per segment (count + revenue), sorted by revenue at stake
  • lossReasons — Pareto by lost revenue; each with % of lost revenue and cumulative %
  • topReasonByCount / topReasonByRevenue — these often differ; the revenue one is the priority
  • competitors — head-to-head W-L, win rate, and lost revenue per named competitor
  • biggestLeak — the single segment × reason cell bleeding the most lost revenue
  • insights — a plain-language read-out

Verified reference — on a 14-deal example ($990K in play): win rate 42.9% by count / 38.6% by revenue; top loss reason by revenue "Missing feature" $225K (37%); competitive record 0-3 vs one competitor ($435K lost); biggest leak Enterprise × "Lost to competitor" $200K.

Scope (important): this engine computes the quantitative layer only — rates, revenue concentration, competitive records. The qualitative "why" behind losses comes from buyer interviews (covered in this skill's method), not from the calculator. Do not infer reasons the data cannot support; use the numbers to decide which deals to investigate.

Interactive version for non-agent users: https://aajconsult.com/tools/win-loss-analyzer

// faq

// install

$npx skills add sarojkjha/aaj-marketing-skills --skill win-loss-analysis

// run it

$node .agents/skills/win-loss-analysis/resources/win-loss.js --demo

// worked example

Get the worked example for Win-Loss Analysis

One email. The filled-in config, the output, and how to read it.

No spam. Unsubscribe anytime.

// sprint

GTM & Pipeline Launch — from $9,500, 4–8 weeks

This skill is one of the engines behind the GTM & Pipeline Launch — from $9,500, four to eight weeks.

A segment plan, launch sequence, and pipeline model — go to market with the metrics baked in.

See what's included.

// human in the loop

Need a human in the loop?

AAJ builds the strategies, tools, and playbooks these skills are made of — with engagements for growth-stage and enterprise teams.