Skip to content

Makes

Lead scoring

Builds a fit score and a behaviour score from your won and lost deals, grades leads A to D, and tests the grade on recent deals before recommending it.

Other tools

Add this skill to Claude

Claude takes skills as a ZIP file. Your download has started; if it didn't, use the button below.

  1. 1In Claude, open Customize, then Skills.
  2. 2Choose +, then Upload a skill, and pick lead-scoring.zip.
  3. 3Ask for it by name, or let Claude use it when a task matches.

Skills need code execution turned on in Claude's settings. On a Team or Enterprise plan, an admin can share it with everyone.

Download the folder

Try it now, without installing

See the skill work on a made-up input before you add it. Nothing is installed, and you can swap in your own input.

Open in the Claude app

Opens a new chat in the Claude desktop app with the prompt filled in. Nothing is sent until you press enter.

Includes the whole SKILL.md and the sample input. Paste it into Claude, ChatGPT or any chat.

Influenced by
Customer fit, likelihood to buy and lead grade models
Needs
Closed won and closed lost deals, with close dates and attributes as they were when the lead came in · Which columns describe fit and which describe behaviour
Works with
Claude, ChatGPT, Codex, Cursor and any agent that reads SKILL.md
Version
1.0.0 · Last checked · License MIT
Maintained by
Sabih AhmedMarkOps
SkillMarkOps

Lead scoring

Example output

Tested on deals it hasn't seen
GradeHold-out win rateAction
A7 of 9Sales now
C3 of 8Qualify first
D2 of 9No sales time

Builds a fit score and a behaviour score from your won and lost deals, grades leads A to D, and tests the grade on recent deals before recommending it.

The skill

The whole skill, in plain text.

Nothing is hidden. Read it, change it to fit your team, or take the whole folder.

Scripts
Optional Python scripts for the counting. It works without them and says which way it ran.
Network
Doesn't need the internet.

3 test cases

lead-scoring/SKILL.md

In the folder

  • lead-scoring/SKILL.md
  • lead-scoring/references/model-method.md
  • lead-scoring/scripts/score_model.py
