Icp prompt builder skill

Interactive loop that builds and tunes an AI prompt for evaluating whether a company fits a client's ICP.

by growthenginenowoslawski·MIT license·★ 736 Stars on the repo·GitHub ↗

Use now

Files of Icp prompt builder

growthenginenowoslawski/main1 file shown
SKILL.md
Show the full text206 lines

ICP Prompt Builder

Before you pay to pull 5,000 companies, tune a qualification prompt on 10-50 of them. This skill walks you through the iterative loop.

Why this exists

List-builder skills (DiscoLike, Blitz, Prospeo, Google Maps) return COMPANIES, but they don't know whether those companies match your ICP. If your list-builder returns 5,000 companies and 80% are wrong fits, you'll waste money enriching them for emails that go nowhere.

The fix: build an AI qualification prompt BEFORE scaling. Pull 10 companies, have the prompt score them, compare to your judgment, refine, repeat. Once the prompt agrees with you 2 rounds in a row with zero corrections, lock it in and apply it at scale.

Always uses Task sub-agents (no API key)

This skill runs entirely inside Claude Code via the Task tool. No Anthropic SDK calls, no OpenAI calls — Claude Code does the scoring itself. This is intentional:

  • No extra API spend. Uses your Claude Code plan.
  • No key management. Works out of the box.
  • Scaleable within reason. For 20-100 evaluations, parallel Task sub-agents batch 10-20 companies per agent.

At very large scale (5,000+ companies per batch), you may want to export the tuned prompt and run it through the OpenAI / Anthropic API with parallelism for speed. But TUNING happens inside Claude Code.

The loop (8 steps)

Step 1 — Gather ICP context

Claude asks the user (or reads client-profile.yaml from /icp-onboarding):

  • Website of the client selling (to scrape for context)
  • Who IS a good customer? What makes them a good fit?
  • Who is NOT a good customer? What disqualifies them?
  • Any specific signals? (B2B only, revenue range, tech stack, hiring status, recent fundraise, etc.)
  • Any HARD disqualifiers? (competitor domains, existing customer domains, certain industries/geographies)
Step 2 — Select 10 test companies

Pull 10 companies from the list-builder output:

  • Mix likely-good and likely-bad fits
  • Variety in industry, size, location
  • Each company needs at minimum: domain, company_name, industry, headcount, description
  • Richer fields (Clay-derived: Business Type, Scale Scope, Revenue) make scoring better
Step 3 — Build the initial qualification prompt

Template:

You are an ICP evaluator for {CLIENT_NAME}.

## Target ICP
{ICP description from user or client-profile.yaml}

## Qualification criteria (MUST be true)
- {criterion 1}
- {criterion 2}
- ...

## Disqualification criteria (ANY match = disqualify)
- {disqualifier 1}
- {disqualifier 2}
- ...

## Input
You will receive a company with these fields:
- domain, name, industry, headcount, description
- (optional) Business Type, Revenue, Scale Scope

## Output
For each company, return JSON:
{
  "qualified": true | false,
  "confidence": 0.0-1.0,
  "reason": "one-sentence explanation"
}
Step 4 — Run the prompt on the 10 companies

Via the Task tool. Launch one Task sub-agent that reads the prompt + 10 companies, returns 10 JSON scores.

Step 5 — Present results to the user

Format as a table:

Company                   | Qualified | Conf | Reason
--------------------------+-----------+------+----------------------------------------
acme-corp.com             | YES       | 0.92 | B2B SaaS, 200 employees, target industry
random-nonprofit.org      | NO        | 0.95 | Nonprofit, not a business customer
edge-case-company.com     | YES       | 0.55 | Could fit but revenue model unclear
Step 6 — Collect user feedback

Ask specifically:

  • Which evaluations are wrong? (e.g., "acme-corp should be NO because they're a competitor")
  • Which are right but for the wrong reason?
  • Any patterns the prompt missed?
  • Any new disqualifiers to add?

