Help us improve
Share bugs, ideas, or general feedback.
From sales
Analyzes win/loss patterns in B2B sales from CRMs like HubSpot/Salesforce/Attio, enriches with emails/calls/web data, outputs ICP persona and strategy .docx report.
npx claudepluginhub naveedharri/benai-skills --plugin salesHow this skill is triggered — by the user, by Claude, or both
Slash command
/sales:win-loss-analysisThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build a data-driven understanding of why deals close and why they don't, then deliver a comprehensive persona and strategy document as a professional .docx report.
Analyze won and lost deals to identify patterns, improve win rates, and refine sales strategy. Use this skill whenever a rep or manager wants to understand why deals were won or lost, identify trends in pipeline outcomes, review deal performance over time, says "why did we lose that deal", "analyze our win rate", "what do our wins have in common", "post-mortem on this deal", or when conducting quarterly business reviews. Also trigger when someone uploads CRM export data for deal analysis, or when building training materials based on historical deal outcomes.
Mines high-value prospects from CRM lost/churned stages by cross-referencing LinkedIn data, Apify company scrapes, domain filters, and comms history for re-engagement.
Analyzes won and lost deals to surface patterns, competitor intelligence, and actionable recommendations for improving win rates.
Share bugs, ideas, or general feedback.
Build a data-driven understanding of why deals close and why they don't, then deliver a comprehensive persona and strategy document as a professional .docx report.
The report includes: Executive summary with metrics, won/lost case studies with evidence from calls and emails, side-by-side pattern comparison, a complete winning prospect persona, red flags and disqualification criteria, strategic recommendations, and data appendix.
Use AskUserQuestion (3-4 questions max) to gather:
Confirm understanding in one sentence before proceeding.
Goal: Clean Won and Lost deal lists with contact details, minimizing API calls.
references/crm-attio.md | HubSpot → references/crm-hubspot.md | Salesforce → references/crm-salesforce.md | Other → references/crm-generic.mdgmail.com, yahoo.com, hotmail.com, outlook.com, icloud.com, googlemail.com, aol.com, protonmail.com, live.com, me.com, mail.com, yandex.com, zoho.com, gmx.com, fastmail.com). Keep a count of filtered leads for the report.CRITICAL — Save extracted data to files immediately:
analysis_summary.json # Counts, value distributions, aggregate stats
won_deals.json # Full won deal list
lost_deals.json # Full lost deal list
domain_analysis.json # Business vs personal email breakdown
This prevents data loss if enrichment phases hit errors or context limits. Never rely on holding all data in conversation context alone.
CRITICAL — Validate CRM field reliability:
After initial extraction, check which CRM fields actually contain useful data vs. being mostly empty. Fields like lost_reason, agency, requirement, source, and other custom fields are frequently empty or unreliable (e.g., 126/131 lost deals having "None" as lost reason is common). Before relying on any field for analysis:
A healthy analysis needs 15-20+ leads per bucket. If thin, discuss including personal-email leads or widening date range.
Raw CRM data tells you WHAT happened; enrichment tells you WHY. Complete ALL enrichment BEFORE building the report. Run streams in parallel using sub-agents where possible.
Step 1 — Metadata search: Find emails involving top leads by deal size (10-15 per bucket). Use search-emails-by-metadata (Attio), engagement APIs (HubSpot), or activity records (Salesforce).
Step 2 — Read actual content: Metadata only gives subject lines and timestamps. You MUST read the actual email body using get-email-content (Attio) or equivalent to extract: objections raised, pricing discussions, competitive mentions, enthusiasm/hesitation signals, specific questions asked.
What to capture per lead: Email count, date range, key content themes, standout quotes, response patterns.
For top 10-15 leads per bucket, quick web research via WebSearch/WebFetch: company size, industry, tech stack, growth signals. 2-3 minutes per company max — focus on cohort patterns.
Search ALL available transcript tools — don't stop at one source:
fireflies_search, fireflies_get_transcript, fireflies_get_summarysearch-call-recordings-by-metadata, semantic-search-call-recordings, get-call-recordingFireflies search strategy: Use targeted queries — search by company name, contact name, or domain individually. Broad keyword searches return massive result sets that overflow context. Example: search "Boostability" not "SEO demo call".
What to extract: Number of calls, call progression arc, pain points (concrete vs vague), buying signals, objections, who attended, prospect's stated intent. Capture direct quotes for the report.
Save enrichment results to files as you go: email_content_analysis.json, won_transcripts_analysis.json, lost_transcripts_analysis.json, fireflies_meeting_map.json. This protects against context loss and lets you reference exact data during report generation.
Use sub-agents (Task tool) to parallelize: one for Won enrichment, one for Lost enrichment, web research concurrent with email/transcript lookups.
Compare Won vs Lost across 6 dimensions. For each, document the pattern, the contrast, supporting evidence (specific leads, quotes), and confidence level.
For lost deal reasons: Don't rely on the CRM lost_reason field — it's almost always empty. Instead, categorize losses from enrichment evidence (transcripts, emails, web research) into archetypes like: Went Cold, Enterprise Procurement Complexity, Product Quality Issues, Pricing/Cost, Competitive/Build Own, Poor Product Fit.
Synthesize findings into an actionable winning persona:
Persona Card: Title/role, company type, size/revenue range, current pain, primary intent, technical profile, buying behavior, geographic focus, deal size sweet spot, key buying signals, red flags.
What They Say: 4-6 actual quotes or paraphrased themes from transcripts that winning prospects consistently express.
Disqualification Criteria: 5-8 specific, observable red flags tied to evidence from lost deal analysis.
Strategic Recommendations: 8-12 actionable recommendations across sales process, targeting/messaging, and pipeline hygiene.
Generate professional PNG charts using the included scripts/generate_charts.py (matplotlib, JSON config → 300 DPI PNGs). Supported types: metric_cards, donut, grouped_bar, horizontal_bar, stacked_bar.
pip install matplotlib --break-system-packages -q 2>/dev/null || pip install matplotlib -q
Build charts_config.json with these (replace placeholder values with actual data):
metric_cards): Won count, Lost count, Avg Won Deal size, Win Rategrouped_bar): Won vs Lost by value rangesdonut): Evidence-based categories from enrichment (NOT from empty CRM field)grouped_bar): Won vs Lost by regionhorizontal_bar, green): Where you win mosthorizontal_bar, red): Where you lose mosthorizontal_bar): Avg meeting duration, questions per meeting, calls per deal, email touches — derived from transcript/email enrichmenthorizontal_bar): % of won deals showing each winning traitOptional: Lead source distribution, sales cycle comparison, priority distribution.
python <skill_path>/scripts/generate_charts.py --config charts_config.json --output-dir ./charts
Colors: Green #4CAF50 (Won) | Red #E53935 (Lost) | Navy #1B3A5C (headers) | Teal #2E86AB (accents) | Orange #FF9800 | Purple #7E57C2
Chart sizes for docx (width x height points): Metric cards 600x180 | Donut 500x360 | Grouped bar 560x380 | Horizontal bar 560x280 (+45 per extra bar)
Read the docx skill (SKILL.md) for docx-js technical instructions. Embed charts using ImageRun:
const chartBuffer = fs.readFileSync('./charts/metrics_summary.png');
new Paragraph({
children: [new ImageRun({ data: chartBuffer, transformation: { width: 600, height: 180 }, type: 'png' })],
spacing: { before: 200, after: 200 },
alignment: AlignmentType.CENTER,
})
Save to outputs directory. Offer executive summary as separate doc if report is lengthy.