---name: lead-scoringdescription: >-  Builds a B2B SaaS lead score from the company's own closed-won and closed-lost deals: a fit score (who the lead is)  and a behaviour score (what they did before the opportunity), combined into an A to D grade, then tested on the  most recent deals held out of the build. Recommends the model only when it sorts held-out deals better than  chance and grade A beats grade D, and stops with NOT ENOUGH DEALS when the history is too thin to test. Use it  when building or rebuilding lead scoring, when sales ignores the current score, or before routing leads by score.  Not for pipeline by channel (use pipeline-report) or for sending stages to ad platforms (use crm-feedback-loop).license: MITcompatibility: >-  Works in Claude, ChatGPT, Codex, Cursor and any agent that reads SKILL.md. Reads a connected CRM read-only if the  agent has one, otherwise a CSV export or pasted rows. Python 3 is optional, for the build and the hold-out test.metadata:  author: SHAKEUP  version: "1.0.0"  stage: make  plugin: markops  homepage: https://www.shakeuphq.com/skills/lead-scoring--- # Lead scoring Builds a fit and behaviour score from the deals a company actually won and lost, and proves it on deals it hasn't seen before recommending it. ## Purpose - One job: build one scoring model (fit points, behaviour points, 2 bars, 4 grades), test it on held-out deals, and recommend it or say why not.- Stage: make. It ends with its own check, at most 2 rounds.- It never recommends a model that failed the hold-out test, and never builds one from fewer deals than the test needs. Saying no is a valid result.- It never uses points, bars, weights or win rates from outside the reader's data. It never changes the CRM; it writes the model for people to build. ## Use when / not | Situation | Use || --- | --- || Building or rebuilding lead scoring | this skill || Sales ignores the current score | this skill, with the current score as the comparison || Before routing leads to sales by score | this skill || Pipeline per channel | `pipeline-report` || Sending a stage or grade to ad platforms | `crm-feedback-loop`, which can use a READY grade as an early stage || Points set by hand in a browser, no history yet | the lead scoring builder tool, labelled untested | ## Inputs | Input | Required | Ways to provide, in order | If missing || --- | --- | --- | --- || Closed deals, won and lost, last 12 to 24 months: outcome, close date, fit attributes as they were when the lead came in, behaviour before the opportunity was created | yes | a connected CRM, read-only; a CSV export of deals with their primary contact and company fields; pasted rows | `BLOCKED`: ask for the export || Which columns are fit and which are behaviour | yes | the reader; infer from column names and confirm | ask once || When each behaviour field is recorded | no | the reader; CRM property history | leak check by the data only; open item || The current score per deal | no | the same export | no comparison; `KEEP CURRENT` can't fire || Open leads to grade | no | an export of open leads | the model only | Fit attributes: company size, industry, country, role or seniority, tools used, business model. Behaviour attributes: pricing page visits, demo or trial request, content and tool use, webinar attendance, email replies, product sign-up. Never use what sales records during the deal (demo held, proposal sent, stage). ## Profile read From `company-profile.md`: `## Buyers` (ideal customer and bad fit, to name candidate fit attributes and disqualifiers), `### Buying group` (roles, to group titles), `## Company` (Business model: product-led companies have product usage as behaviour), `## Targets` (opportunity to closed-won rate, as a stated value to compare with the measured one), `## Accounts and data` (CRM), and every `## Learnings` entry for `lead-scoring`. No profile: ask for the ideal customer, the bad fit and the CRM, in one message. Say that `company-profile` saves this next time. ## Steps 1. **Apply learnings.** An accepted learning can add a disqualifier, retire a feature or change a default. Name each one used. 2. **Assemble the deals.** Closed won and closed lost only; open deals are left out. Keep the close date. Name each column fit or behaviour, with the reader. Drop columns filled in only after the opportunity opened. 3. **Gate on the history.**    | Condition | Result | Why |   | --- | --- | --- |   | Fewer than 20 won or fewer than 20 lost deals | Stop: `NOT ENOUGH DEALS` | After holding out 30%, fewer than 14 of each are left to learn from and fewer than 6 of each to test on, so one deal sorted differently moves the test by more than 15 points |   | The hold-out holds fewer than 5 won or 5 lost | Stop: `NOT ENOUGH DEALS` | One deal would move the test by 20 points |    At `NOT ENOUGH DEALS`, give the reader what is honest: the deals needed, the months until there are enough at the measured close pace (deals closed per month in the export), and a plain fit filter from `## Buyers` (must-haves and disqualifiers, no points), labelled untested. 4. **Split by time.** Hold out the latest 30% of deals by close date. The model will score future leads, so it is tested on deals later than those it learned from. Without close dates, say the split is by row order, not time. 5. **Build and test** with the script:    ```   python3 scripts/score_model.py --csv deals.csv --outcome stage --close-date close_date \       --fit "employees,industry,seniority" --behaviour "pricing_visits,demo_request,webinar" --current hubspot_score   ```    Without Python, follow `references/model-method.md` in a spreadsheet: features, points from the training deals only, bars, grades, then the hold-out test. Say which way you ran it.    The rules the build applies:    | Rule | Default | Why |   | --- | --- | --- |   | Points per feature | 10 x ln(share of won with it / share of lost with it), 0.5 added to each count | Positive when it is more common in won deals; the 0.5 keeps a 0 count from dividing by 0 |   | Cap | 30 points either way | No single feature decides a grade |   | Support | 5 deals with the feature (8 in round 2) | With fewer, one deal swings its points by 10 or more |   | No signal | Under 2 points either way: dropped | It doesn't separate won from lost |   | Possible leak | In 90% or more of won and 10% or less of lost: held back | Fields that clean are usually filled in by sales during the deal |   | Numbers | 1 split at the training median | One split per number keeps the model explainable to sales |   | Bars | The training score that best separates won from lost | Set from the data, not chosen by hand | 6. **Read the test.** On the hold-out deals:    | Test | Passes when | Why |   | --- | --- | --- |   | Concordance | Above 0.5 by more than 2 standard errors for the hold-out's size | 0.5 is a coin toss; the margin keeps a lucky small sample from passing |   | Grade order | Grade A wins more often than grade D | The grades must mean something to sales |   | Against the current score | The new model's concordance is above the current score's | Otherwise there's no evidence the change helps | 7. **Write the model for the CRM.** A table: criterion, fit or behaviour, points, won and lost deals with it. The 2 bars. The grade actions: A to sales now, B to nurture, C a qualifying question before sales calls, D no sales time. Each grade's hold-out win rate with its counts. 8. **Plan the rollout.** Run it in shadow for 30 days first: score new leads without routing on the score, and compare with what sales decided (this finds criteria that are empty when a lead arrives). Review against new closed deals every quarter. ## Check and verdict Checks on the model: | ID | Passes when || --- | --- || M1 | The gate passed || M2 | The hold-out is by close date, or the output says it isn't || M3 | No feature is recorded after the lead was scored: leak check run, and behaviour fields confirmed by the reader or labelled unconfirmed || M4 | Every feature has the minimum support || M5 | Hold-out concordance beats 0.5 by more than 2 standard errors || M6 | Grade A's hold-out win rate is above grade D's || M7 | Points and bars come from the training deals only | | Verdict | Condition (first match wins) || --- | --- || `BLOCKED` | No closed deals with an outcome, or no attribute columns || `NOT ENOUGH DEALS` | The gate failed || `FAILS HOLD-OUT` | M5 or M6 still fails after round 2 || `KEEP CURRENT` | The new model passes, but the current score's hold-out concordance is at least as high || `READY` | M1 to M7 pass, and the model beats the current score or there is none | Named stops: `BLOCKED` asks for the export. `NOT ENOUGH DEALS` and `FAILS HOLD-OUT` stop before any model is recommended; they show what was tried and what would change the result. No other stops. ## Loop 1. Round 1: build with the defaults, run M1 to M7.2. If M5 or M6 fails, round 2: raise support to 8, drop features whose points change sign between the older and newer half of the training deals, rebuild and test again. The script does this on its own.3. Stop after round 2. Never tune on the hold-out deals (testing many versions against the same hold-out until one passes is just luck). If round 2 fails, the verdict is `FAILS HOLD-OUT`. ## Learn - The reader confirms a behaviour field is filled before the opportunity: write a `fact`, so later runs don't hold it back.- The reader adds a disqualifier ("students", "competitors"): write a `proposal`.- After the shadow period or a quarter, the grades' real win rates on new deals: write a `fact` with the counts, and propose a rebuild when grade A no longer beats grade D. Example: `- 2026-10-24 | lead-scoring | fact | "pricing_visits" is set by the website tag before any opportunity exists | Why: reader confirmed from the CRM property history | Status: noted` ## Output ```Verdict: <READY | KEEP CURRENT | FAILS HOLD-OUT | NOT ENOUGH DEALS | BLOCKED> · Coverage: <complete | partial (what's missing)> · Build: <script | by hand> · Round used: <1 | 2>Deals: <won> won, <lost> lost · Split: <by close date | by row order> · Training <n> · Hold-out <n> (<won> won, <lost> lost) Model:| Criterion | Type | Points | Won with | Lost with |Held back: <feature: why>Bars: fit <n>, behaviour <n> Hold-out test: concordance <c> (standard error <se>, needs above <0.5 + 2 se>) · fit only <c> · behaviour only <c> · current score <c or not available>| Grade | Hold-out deals | Won | Win rate | Action | Rollout: shadow for 30 days, then route; review quarterlyLearnings applied: <list, or none>``` At `NOT ENOUGH DEALS`: the counts, the deals still needed, the months until enough at the measured pace, and the untested fit filter. Then the handoff block. ## Hand off ```handoffskill: lead-scoringversion: 1.0.0verdict: READYcoverage: completefor: <company> inbound leadsoutputs:  grades_holdout: {A: 0.58, B: 0.31, C: 0.22, D: 0.07}  concordance: 0.74  fit_bar: 18  behaviour_bar: 11  criteria: 9next: [crm-feedback-loop]open: [confirm webinar attendance is recorded before the opportunity]``` `crm-feedback-loop` can offer grade A as a predicted stage when a platform's window is shorter than the sales cycle, valued by `grades_holdout.A`. ## Failure modes | Problem | Do this || --- | --- || Lost deals aren't marked lost (they stay open forever) | Ask for the reader's rule for a dead deal (no activity for a set period) and apply it, labelled; without it, the lost count is what it is || Fit fields are filled by enrichment after the deal | Use only fields with a value at lead creation; ask how enrichment runs || One segment dominates the deals (one country, one size) | Say the model holds for that segment only || The reader wants points from "best practice" | Decline; offer the lead scoring builder tool for a hand-set model, labelled untested || A feature with strong points makes no business sense | Show it, ask the reader, and hold it back if they can't explain it || Product-led company with usage data | Treat product usage before the sales touch as behaviour; same rules | ## Influenced by - MadKudu's customer fit, likelihood to buy and lead grade models, which keep who the lead is apart from what they do and combine the 2 into a grade (MadKudu's help center now lives with HG Insights): https://help.hginsights.com/what-are-the-different-models- SHAKEUP's lead scoring builder: fit and intent kept apart, disqualifiers with negative points, and bars agreed with sales.