If the user has zero corrections, log this round as "approved."

Step 7 — Refine the prompt (or move on)

If the user gave corrections:

  • Add/remove qualification criteria
  • Tighten/loosen disqualifiers
  • Add specific examples of edge cases ("companies like X are NOT a fit because Y")
  • Adjust confidence thresholds if everything is coming back 0.5

Then go back to Step 4 with a NEW batch of 10 companies.

Step 8 — Stop condition + save

The loop ends when 2 consecutive rounds have zero corrections from the user. When that happens:

  1. Save the final tuned prompt to ~/cold-email-ai-skills/profiles/<business-slug>/icp-prompt.txt
  2. Append metadata to client-profile.yaml:
icp_qualification_prompt:
  path: profiles/<slug>/icp-prompt.txt
  tuned_at: YYYY-MM-DD
  rounds_to_convergence: 3
  final_batch_size: 10
  1. Print a one-liner for the next skill:
Prompt locked. To score your 5000 companies:
  npx tsx ~/cold-email-ai-skills/skills/icp-prompt-builder/scripts/score-batch.ts \
    --prompt-file=profiles/<slug>/icp-prompt.txt \
    --companies=path/to/companies.csv \
    --out=scored.csv

Approval-loop rules (important)

  • Never auto-approve. Even if the prompt looks right, require the user to explicitly say "approved" or give zero corrections for 2 consecutive rounds.
  • Reset counter on any correction. One correction resets the streak to 0.
  • Don't skip the batches. Running 30 companies all at once feels faster but masks errors. 10 at a time is the right batch size — small enough to eyeball.
  • Show the prompt each round. After each refinement, display the current full prompt back to the user so they can see what changed.
  • Always use Task tool sub-agents for the scoring inside each round. Never call external APIs.

Using the tuned prompt at scale

Once saved, the prompt is applied to the full list via scripts/score-batch.ts. Options:

Option A (free, slow) — run through Claude Code Task sub-agents in batches of 20 companies per agent. Good for <500 total.

Option B (paid, fast) — export prompt + companies to OpenAI / Anthropic API with parallelism. Good for 500-50,000.

The script supports both. Default is Option A to keep everything inside Claude Code.

  1. /icp-onboarding → produce client-profile.yaml
  2. /disco-like OR /blitz-list-builder OR /prospeo-full-export → pull a sample of 50-100 companies
  3. /icp-prompt-builder → tune qualification prompt on that sample (3-5 rounds typical)
  4. Scale the list-builder to 5,000+ companies
  5. Apply the tuned prompt to the full list → only keep qualified: true with confidence >= 0.6
  6. /blitz-list-builder or /email-waterfall on the qualified subset
  7. Upload to Smartlead

Data points the prompt can use

From most list-builder outputs:

  • domain, company_name, industry, headcount, description, LinkedIn URL

Additional fields (if enrichment skills have been run):

  • Business Type (B2B / B2C / B2B2C)
  • Annual Revenue range
  • Scale Scope (Enterprise / Mid-Market / SMB)
  • SubIndustry (more specific than primary industry)
  • Tech stack (Clearbit, BuiltWith data)
  • Recent signals (funding, hiring, news)

Tell the AI about the fields you have access to in the prompt preamble.

Common mistakes

  • Building the prompt too tight on round 1. Start broad, narrow with feedback.
  • Not including negative examples. "Companies like Netflix are NOT a fit because they're B2C" is more powerful than generic "must be B2B".
  • Using only "qualified: true/false" without confidence. Always ask for confidence — 0.5-0.7 borderline cases are where you learn the most.
  • Scoring 50 at once "to save time." Defeats the point of the loop.
  • Not saving the prompt. The point of tuning is reuse. If you don't save, you'll re-tune next time.

Scripts

  • scripts/score-batch.ts — apply tuned prompt to a CSV of companies

