---
name: accounts-to-contacts
description: Use this skill when the user has a list of target companies and wants to find people at those companies matching an ICP — by role, seniority, department, or location.
---

# Accounts to Contacts

Given a list of companies, find ICP-matched people at each one and optionally enrich with contact data.

## Triggers

"find contacts at these companies", "I have a list of accounts, find me the right people", "get me [role] at each of these companies", "turn this company list into a contact list", "prospect into these accounts", "who are the [title] at these companies". Input is a list of companies; output is a unified people list ready for enrichment or outreach.

## Chain

```
company list + ICP filters
  → search_business_profiles  (per company, looped)
  → deduplicate
  → enrich_email              (optional)
  → enrich_phone              (optional)
```

## Set Expectations

Before firing any calls, give the user a brief, dry heads-up. Deadpan over enthusiastic — no filler, no corporate speak.

Facts to work with:
- One search call per company, sequential — no batch search API
- N companies × ~2–4 seconds = search phase estimate
- Enrichment (if requested) adds one batch call after all searches complete
- For 10+ companies, flag that this takes a while and you'll report progress

## Step 0 — Input Quality Gate

Need two things before running:

**1. Company list** — at least 1 company with a name (domain optional but helps precision). If missing, stop:
> "Paste or upload your company list. I need at least company names — domains help narrow results."

**2. At least 1 ICP filter** — without any filter, results are a broad employee mix, not a targeted persona. If no filters provided, prompt:

> "What kind of people are you looking for at these companies? For example:
>
> - **Role/title keywords** — e.g. "VP Marketing", "Head of Demand Gen", "Account Executive"
> - **Seniority** — e.g. Director+, C-suite, VP, Manager
> - **Department** — e.g. Marketing, Sales, Engineering, RevOps
> - **Location** — e.g. United States, UK, Global
>
> At minimum, a role or department helps me target the right people."

### What helps most
- **Role + seniority** — tightest persona targeting
- **Department** — useful when titles vary widely across companies
- Omit industry filter — you're already scoping to specific companies

## Step 1 — Parse company list

Accept:
- Line-separated paste (name only, or name + domain)
- CSV (extract company name and domain columns)
- Typed list

Normalise into rows: `Company Name | Domain (if provided)`

Flag any rows with unresolvable names (very ambiguous, no domain). Report: "Parsed X companies."

## Step 2 — Confirm ICP + target count

Confirm with user before running:

> "I'll search for [role/dept/seniority] at each of X companies. How many contacts per company? (Default: 3, max 25 per call)"

Default to 3 per company unless specified. Wait for confirmation.

## Step 3 — Credit check (required)

Call `MoltSets:get_billing` and `MoltSets:get_usage` with `period: billing_cycle` in parallel (free).

Estimate (conservative — actual results vary):
```
X companies × ~3 results      = ~X prospects
X prospects × enrich_email    = email cost  (if requested)
X prospects × enrich_phone    = phone cost  (if requested)
Total:                         = ~XXX credits
Current balance:               = XXX credits
```

If estimated cost > balance: stop. Report shortfall, how many companies the balance covers, ask to proceed partially or top up.

## Step 4 — Probe (first company)

Before looping all companies, run `search_business_profiles` with `limit: 1` for the first company:

- `query`: `"[Company Name] [role keywords]"` — embed company name to scope results
- Apply `seniority`, `department`, `country` filters as provided

Check result quality:
- Good match → proceed with full loop
- Poor match (wrong company, irrelevant titles) → adjust `query` construction before scaling

## Step 5 — Loop all companies

For each company:
1. Run `search_business_profiles`:
   - `query`: `"[Company Name] [role keywords]"`
   - `seniority`, `department`, `country` as filters
   - `limit`: target per company (default 10, max 25)
2. If results < target and user wants more: paginate with `offset`
3. Tag each result with source company for traceability

Process sequentially. Do not pause per company — flag any zero-result companies in final output.

**Note:** company name in `query` is a soft signal. Results may include people who mention the company in their headline. Domain is not a direct filter — use company name.

## Step 6 — Deduplicate

Remove duplicate LinkedIn URLs across all companies. If a person appears at multiple companies (e.g. consulting multiple clients), keep the entry with the stronger company match and note the duplicate.

Report: "Found X unique contacts across Y companies."

## Step 7 — Optional enrichment

If user wants emails or phones: collect all LinkedIn URLs → run enrichment.

Credit confirm first: "Found X contacts. Enriching [email/phone/both] = ~XXX credits. Proceed?"

- `enrich_email` with `linkedin_urls` array (batch, max 100)
- `enrich_phone` with `linkedin_urls` array (batch, max 100)

Chunk at 100 if needed.

## Step 8 — Output

| Company | Name | Title | Seniority | Department | Country | LinkedIn | Business Email | Mobile |
|---|---|---|---|---|---|---|---|---|

Omit email/mobile columns if enrichment not requested.

**Summary:**
```
Companies searched:   X
Contacts found:       X  (avg X per company)
Zero-result accounts: X  (listed below)
Business emails:      X/N  (XX%)  — if enriched
Mobile numbers:       X/N  (XX%)  — if enriched
Credits used:         ~XXX
```

List zero-result companies separately so user can investigate or broaden filters.

Offer to export as CSV-style table.

## Edge cases

- Zero results for a company → mark "No results" in summary, do not stop loop
- Company name ambiguous (e.g. "Apple" could be many things) → note in output, results may include false matches
- Large list (20+ companies) → set expectation it will take time; report progress periodically
- Credits run out mid-loop → stop, output completed rows, report exact resume point (which company index)
- Max 25 results per `search_business_profiles` call — loop with `offset` if user wants more per company
