microsoft/competitive-intelligence
Analyzes opportunity data and activity notes to generate competitive intelligence including win/loss rates by competitor, patterns, and rep-ready battlecard talking points. Use when user asks "how are we doing against [competitor]", "competitive analysis", "competitor win rate", "battlecard for [competitor]", "competitive landscape", "why are we losing to [competitor]", or "competitor intelligence".
npx skills add https://github.com/microsoft/dataverse-business-skills --skill competitive-intelligence
Competitive insights are often locked in deal notes, lost opportunity records, and anecdotal rep knowledge. This skill mines Dataverse to surface structured competitive intelligence: which competitors appear most frequently, where deals are being lost to them, what deal patterns correlate with wins vs losses, and what talking points reps should use. This is the Dataverse-internal equivalent of competitive research — drawing from closed deal history rather than external sources.
Accept input from the user:
Calculate date range for analysis: createdon >= '[start_date]'
Important: The opportunity entity does not have a direct competitorid field — the opportunity-to-competitor relationship is many-to-many (opportunitycompetitors_association). When an opportunity is closed, Dynamics 365 creates an opportunityclose activity record which does have a direct competitorid lookup. Use opportunityclose for structured competitor data on closed deals.
Query closed-lost opportunityclose records:
SELECT oc.opportunityid, oc.competitorid, oc.description, oc.createdon,
oc.actualrevenue
FROM opportunityclose oc
WHERE oc.statecode = 1
AND oc.createdon >= '[start_date]'
ORDER BY oc.createdon DESC
Then join to the opportunity table by opportunityid to get deal details:
SELECT opportunityid, name, estimatedvalue, actualclosedate, salesstage,
description, ownerid, customerid, closeprobability
FROM opportunity
WHERE statecode = 2
AND actualclosedate >= '[start_date]'
ORDER BY actualclosedate DESC
Note: If opportunityclose is not populated (competitor not selected at close), fall back to text pattern matching in opportunity description fields as described in Step 3.
Fetch competitor names if competitor table is used:
SELECT competitorid, name, websiteurl, overview, strengths, weaknesses,
opportunitiescomments, threatscomments
FROM competitor
For opportunities without structured competitor fields, search text fields for competitor names:
SELECT opportunityid, name, estimatedvalue, statecode, actualclosedate,
salesstage, description, currentsituation, customerneed, customerpainpoints
FROM opportunity
WHERE statecode IN (1, 2)
AND actualclosedate >= '[start_date]'
Search description, currentsituation, and customerpainpoints for known competitor keywords or names provided by the user. Categorize each mention as:
Search activity notes for competitor mentions:
SELECT annotationid, notetext, subject, objectid, createdon
FROM annotation
WHERE createdon >= '[start_date]'
Search notetext for competitor name patterns. Extract:
Also search phonecall and appointment descriptions:
SELECT activityid, subject, description, regardingobjectid, statecode
FROM phonecall
WHERE createdon >= '[start_date]'
From Step 2, you now have two lists of opportunityids: [lost_opportunityids] (from opportunityclose where competitorid matches and deal was lost) and [won_opportunityids] (from a separate opportunityclose query for won deals). Run an additional query to capture won opportunityclose records for this competitor:
SELECT oc.opportunityid, oc.createdon, oc.actualrevenue
FROM opportunityclose oc
WHERE oc.competitorid = '[competitorid]'
AND oc.createdon >= '[start_date]'
Cross-reference these opportunityids against opportunity.statecode to split into won vs lost buckets. Then aggregate:
Won opportunities where competitor was present:
SELECT COUNT(opportunityid) as won_count, SUM(estimatedvalue) as won_value
FROM opportunity
WHERE statecode = 1
AND actualclosedate >= '[start_date]'
Filter results programmatically to only those opportunityids found in the won opportunityclose results above.
Lost opportunities to competitor:
SELECT COUNT(opportunityid) as lost_count, SUM(estimatedvalue) as lost_value
FROM opportunity
WHERE statecode = 2
AND actualclosedate >= '[start_date]'
Filter results programmatically to only those opportunityids in [lost_opportunityids] from Step 2.
Calculate:
For won deals with competitor present vs lost deals to competitor, compare:
Deal size distribution:
SELECT COUNT(opportunityid) as count, SUM(estimatedvalue) as total_value
FROM opportunity
WHERE statecode = 1
AND estimatedvalue < 25000
Filter results programmatically to only those opportunityids in [won_opportunityids]. Repeat for medium ($25K-$100K) and enterprise (>$100K) segments; run equivalent queries for statecode = 2 filtered to [lost_opportunityids].
Industry distribution:
SELECT account.industrycode, COUNT(opportunity.opportunityid) as count
FROM opportunity
JOIN account ON opportunity.customerid = account.accountid
WHERE opportunity.statecode = 2
AND opportunity.actualclosedate >= '[start_date]'
GROUP BY account.industrycode
Filter results programmatically to only those opportunityids in [lost_opportunityids] from Step 2.
Stage at loss:
SELECT salesstage, COUNT(opportunityid) as lost_count, SUM(estimatedvalue) as lost_value
FROM opportunity
WHERE statecode = 2
AND actualclosedate >= '[start_date]'
GROUP BY salesstage
Filter results programmatically to only those opportunityids in [lost_opportunityids] from Step 2.
From text mining in Step 4, categorize recurring themes from notes and activity descriptions when competitor is mentioned:
Count frequency of each theme across deal notes.
For won deals where this competitor was present, identify common factors:
Qualification strength in wins:
SELECT budgetstatus, decisionmaker, need, purchasetimeframe, purchaseprocess,
COUNT(opportunityid) as count
FROM opportunity
WHERE statecode = 1
AND actualclosedate >= '[start_date]'
GROUP BY budgetstatus, decisionmaker, need, purchasetimeframe, purchaseprocess
Filter results programmatically to only those opportunityids in [won_opportunityids] from Step 5.
Note which BANT patterns appear most often in wins — these inform the competitive playbook.
Activity volume in wins vs losses:
Count total activities per opportunity for wins and losses separately using activitypointer to identify engagement differences.
COMPETITIVE INTELLIGENCE REPORT
Competitor: [Competitor Name]
Period: [Start Date] – [End Date]
Generated: [Today's Date]
═══════════════════════════════════════════════════════════
EXECUTIVE SUMMARY
───────────────────────────────────────────────────────────
Deals Analyzed: [n won] wins / [n lost] losses
Win Rate (competitive): [n]%
Revenue Won (competitive): $[value]
Revenue Lost to Competitor: $[value]
COMPETITIVE PERFORMANCE BY DEAL SIZE
───────────────────────────────────────────────────────────
Small (<$25K): Win rate [n]% | [n] won, [n] lost
Medium ($25K-$100K): Win rate [n]% | [n] won, [n] lost
Enterprise (>$100K): Win rate [n]% | [n] won, [n] lost
WHERE WE LOSE
───────────────────────────────────────────────────────────
Most losses occur at: [Stage] stage ([n]% of losses)
Top industries lost: [Industry 1] ([n] deals), [Industry 2] ([n] deals)
Average deal size lost: $[value] vs average deal size won: $[value]
COMMON OBJECTIONS (from deal notes)
───────────────────────────────────────────────────────────
1. Price/Cost concerns — mentioned in [n]% of lost deals
2. [Feature gap] — mentioned in [n]% of lost deals
3. [Incumbent relationship] — mentioned in [n]% of lost deals
WIN PATTERNS (what works in competitive deals)
───────────────────────────────────────────────────────────
✓ Economic buyer engaged: [n]% of wins vs [n]% of losses
✓ Budget confirmed before Propose: [n]% of wins vs [n]% of losses
✓ Higher activity volume: [n] avg activities (wins) vs [n] (losses)
✓ Shorter sales cycle: [n] avg days (wins) vs [n] avg days (losses)
BATTLECARD: [COMPETITOR NAME]
───────────────────────────────────────────────────────────
Their strengths (from deal notes):
• [Strength extracted from notes]
• [Strength extracted from notes]
Common objections and responses:
• "They're cheaper" → [Response based on win patterns]
• "[Feature gap]" → [Response/workaround]
• "We already know them" → [Response focused on differentiation]
Where we win:
• [Scenario 1 — e.g., enterprise deals with complex integration needs]
• [Scenario 2 — e.g., accounts with active support issues with competitor]
• [Scenario 3 — e.g., deals where economic buyer is engaged early]
Where to be careful:
• [Risk area 1 — e.g., SMB price-sensitive deals]
• [Risk area 2 — e.g., industries where competitor has strong presence]
RECOMMENDED ACTIONS
───────────────────────────────────────────────────────────
1. [Specific action based on loss patterns]
2. [Coaching recommendation for reps]
3. [Process change to improve win rate]
═══════════════════════════════════════════════════════════
Deliver a two-part output:
User Input:
"Show me competitive intelligence on Acme Corp for the last 6 months."
Skill Output:
COMPETITIVE INTELLIGENCE REPORT
Competitor: Acme Corp | Period: Sep 2025 – Mar 2026
═══════════════════════════════════════════════════════════
EXECUTIVE SUMMARY
Win Rate vs Acme Corp: 38% (vs 61% overall win rate)
Revenue Won: $420,000 | Revenue Lost to Acme: $680,000
COMPETITIVE PERFORMANCE BY DEAL SIZE
Small (<$25K): 55% win rate — strongest segment
Medium ($25K-$100K): 32% win rate — significant gap
Enterprise (>$100K): 18% win rate — critical weakness
WHERE WE LOSE
Most losses at: Propose stage (67% of losses)
Top industries: Financial Services (5 deals), Healthcare (3 deals)
COMMON OBJECTIONS
1. Price — mentioned in 71% of lost deals
2. Existing integration with their platform — 43% of lost deals
3. Acme's brand recognition in FSI — 29% of lost deals
WIN PATTERNS
✓ Economic buyer engaged early: 78% of wins vs 22% of losses
✓ POC completed before proposal: 64% of wins vs 11% of losses
BATTLECARD: ACME CORP
"They're cheaper" → "Our TCO over 3 years is [X]% lower due to..."
"We use their platform" → "Our API integrates in <2 hours — here's a reference customer..."
| Table | Purpose |
|-------|---------|
| opportunity | Win/loss records and deal details |
| opportunityclose | Structured competitor data on closed deals (has direct competitorid lookup) |
| competitor | Structured competitor profiles |
| account | Industry and firmographic context |
| activitypointer | Activity volume comparison |
| annotation | Mining notes for competitive mentions |
| phonecall | Call descriptions for competitor mentions |
opportunity:
statecode (STATE) - Open(0), Won(1), Lost(2)description (MULTILINE TEXT) - General opportunity notescurrentsituation (MULTILINE TEXT) - Customer's current environmentactualclosedate (DATE) - When deal was closedsalesstage (CHOICE) - Stage at closeopportunity has no direct competitorid field — the relationship is many-to-many via opportunitycompetitors_association. Use opportunityclose.competitorid for closed deal competitor data.opportunityclose:
opportunityid (LOOKUP) - Links to the closed opportunitycompetitorid (LOOKUP) - Competitor selected at close (direct lookup, use this for competitive analysis)description (MULTILINE TEXT) - Close reason / notes entered at time of closeactualrevenue (MONEY) - Final deal value at closestatecode (STATE) - Activity completion statecreatedon (DATETIME) - When the close activity was createdcompetitor:
name (NVARCHAR) - Competitor namestrengths (MULTILINE TEXT) - Known strengthsweaknesses (MULTILINE TEXT) - Known weaknessesoverview (MULTILINE TEXT) - General descriptionopportunitiescomments (MULTILINE TEXT) - Where we winthreatscomments (MULTILINE TEXT) - Where we loseUser says: "How are we doing against ACME Corp?"
Actions:
Result:
COMPETITIVE ANALYSIS: ACME CORP (Last 12 Months)
HEAD-TO-HEAD RECORD:
Wins: 8 deals ($420K) | Losses: 12 deals ($680K)
Win Rate: 40% (vs 55% overall win rate)
WHERE WE LOSE:
- Price objection in 67% of losses
- Mid-market segment: 25% win rate
WHERE WE WIN:
- Enterprise deals: 62% win rate
- When technical eval involved: 71% win rate
BATTLECARD:
"They're cheaper" → "Our TCO over 3 years is 23% lower..."
"We use their platform" → "Our API integrates in <2 hours..."
User says: "Show me the competitive landscape for Q4"
Actions:
Result:
Q4 COMPETITIVE LANDSCAPE
| Competitor | Encounters | Win Rate | Avg Deal |
|------------|------------|----------|----------|
| ACME Corp | 20 deals | 40% | $55K |
| Globex | 14 deals | 57% | $72K |
| Initech | 8 deals | 75% | $45K |
TOP THREAT: ACME Corp (high volume, low win rate)
STRONG AGAINST: Initech (technical differentiation)
User says: "Why are we losing to Globex?"
Actions:
Result:
GLOBEX LOSS ANALYSIS (8 losses, $340K)
COMMON PATTERNS:
- 75% lost at Proposal stage (late loss)
- Avg sales cycle: 45 days (vs our 38 day avg)
- 5/8 losses in Financial Services vertical
TOP OBJECTIONS (from notes):
1. "Existing Globex relationship" (3 deals)
2. "Integration concerns" (3 deals)
3. "Reference requests unfulfilled" (2 deals)
RECOMMENDATION:
- Engage technical resources earlier in Financial Services
- Build reference library for banking customers
Cause: Competitors not being recorded at deal close, or competitor table empty
Solution:
Cause: Too few deals with specific competitor to draw conclusions
Solution:
Cause: opportunityclose only captures explicit competitor selection; many deals may not have competitor recorded
Solution:
Take microsoft/competitive-intelligence from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.