What to do next

Apply the tuned prompt to your full list (the list-building skill you came from — Prospeo, Blitz, DiscoLike, Google Maps, or Competitor Engagers — will walk through this). Then /list-quality-scorecard to grade the filtered output.

Or wait: if the prompt didn't converge within 5 rounds (you kept making corrections), your source data may be too thin. Enrich with more fields (company description, headcount, tech stack) before retrying.

  • /icp-onboarding — run FIRST to produce client-profile.yaml
  • /disco-like, /blitz-list-builder, /google-maps-list-builder, /prospeo-full-export — pull the companies this skill qualifies
  • /personalization-subagent-pattern — same approval-loop pattern, applied to copy personalization
1---
2name: icp-prompt-builder
3description: Interactive loop that builds and tunes an AI prompt for evaluating whether a company fits a client's ICP. Run after any list-building skill (disco-like, blitz-list-builder, google-maps-list-builder, prospeo-full-export) to qualify companies before scaling. Iterates batches of 10 companies with user feedback, stops when 2 consecutive rounds have zero corrections, saves the final prompt for reuse. Always uses Claude Code Task sub-agents — never an external API key.
4---
5 
6# ICP Prompt Builder
7 
8Before you pay to pull 5,000 companies, tune a qualification prompt on 10-50 of them. This skill walks you through the iterative loop.
9 
10## Why this exists
11 
12List-builder skills (DiscoLike, Blitz, Prospeo, Google Maps) return COMPANIES, but they don't know whether those companies match your ICP. If your list-builder returns 5,000 companies and 80% are wrong fits, you'll waste money enriching them for emails that go nowhere.
13 
14The fix: build an AI qualification prompt BEFORE scaling. Pull 10 companies, have the prompt score them, compare to your judgment, refine, repeat. Once the prompt agrees with you 2 rounds in a row with zero corrections, lock it in and apply it at scale.
15 
16## Always uses Task sub-agents (no API key)
17 
18This skill runs entirely inside Claude Code via the Task tool. No Anthropic SDK calls, no OpenAI calls — Claude Code does the scoring itself. This is intentional:
19 
20- **No extra API spend.** Uses your Claude Code plan.
21- **No key management.** Works out of the box.
22- **Scaleable within reason.** For 20-100 evaluations, parallel Task sub-agents batch 10-20 companies per agent.
23 
24At very large scale (5,000+ companies per batch), you may want to export the tuned prompt and run it through the OpenAI / Anthropic API with parallelism for speed. But TUNING happens inside Claude Code.
25 
26## The loop (8 steps)
27 
28### Step 1 — Gather ICP context
29 
30Claude asks the user (or reads `client-profile.yaml` from `/icp-onboarding`):
31- Website of the client selling (to scrape for context)
32- Who IS a good customer? What makes them a good fit?
33- Who is NOT a good customer? What disqualifies them?
34- Any specific signals? (B2B only, revenue range, tech stack, hiring status, recent fundraise, etc.)
35- Any HARD disqualifiers? (competitor domains, existing customer domains, certain industries/geographies)
36 
37### Step 2 — Select 10 test companies
38 
39Pull 10 companies from the list-builder output:
40- Mix likely-good and likely-bad fits
41- Variety in industry, size, location
42- Each company needs at minimum: `domain, company_name, industry, headcount, description`
43- Richer fields (Clay-derived: Business Type, Scale Scope, Revenue) make scoring better
44 
45### Step 3 — Build the initial qualification prompt
46 
47Template:
48 
49```
50You are an ICP evaluator for {CLIENT_NAME}.
51 
52## Target ICP
53{ICP description from user or client-profile.yaml}
54 
55## Qualification criteria (MUST be true)
56- {criterion 1}
57- {criterion 2}
58- ...
59 
60## Disqualification criteria (ANY match = disqualify)
61- {disqualifier 1}
62- {disqualifier 2}
63- ...
64 
65## Input
66You will receive a company with these fields:
67- domain, name, industry, headcount, description
68- (optional) Business Type, Revenue, Scale Scope
69 
70## Output
71For each company, return JSON:
72{
73 "qualified": true | false,
74 "confidence": 0.0-1.0,
75 "reason": "one-sentence explanation"
76}
77```
78 
79### Step 4 — Run the prompt on the 10 companies
80 
81Via the Task tool. Launch one Task sub-agent that reads the prompt + 10 companies, returns 10 JSON scores.
82 
83### Step 5 — Present results to the user
84 
85Format as a table:
86 
87```
88Company | Qualified | Conf | Reason
89--------------------------+-----------+------+----------------------------------------
90acme-corp.com | YES | 0.92 | B2B SaaS, 200 employees, target industry
91random-nonprofit.org | NO | 0.95 | Nonprofit, not a business customer
92edge-case-company.com | YES | 0.55 | Could fit but revenue model unclear
93```
94 
95### Step 6 — Collect user feedback
96 
97Ask specifically:
98- Which evaluations are wrong? (e.g., "acme-corp should be NO because they're a competitor")
99- Which are right but for the wrong reason?
100- Any patterns the prompt missed?
101- Any new disqualifiers to add?
102 
103If the user has zero corrections, log this round as "approved."
104 
105### Step 7 — Refine the prompt (or move on)
106 
107If the user gave corrections:
108- Add/remove qualification criteria
109- Tighten/loosen disqualifiers
110- Add specific examples of edge cases ("companies like X are NOT a fit because Y")
111- Adjust confidence thresholds if everything is coming back 0.5
112 
113Then go back to Step 4 with a NEW batch of 10 companies.
114 
115### Step 8 — Stop condition + save
116 
117The loop ends when **2 consecutive rounds have zero corrections from the user**. When that happens:
118 
1191. Save the final tuned prompt to `~/cold-email-ai-skills/profiles/<business-slug>/icp-prompt.txt`
1202. Append metadata to `client-profile.yaml`:
121 
122```yaml
123icp_qualification_prompt:
124 path: profiles/<slug>/icp-prompt.txt
125 tuned_at: YYYY-MM-DD
126 rounds_to_convergence: 3
127 final_batch_size: 10
128```
129 
1303. Print a one-liner for the next skill:
131 
132```
133Prompt locked. To score your 5000 companies:
134 npx tsx ~/cold-email-ai-skills/skills/icp-prompt-builder/scripts/score-batch.ts \
135 --prompt-file=profiles/<slug>/icp-prompt.txt \
136 --companies=path/to/companies.csv \
137 --out=scored.csv
138```
139 
140## Approval-loop rules (important)
141 
142- **Never auto-approve.** Even if the prompt looks right, require the user to explicitly say "approved" or give zero corrections for 2 consecutive rounds.
143- **Reset counter on any correction.** One correction resets the streak to 0.
144- **Don't skip the batches.** Running 30 companies all at once feels faster but masks errors. 10 at a time is the right batch size — small enough to eyeball.
145- **Show the prompt each round.** After each refinement, display the current full prompt back to the user so they can see what changed.
146- **Always use Task tool sub-agents** for the scoring inside each round. Never call external APIs.
147 
148## Using the tuned prompt at scale
149 
150Once saved, the prompt is applied to the full list via `scripts/score-batch.ts`. Options:
151 
152**Option A (free, slow)** — run through Claude Code Task sub-agents in batches of 20 companies per agent. Good for <500 total.
153 
154**Option B (paid, fast)** — export prompt + companies to OpenAI / Anthropic API with parallelism. Good for 500-50,000.
155 
156The script supports both. Default is Option A to keep everything inside Claude Code.
157 
158## Recommended flow
159 
1601. `/icp-onboarding` → produce `client-profile.yaml`
1612. `/disco-like` OR `/blitz-list-builder` OR `/prospeo-full-export` → pull a sample of 50-100 companies
1623. `/icp-prompt-builder` → tune qualification prompt on that sample (3-5 rounds typical)
1634. Scale the list-builder to 5,000+ companies
1645. Apply the tuned prompt to the full list → only keep `qualified: true` with `confidence >= 0.6`
1656. `/blitz-list-builder` or `/email-waterfall` on the qualified subset
1667. Upload to Smartlead
167 
168## Data points the prompt can use
169 
170From most list-builder outputs:
171- domain, company_name, industry, headcount, description, LinkedIn URL
172 
173Additional fields (if enrichment skills have been run):
174- Business Type (B2B / B2C / B2B2C)
175- Annual Revenue range
176- Scale Scope (Enterprise / Mid-Market / SMB)
177- SubIndustry (more specific than primary industry)
178- Tech stack (Clearbit, BuiltWith data)
179- Recent signals (funding, hiring, news)
180 
181Tell the AI about the fields you have access to in the prompt preamble.
182 
183## Common mistakes
184 
185- **Building the prompt too tight on round 1.** Start broad, narrow with feedback.
186- **Not including negative examples.** "Companies like Netflix are NOT a fit because they're B2C" is more powerful than generic "must be B2B".
187- **Using only "qualified: true/false" without confidence.** Always ask for confidence — 0.5-0.7 borderline cases are where you learn the most.
188- **Scoring 50 at once "to save time."** Defeats the point of the loop.
189- **Not saving the prompt.** The point of tuning is reuse. If you don't save, you'll re-tune next time.
190 
191## Scripts
192 
193- `scripts/score-batch.ts` — apply tuned prompt to a CSV of companies
194 
195## What to do next
196 
197**Apply the tuned prompt to your full list** (the list-building skill you came from — Prospeo, Blitz, DiscoLike, Google Maps, or Competitor Engagers — will walk through this). Then `/list-quality-scorecard` to grade the filtered output.
198 
199**Or wait:** if the prompt didn't converge within 5 rounds (you kept making corrections), your source data may be too thin. Enrich with more fields (company description, headcount, tech stack) before retrying.
200 
201## Related skills
202 
203- `/icp-onboarding` — run FIRST to produce client-profile.yaml
204- `/disco-like`, `/blitz-list-builder`, `/google-maps-list-builder`, `/prospeo-full-export` — pull the companies this skill qualifies
205- `/personalization-subagent-pattern` — same approval-loop pattern, applied to copy personalization
206 