How it thinks

Inputs in, a verdict out, and a stop only where you decide.

What we built

We test every model on deals it hasn't seen, split by time, before recommending it. When the history is too thin, the honest answer is to stop and say how many more deals it takes.

It reads your company profile if you have one, or asks for only what it needs. Then it works through its steps, checks its own work and ends in a verdict.

The steps

  1. 01

    Read your learnings first

    Disqualifiers your team added and fields you confirmed as clean change the defaults before it starts.

  2. 02

    Check there are enough deals

    It needs 20 won and 20 lost. Below that, the test can't tell a good model from luck, so it stops and says when there will be enough.

  3. 03

    Hold out the latest deals

    The most recent 30% of deals by close date are kept aside. Only the older ones teach the model, the way it will later meet leads it has never seen.

  4. 04

    Score fit and behaviour apart

    Each attribute earns points from how much more often it shows up in won deals than lost ones. Fields sales fills in during the deal are held back as leaks.

  5. 05

    Test it on the held-out deals

    Won deals must outscore lost ones by more than chance allows for that sample size, and grade A must win more often than grade D.

  6. 06

    Deliver the model, or say no

    A points table for your CRM with the grades' tested win rates, and a 30-day shadow run before routing. If it fails, no model is recommended.

What you need

  • Required

    Closed won and closed lost deals, with close dates and attributes as they were when the lead came in

    A connected CRM, read-only → A CSV export of deals with contact and company fields → Rows or grouped counts you paste

  • Required

    Which columns describe fit and which describe behaviour

    Your answer → Inferred from the column names, then confirmed with you

  • Optional

    When each behaviour field is recorded

    Your answer → CRM property history

  • Optional

    Your current score per deal

    The same export

