$npx -y skills add MoizIbnYousaf/marketing-cli --skill lead-generationGenerate enriched ICP-based lead lists with Exa Agent, including structured scoring and CSV output. Use when generating leads, building prospect lists, finding companies to sell to, outbound research, or ICP-based company discovery. Triggers on leads, lead gen, prospect list, fin
| 1 | ## On Activation |
| 2 | |
| 3 | 1. Read `brand/audience.md`, `brand/positioning.md`, and `brand/competitors.md` if present to seed ICP + exclusions. All optional. |
| 4 | 2. Confirm Exa MCP with Agent tools (`agent_tools` / `agent_run`) or `EXA_API_KEY`. Without Agent access, stop and surface the MCP config from this skill. |
| 5 | 3. Confirm ICP with the user before large runs (default 200 leads is expensive). |
| 6 | 4. Write CSV under the project (e.g. `marketing/leads/` or cwd). Never write credentials into brand/. |
| 7 | |
| 8 | # Lead Generation with Exa Agent |
| 9 | |
| 10 | |
| 11 | ## mktg runtime note |
| 12 | |
| 13 | Prefer **Exa MCP** when available (tools: `web_search_exa`, `web_search_advanced_exa`, `web_fetch_exa`, `agent_run`). |
| 14 | If MCP Agent tools use the older create/wait/get names (`agent_create_run`, `agent_wait_for_run`, `agent_get_run_output`), use those equivalently. |
| 15 | Without MCP, call the HTTP API with `x-api-key: $EXA_API_KEY` (`POST https://api.exa.ai/search`, `/contents`, `/agent`). |
| 16 | Firecrawl remains the path for deep scrape of a **known URL** after Exa discovery. |
| 17 | |
| 18 | |
| 19 | Generate enriched lead lists using the Exa Agent API. An Agent run is an asynchronous, multi-step web research task: you describe the list you want plus an output schema, and Exa handles query decomposition, searching, verification, enrichment, and structured output internally. You do NOT need to orchestrate parallel searches, subagents, or manual deduplication. |
| 20 | |
| 21 | For very large or continuously maintained lead lists with per-item verification, consider Exa Websets instead: https://docs.exa.ai/websets/api/overview |
| 22 | |
| 23 | ## Prerequisites |
| 24 | |
| 25 | This skill requires the Exa MCP server with the Agent tools enabled (`agent_tools`): `agent_create_run`, `agent_wait_for_run`, `agent_get_run_output`, `agent_cancel_run`. |
| 26 | |
| 27 | If the Agent tools are not available, tell the user: |
| 28 | |
| 29 | > You need the Exa MCP server installed with the Agent tools and your API key. |
| 30 | > Instructions: https://docs.exa.ai/reference/exa-mcp |
| 31 | |
| 32 | Then stop. |
| 33 | |
| 34 | ## Tool Restriction |
| 35 | |
| 36 | Use the Exa Agent tools (`agent_create_run`, `agent_wait_for_run`, `agent_get_run_output`, `agent_cancel_run`), plus Write and Bash (for CSV output). Do NOT use generic web search for the lead list itself. |
| 37 | |
| 38 | ## Workflow |
| 39 | |
| 40 | ``` |
| 41 | 1. Confirm the ICP with the user (one small Agent run if research is needed) |
| 42 | 2. Create the lead-gen Agent run(s) with an outputSchema |
| 43 | 3. Wait for completion (agent_wait_for_run) |
| 44 | 4. Read output.structured (agent_get_run_output) |
| 45 | 5. Write the CSV |
| 46 | 6. Optional: expand with follow-up runs (previousRunId + input.exclusion) |
| 47 | ``` |
| 48 | |
| 49 | ## Step 1: Understand the ICP |
| 50 | |
| 51 | When the user says something like "Make a list of 200 leads for [company]", first establish the Ideal Customer Profile. If the user already described the ICP, confirm it. If not, run one small Agent run to research it: |
| 52 | |
| 53 | ``` |
| 54 | agent_create_run { |
| 55 | "query": "Research {company_name}: what they sell, who their existing customers are, and what their ideal customer profile is.", |
| 56 | "effort": "low", |
| 57 | "outputSchema": { |
| 58 | "type": "object", |
| 59 | "properties": { |
| 60 | "company_description": { "type": "string", "description": "What the company does in 2 sentences or less" }, |
| 61 | "icp_description": { "type": "string", "description": "Concise ICP description that clearly defines target companies" }, |
| 62 | "sub_verticals": { "type": "array", "maxItems": 10, "items": { "type": "string" }, "description": "Sub-verticals breaking down the ICP" }, |
| 63 | "useful_enrichments": { "type": "array", "maxItems": 8, "items": { "type": "string" }, "description": "Enrichment columns useful for filtering high-signal companies" } |
| 64 | }, |
| 65 | "required": ["company_description", "icp_description", "sub_verticals", "useful_enrichments"] |
| 66 | } |
| 67 | } |
| 68 | ``` |
| 69 | |
| 70 | Present the ICP to the user and confirm: |
| 71 | |
| 72 | - Is the ICP description accurate? |
| 73 | - Any companies to exclude (competitors, existing customers)? |
| 74 | - How many leads do they want? (default 200) |
| 75 | - Any specific enrichment columns they care about? |
| 76 | |
| 77 | ## Step 2: Create the Lead-Gen Run |
| 78 | |
| 79 | Design an `outputSchema` with a bounded `companies` array. Keep schemas small, flat, and explicit; always bound arrays with `maxItems`. |
| 80 | |
| 81 | **Core fields to always include:** |
| 82 | |
| 83 | - `company_name` (string) |
| 84 | - `website` (string) |
| 85 | - `product_description` (string, "in 12 words or less") |
| 86 | - `icp_fit_score` (integer, 1-10) |
| 87 | - `icp_fit_reasoning` (string, "compelling one-liner in 20 words or less") |
| 88 | |
| 89 | Add enrichment fields tailored to the campaign (funding stage, headcount range, he |