Discussion

Alternatives

AI Sales Team — Main OrchestratorYou are a comprehensive AI sales intelligence and outreach system for Claude Code. You help founders, sales teams, agency owners, and…Sales & ecommerce · MITAuto research publicAutonomous cold email campaign launcher. Takes one target company domain, scrapes their website, generates an ICP with Claude, pulls matching leads via Prospeo, enriches emails + company descriptions, personalizes each lead with parallel Claude Code Task sub-agents (A/B/C variants), and uploads as a live Smartlead campaign. Uses local JSON files for state (no database required). Use for automated daily campaign launches after you have an initial `client-profile.yaml` from /icp-onboarding. Triggers on "auto-research", "launch an automated campaign", "daily campaign", "run the research loop".Sales & ecommerce · MITCold email outreachRun end-to-end B2B cold-email outreach through the Hyper MCP — enrich prospects with Apollo, scrape per-prospect signals from company sites and LinkedIn, draft personalized emails using proven hook frameworks, send via Gmail with safe defaults, and route replies into labeled folders. Use when the user wants to write cold emails, run an outbound sequence, prospect a list, build a follow-up cadence, "reach out to leads," or asks why nobody is replying to their cold emails.Sales & ecommerce · MITBuild a system for handling sales leadsTell us how leads reach your team today and you get back a written playbook for scoring, routing, and following up on every lead fast.Business & ops · MIT