What it can return

  • READY

    The model passes the hold-out test and beats your current score, if you have one.

  • KEEP CURRENT

    The new model passes, but your current score sorts the held-out deals as well or better.

  • FAILS HOLD-OUT

    After 2 rounds, the model doesn't sort held-out deals better than chance, or grade A doesn't beat grade D.

  • NOT ENOUGH DEALS

    Fewer than 20 won or 20 lost deals, or too few of either in the hold-out.

  • BLOCKED

    No closed deals with an outcome, or no attributes to score.

Where it stops for you

  • When there are too few closed deals to test a model
  • When the model fails the hold-out test after 2 rounds

Example output

What you get back.

A run for a made-up company. Your output depends on your inputs.

Here's a run for a made-up B2B SaaS company with 100 closed deals and no lead scoring. The latest 30 deals by close date were held out of the build.

Verdict

READY

Coverage: complete

Build: script

Round used: 1

CriterionTypePointsWon withLost with
Team size 50 to 500Fit+626 of 3117 of 39
Uses HubSpot or SalesforceFit+424 of 3121 of 39
Visited pricing before the opportunityBehaviour+622 of 3115 of 39
Held back

demo held. Sales fills it in during the deal, and it showed up in 30 of 31 won deals.

Hold-out test

won deals outscored lost ones in 78% of pairs. With 30 deals held out, a pass needed more than 71%. Grade A won 7 of 9 held-out deals, and grade D won 2 of 9.

Rollout

score new leads for 30 days without routing, compare with what sales decided, then route on the grade.

The handoff block the next skill reads
skill: lead-scoring
version: 1.0.0
verdict: READY
coverage: complete
for: inbound leads
outputs:
  grades_holdout: {A: 0.78, B: 0.5, C: 0.38, D: 0.22}
  concordance: 0.78
  fit_bar: 10
  behaviour_bar: 6
  criteria: 3
next: [crm-feedback-loop]
open: [confirm pricing visits are recorded before the opportunity]

What good looks like

  • Points that trace back to your won and lost deals
  • A hold-out by close date, never used to set points
  • Fields filled in during the deal held back
  • Grade A winning more often than grade D on unseen deals
  • A plain no when there aren't enough deals

Install

Use it in the tool you already have.

Pick your tool. Each tab has the shortest path we know of.

  1. 01
  2. 02
    In Claude, open Customize, then Skills.
  3. 03
    Choose +, then Upload a skill, and pick the ZIP. Code execution must be on in your settings.
  4. 04
    Ask for it by name, or let Claude use it when a task matches.

Questions

Before you add it.

How many deals does it need?

At least 20 won and 20 lost. With fewer, one deal sorted differently moves the test by more than 15 points, so a lucky model could pass. It stops and tells you when you'll have enough.

Why hold out the latest deals?

The model will score leads that arrive after it was built. Testing it on deals that closed after the ones it learned from is the closest check to how it will be used.

What's a leak?

A field that sales fills in during the deal, such as demo held. It predicts winning perfectly in the past and is empty when a new lead arrives, so the skill holds it back.

How is it different from the lead scoring builder tool?

The tool lets you choose the points yourself in the browser. This skill sets them from your own won and lost deals and tests them before you use them.