Article
Aug 3, 2026
How We Built an AI Lead Generation Engine with Claude Code
How we built an AI lead generation engine with Claude Code: waterfall sourcing, contact finding, and auto research that books calls.

Lead generation at the start of 2026 looked very different from how it works now. A few months ago most of our team still spent hours clicking through platform interfaces, stitching workflows together by hand, and babysitting them when a single edge case broke the whole run. That approach still produces results, but it caps how much you can do and how fast you can adapt when a market shifts.
We rebuilt the whole thing around Claude Code, and the engine now produces somewhere between 200 and 300 positive replies a day for our clients on cold email alone. This post is the operator version of how we did it. There are six shifts that made the difference, and each one replaced a manual step or an expensive tool with something we can run by describing what we want. If you already know how to generate B2B leads with AI, this is the build account underneath it.
What changed between February and now

The short version is that the work moved from operating tools to orchestrating them. Instead of logging into five platforms and manually reconciling their outputs, we describe the outcome we want and let Claude Code sequence the tools, clean the data, and hand back a finished artifact.
An engine in this context is not one product. It is a set of connected routines that source companies, find the right contacts, run scheduled checks, build and audit campaigns, and report back on what is working. Most of those routines are reusable Claude Skills, which means we write the logic once and run it against any new list or client. If you want the environment setup that sits under all of this, we covered it in our guide on how to set up Claude Code for your GTM team.
Waterfall company sourcing
The first shift was the way we build a list of target companies. In the past you picked one data provider and lived with its blind spots. We now waterfall across three types of source and let AI fill the gaps between them.
The three data sources
There are three broad categories of company data, and each one is strong in a different situation. LinkedIn-based databases power tools like Apollo and Clay, and the data is high fidelity because people maintain their own company and role information. Google Maps-based sources are the right choice for local and service businesses that live in a maps listing rather than a corporate directory. AI search tools have effectively crawled the open web and can surface companies that never show up cleanly in either of the first two, as long as the business has a website.
Why we start with high-fidelity data
The AI search tools are the most capable of the three, and also the most expensive if you try to build an entire market list with them alone. So we start with the highest fidelity source that fits the target, clean and normalize it with Claude Code, and only then bring in AI search to fill whatever is missing. Starting with the cheaper, more reliable data and topping it up with AI gives us a near complete list in a single pass at a fraction of the cost of running AI search across the whole market.
Matching the source to the list you need
The right starting point depends on who you are trying to reach. Marketing agencies with 10 to 200 employees are a LinkedIn list because they self-identify cleanly there. HVAC companies with a few hundred reviews are a Google Maps list because that is where their presence actually lives. Once the base list exists, AI search closes the gaps that come from inconsistent self-reporting on LinkedIn and from businesses that simply do not maintain a maps listing. Compare the two main database options in our breakdown of Apollo vs Clay, and see the wider set of options in our guide to the best prospecting tools.
Contact finding beyond LinkedIn scraping
Sourcing companies is only half the job. You still have to reach a real person, and this used to be the point where good lists went to waste.
The old middle-ground problem
For years you had two options and nothing in between. You could find a contact on LinkedIn, which works until you realize everyone else is emailing that same profile, or you could pull a generic address off the website and hope the right person read it. Prospects without a maintained LinkedIn profile were effectively unreachable through the first method, and the second method rarely got you to a named decision maker.
Finding people without a profile
Claude Code lets us orchestrate custom scrapers alongside AI search to identify the actual owner or operator, even when there is no LinkedIn profile to scrape and no clean email on the site. The same AI search tools that help build company lists are strong at contact discovery, and pairing them with targeted web search turns "this business has a website" into "here is the owner and how to reach them." That upgrade feeds directly into personalization, which we cover in our guide on writing personalized first lines for cold outreach. To enrich and validate the full record after discovery, we run the process described in how to enrich your lead list using Claude Code and verify addresses with one of the best email verification tools.
Agentic cron jobs
The third shift was moving scheduled work from brittle automations to agents that can handle their own edge cases.
What a scheduled agent does differently
A cron job is just a task that runs on a schedule. The old way to build one meant wiring together a workflow, hard-coding the prompts in advance, and then fixing it every time an input arrived in a shape you had not planned for. Now we tell an agent what we want on a recurring basis, for example a daily list of five companies hiring their first go-to-market engineer, and the agent decides how to get there. When it hits something unexpected, it reasons through the problem and continues rather than failing and waiting for a human to patch the workflow.
Daily checks on live campaigns
We use the same pattern for the routine monitoring that used to eat an operator's morning. Reply-rate analysis, bounce checks, and deliverability tracking now arrive as a scheduled message instead of a manual audit, and we can set them to run daily, hourly, or every fifteen minutes depending on how sensitive the campaign is. Keeping a constant read on deliverability matters more than ever, since cold email reply rates fell to around 3.43% in 2026 and small reputation problems compound quickly. The infrastructure those checks watch over is documented in our cold email infrastructure setup guide.
Goal mode for list building and campaign setup
The fourth shift changed how we hand off larger jobs. Goal mode lets us define an outcome and a standard for "done," then let the agent work until it meets that standard instead of stopping at the first plausible result.
Setting a pass/fail definition of done
For list building, we describe the tools the agent should use and the condition it has to satisfy, such as checking every database, compiling the results into a single CSV, and normalizing the columns before it reports back. Our process is to lay out a plan, drop a batch of contacts into Claude Code, and then ask it to generate a pass or fail check tied to that plan. Once we review and confirm the criteria, the agent runs against a clear target rather than a vague instruction.
Clarifying questions before the work runs
We also ask the agent to raise 10 to 15 clarifying questions before it starts, which surfaces the assumptions that usually cause rework later. This is the same discipline that separates a working cold email system built with Claude from one that produces volume without quality. For teams building this into a repeatable practice, our GTM engineer's guide to Claude Code covers how skills, sub agents, and routines fit together, and how GTM teams use Claude Code for prospecting shows the workflow end to end.
Auto research loops on live campaigns
The fifth shift was handing the analysis itself to the engine. Instead of pulling campaign data and reading through it ourselves, we run a research loop that watches for which prospects are most likely to respond, what titles and industries they hold, how big their companies are, and which messaging earns the replies.
Those insights arrive as a report on a daily or weekly schedule, and our job becomes spot-checking the findings rather than assembling them from raw data. This is how a modern revenue team finds opportunities before competitors do, because the feedback loop tightens from weeks to hours. It also connects to how we read buying signals and intent data, since the research loop is where those signals turn into a decision about who to prioritize.
Open-source technology you no longer pay for
The final shift was cost. A lot of the capabilities we used to rent are now available as open-source components that Claude Code can wire together, and the savings are real.
Browser automation harnesses let an agent move through a site, run research, and even carry a test product to checkout to verify something about the business. We have used that to check whether a company collects sales tax correctly, which becomes a genuine reason to reach out rather than a generic pitch. Local open models now handle smaller writing jobs like generating custom variables for email campaigns, and a little local tuning gets them to a usable standard for that narrow task. Pulling clean text from a homepage used to run into hundreds of dollars a month through paid scraping products, and an open-source HTML-to-text library now does the same job. Even technology detection, which many teams still pay for, is mostly a matter of checking a site's code for known markers, so it is straightforward to run yourself.
The best Claude MCPs for lead generation and the best Claude Skills for cold email are where these open components plug into the rest of the engine.
Do you still need tools like Apollo or Clay?
Yes, and they remain the right starting point for most lists. The waterfall approach does not replace high-fidelity databases, it sequences them. You still begin with the source that has the cleanest data for your target, whether that is a LinkedIn-based provider or a Google Maps source, and you use AI search to fill the gaps those databases leave behind. The change is that Claude Code coordinates all of them and cleans the output, so you are no longer choosing one provider and accepting its blind spots.
Is this only for technical teams?
No. The engine runs on plain-language instructions and reusable skills, which means an operator can describe the outcome and the standard for done without writing code from scratch. Building the skills the first time benefits from someone comfortable with the tools, and once they exist the rest of the team runs them by conversation. This is the same shift we see in how AI SDRs are replacing manual prospecting, where the operator directs the system rather than performing every step.
What does the engine cost to run compared to the old stack?
Lower, in most cases, because the largest savings come from replacing rented capabilities with open-source components and from using expensive AI search only to fill gaps rather than to build entire lists. Scraping, text extraction, technology detection, and some copy generation moved from paid subscriptions to open tools, and the waterfall approach means you spend on premium data only where cheaper sources fall short. The exact number depends on your list sizes and how much AI search your targets require, but the direction is consistent.

Where this leaves you
The engine comes down to three ideas. Start with the highest fidelity data you can and use AI to fill the gaps rather than to do everything. Let agents handle the scheduled work and the analysis so your team spends its time on judgment instead of collection. And take advantage of open-source components that quietly removed a large share of the old tooling bill. A lot of this was not possible at the start of the year, and the cost of the underlying data keeps falling, so the gap between teams that run this way and teams that still click through interfaces will only widen.

If you want an engine like this built for your outbound rather than assembled piece by piece, book a call with our team and we will map it to your market.