/openoutfind:find-leads [N] [emails]from openoutfind
Finds qualified B2B leads using the OpenOutFind CLI tool. Handles setup, status checks, and running lead discovery against an ICP. Outputs CSV for downstream sending.
Ships in openoutfind. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
OpenOutFind is a self-hosted CLI lead finder. You describe a product and a target market once; each run discovers candidates from a licensed data source, has an LLM judge each one against that ICP, writes down why, and prints every lead it has as CSV on stdout.
It is one bounded command: ask for an amount, get rows, exit. There is no daemon, no background job, no file the tool writes for the operator, and nothing to poll. If you find yourself wanting to tail a log or wait for something, you have the wrong model of this tool.
It does not send email. The deliverable is a CSV for whatever the user already sends with.
outfind status # human summary
outfind status --json # the same document, for you to parse
If the command is missing, run it through uvx instead — uvx openoutfind ... — or install it
with pip install openoutfind. Inside a checkout of the repo, python manage.py <verb> is the
same entry point.
status never blocks and never spends. It answers config (complete, or which OPENOUTFIND_*
variables are missing), lead and deal counts, the credit balance, anything blocked, walk
(every fired page, what the search was expected to hold beside what came back), and a
next_action — start there whenever you are unsure what state the user is in.
status says the configuration is incompleteConfiguration is the environment, and nothing is stored. There is no wizard here and no config
row: every value is read from OPENOUTFIND_* on every run, so setting up an install means exporting
these — which is also why nothing ever has to be re-entered in a container or a CI job.
| Group | Environment variables |
|---|---|
| campaign | OPENOUTFIND_PRODUCT_DOCS, OPENOUTFIND_CAMPAIGN_TARGET; optional OPENOUTFIND_MAX_PER_COMPANY — at most N fits from one company |
| llm | OPENOUTFIND_AI_MODEL, OPENOUTFIND_LLM_API_KEY |
| bettercontact | OPENOUTFIND_BETTERCONTACT_API_KEY |
| account | optional: OPENOUTFIND_OPERATOR_EMAIL — the install's contacts-store identity; OPENOUTFIND_OPERATOR_COUNTRY — an EEA/UK/CH country stops contributing to the contacts store |
outfind check # is this install configured? creates the database, spends nothing
check creates the database, verifies the model answers to the key it was given, prints what this
run was told, and stops before spending anything.
The product description and target market are pages of prose, so pass them as files rather than shell-quoted strings — quoting a markdown paragraph on a command line corrupts it quietly:
outfind check --product-docs product.md --target target.md
You never need to run check first — find checks the same things — but do run it when the user
has not configured anything, because it fails cheaply and prints the configuration it read, so a
misread product description is caught before any work.
outfind find 10 # ten more qualified leads — free, and cannot spend
outfind find 10 --emails # ...and buy an address for whatever cleared the gate
outfind find 10 emails # ten more *carrying* a verified email (≤10 credits)
outfind find 0 # no work at all — just print what is already there
Three things about N that are easy to get wrong:
N is how many more, not a total. A store with 30 leads answers find 10 by working
until it has 40. Runs are fully resumable; re-running continues rather than restarting.find 0 does no work and spends nothing. It is how you re-export, or answer "what do we
have?" without running a job.N is a budget when the unit is emails. The provider bills one credit per verified hit, so
find 10 emails is capped at ten credits by construction — the number typed is in the same unit
as the invoice.Discovery and qualification are free (they cost only the user's own LLM key). The address lookup is the only paid step, and it is opt-in:
find N cannot spend a credit, however many leads are queued past the confidence gate;--emails permits buying for whatever is ready;emails unit implies --emails, because a goal counted in addresses cannot be met without
buying them.Do not add emails or --emails unless the user asked for email addresses. If they said
"find me leads", run the free form and tell them the paid form exists. A lead with no address still
exports — the row carries the person, the company and the reason with a blank email.
| Flag | What it does |
|---|---|
--new | Print only the rows this run produced, instead of every lead in the store. Use this when you are reading stdout into your own context rather than into a file. |
--json | The rows as JSON Lines on stdout (the full record, profile_text included); the run's metadata — goal, outcome, next_action — as one JSON object on stderr, and nothing else there unless --debug is given, which keeps the log lines beside it (each object on a line of its own, starting {). Prefer it when you are going to parse. |
--batch | Hold everything until the job ends, then print every lead once — the old, pre-streaming shape. Output is progressive by default now (see below); reach for --batch only if whatever you are piping into cannot handle a stream — a strict single-document JSON parser, for instance. Not something you need for reading into your own context — that is what --new is for. |
--debug | Show the discovery walk's reasoning on stderr. For diagnosing a run that finds nothing. |
--open | Opens each new lead's profile in a browser. Never pass this — it is for a human at a terminal, and it errors out headless. |
--db PATH | Work against a SQLite file other than ~/.openoutfind/data/db.sqlite3 (same as OPENOUTFIND_DB). Accepted by every verb. |
--agent-qualify | Opt out of AI_MODEL for the qualify step — see Answering qualify yourself below. |
--brief PATH | A file holding the judging rules — who fits, who does not, which companies look like buyers and are not. Stored as the store's brief, replacing any there, and read by the seed, the anchors and every verdict. Without it AI_MODEL writes one the first time a prompt needs it. Write it yourself when you are a stronger model than the judge: the judge then applies your rules to every lead. status shows the brief in force. An unreadable or empty file is bad_config, before any work. |
--exclude PATH | A file of LinkedIn URLs, one per line (blank lines ignored). Those profiles are never put up for a verdict — not even as a qualify_pending stop — never printed, and never counted toward the goal. URLs match with the host lowercased and the query, fragment and trailing slash dropped. An unreadable file is bad_config, before any work. |
--labels PATH | A customer's marks on leads they were sent, taken in as verdicts so a fresh store starts from them. The file is a JSON array or JSON Lines of objects with linkedin_url, value (good, not_fit, unsure), value_reason, note and the person as find --json printed them (profile_text, source_fields, employees_min/employees_max, full_name, title, company). good and not_fit + already_known train as fits, any other not_fit but gone as a no-fit with the customer's reason, and unsure, blank and gone are left out. A marked lead is never judged, printed, counted toward the goal or looked up. A mark with no profile_text is listed, not loaded. Marks already in the store are skipped, so pass the flag on every call of a loop; new marks on a store that holds verdicts of its own are bad_config (use a new --db). Under --json the run object carries a labels key: fits, no_fits, left_out, already_in, no_profile. |
A run can take a while: each lead is an LLM call, and paid lookups are polled. Give it a generous timeout rather than a short one plus a retry — a killed run wastes the work, though nothing already qualified is lost.
If you (the calling agent) are already reasoning about these leads in this conversation,
OPENOUTFIND_LLM_API_KEY is a second, redundant LLM bill for a verdict you can write yourself. Add
--agent-qualify and the run stops at the first candidate needing one instead of calling
AI_MODEL:
outfind find 10 --agent-qualify --json
It runs discovery exactly as normal — free either way — and exits non-zero with qualify_pending,
which carries the candidate's own fields right on the error object under --json
({"error": {"type": "qualify_pending", "profile_text", "company", "job_title", "full_name", "company_size", "location", "company_tags", "profile_url", "lead_id", ...}}; without --json the
profile URL and text are narrated on stderr just above the one-line error). profile_text is the
provider's fields run together and unlabelled (headline, industry label, title, company, seniority
bucket, company industry, location), so read the title and company from their own keys;
company_tags are LinkedIn's tags for the matched company, which say what it makes or sells but
are sometimes the wrong company. company_size is that company's LinkedIn employee band
(51–200 employees (LinkedIn), or not reported — unknown, not small): judge a size rule by it
rather than by the company's name. Judge the fit the
same way you would judge anything else in this conversation, then re-run the same command with
your verdict attached:
outfind find 10 --agent-qualify --verdict fit --reason "Series B security infra buyer, matches the ICP on team size and stack."
outfind find 10 --agent-qualify --verdict no-fit --reason "Consumer app, not B2B — outside the target market."
This resumes from exactly that candidate — no lead id to track, since at most one is ever pending —
records the verdict, and keeps going: either the goal is met, the search runs dry, or it stops
again at the next qualify_pending. A rejected verdict disqualifies the lead the same way an
LLM's "wrong fit" would; nothing already found is lost either way, same as goal_unreached.
On a large pool, expect a stretch of candidates that look like poor fits, and judge them the
same way. Once a store holds 1,600 or more unjudged leads, the run first judges about √N of them
drawn at random across score bands — most from the low end — to measure the bar a lead must clear
(the log says calibrate — verdict n of m). Those verdicts set the bar, so a fit marked no-fit to
save time, or a weak lead waved through, moves the bar for the whole order. The bar is where a
verdict pays more than a search, counting each one's run time and LLM bill, and the log says
where it landed (judging pays above a 54% fit rate). Your verdicts cost more than a model's
call, so under --agent-qualify the bar sits higher and the run searches sooner; with a model
judging it sits lower and the run works through weaker leads first.
--verdict needs both --agent-qualify and --reason — passing one without the other is
bad_config. Don't pass --agent-qualify unless you intend to answer every qualify_pending it
raises — a bare find without the flag uses AI_MODEL and never stops for a verdict at all,
which is the right default for a run nobody is driving turn-by-turn. --agent-qualify also drops
OPENOUTFIND_AI_MODEL/OPENOUTFIND_LLM_API_KEY out of what find requires for that run — a run
driven this way never needs a model key at all. The qualify_pending payload carries the store's
brief as rules ("" when none was given — pass --brief first and judge by it).
A fresh store asks you for its initial population first. The cold start has two more model
calls — the walk's first 4 searches and a few invented ideal profiles — so the first
--agent-qualify run on an empty store stops with population_pending instead. Its error object
carries product_docs, campaign_target, the brief as rules, population_size (4), the
fields and how the provider matches each, the allowed seniorities, anchor_count and the JSON
schema of the answer. Write both parts in one object and re-run the same command with it:
outfind find 10 --agent-qualify --population '{"searches": [
{"title": "head procurement", "tag": "dental clinic", "state": "California", "seniority": null},
{"title": "founder", "tag": "orthodontics", "state": "", "seniority": "founder"}, ...],
"country": "United States", "country_code": "us", "headcount_min": 1, "headcount_max": 50,
"anchors": [{"profile": "founder of a dental clinic group ...", "job_title": "founder",
"location_country": "united states",
"company_keywords": "dental clinic, dentistry, orthodontics"}, ...]}'
Write 10 whole searches, each a person you would want to find — "a head of procurement at a
dental clinic in California" is {"title": "head procurement", "tag": "dental clinic", "state": "California"}. The model knows which titles go with which companies; the walk then fires the
searches next to them that between them hold the most of the store's fits and your anchors.
Spread them: different titles, different kinds of company, some broad and some narrow.
title — the job title's words. Every word is required, in any order, and small words
(of, the) are ignored, it among them (it manager is manager). Nothing is stemmed:
write the form titles carry (founder, not founders), accents included (gérant and gerant
are different words).tag — at most one phrase one of the company's own LinkedIn tags holds, its words adjacent
and in order (cold brew, not brew cold), or empty for any company. Not stemmed either: a
company tags itself roasters or roaster, and the two find different companies. A tag is never searched
without a title, and a word just as common in unrelated industries (oil, brand) is no tag.state — a state inside the market country, or empty for the whole country. When all
the searches name a state, the walk never goes country-wide.seniority — one of the allowed values, or null.An anchor's profile is one lowercase line shaped like a lead row (headline, industry, title,
company, seniority, state, country), and its company_keywords are the invented company's tags,
comma separated. Every round of the walk counts the anchors as fits to cover, so a store never
walks without them: a store seeded with --labels gets them in the same answer, and an older
store that has searches but no anchors stops once with population_pending before its next
round (its searches part is not used). It is asked once per store; later runs never see it again.
Then it asks you to guess the market and its keywords, in plain counts. Before a composed
round, the market and every keyword the walk could search on (the title words and tags of the
fits, the seniorities, the places) need a guess, and the run stops with
keyword_guess_pending while any has none. Its error object carries counts_mean (what
every count is counted over: read it first), product_docs, campaign_target, the brief as
rules, market (its stored guess, or null when you guess it), under fields each field
with keywords to guess (what the field means, its keywords, and the ones already guessed
with their counts), and refused, the guesses refused last time with why. The market is
everyone on LinkedIn in the customer's country, not the customer's buyers: a search runs
over all of them. Guess it first: how many people it holds (for the US, about 200 million)
and how many of them fit. Then, one field at a time and comparing the keywords with each
other, how many of those people hold each keyword, in the customer's trade or any other, and
how many of them fit. A tag other trades share (processing, manufacturing) is held by
everyone in all of them, so it comes out large and thin; guessed as the customer's trade
alone, the walk searches it and gets food and payments companies. Re-run the same command
with:
outfind find 10 --agent-qualify --keyword-guesses '{
"market": {"people": 200000000, "fits": 5000},
"keywords": [{"keyword": "tag|green coffee", "people": 600, "fits": 120},
{"keyword": "tag|processing", "people": 400000, "fits": 110}, ...]}'
Leave market out once it is stored. Each keyword exactly as given, every one of them;
fits never above people, and neither above the market's — a guess that breaks one is
refused and asked again. Keep new ones on the scale of the ones already guessed. It comes
back when new fits bring new titles or tags. A guess is where the walk starts, not where it
stays: each keyword's own searches correct it.
stdout is result-only; logs, counts and progress go to stderr. That is the contract that makes redirection correct:
outfind find 10 > leads.csv
stdout carries every lead in the store, not just this run's rows. The newest file supersedes every
earlier one, and a lead whose address resolved since last time comes back with it filled in. It is
one file to overwrite, never a batch per run — so never append, and never stitch runs together.
Rows arrive progressively by default (what is already stored, immediately, then each new
lead as it resolves) rather than all at once at the end — the total is the same either way, so this
only matters if you are piping into something that cannot take a partial stream, in which case
--batch restores the old wait-for-the-end behavior.
Columns, in this order:
email, first_name, last_name, company, title, website, linkedin_url, reason, lead_id, qualified_at, full_name
email/first_name/last_name and recognise company/title/website/linkedin_url, so the
file imports without column mapping. Everything else, reason included, arrives as a custom
variable. Do not rename these columns when handing the file on.reason is the point — the LLM's written rationale for choosing this person. It is prose,
so it contains commas and quotes: parse with a real CSV reader (Python's csv, pandas), never
by splitting on ,. When summarising leads for the user, quote the reason; that is what
distinguishes these rows from a list bought anywhere else.lead_id is the stable key for dedupe across exports. qualified_at is when the verdict landed.first_name/last_name are blank unless an address was bought — they come from the paid
lookup's own response and are never split in-house. full_name is always there; use it when
naming a person to the user.company and website are blank for placeholder employers ("Self employed", "Stealth
startup"), not a guessed firm.reason is written for the operator, not the prospect. It justifies a yes/no —
third-person and evaluative. Never paste it into a message to the lead.The CSV is the integration. Instantly, Smartlead, Lemlist, HubSpot, a spreadsheet — the file imports as-is, and there is no adapter, webhook or plugin to look for. One thing to tell the operator when you hand a file on: turn on their tool's import deduplication. It is opt-in on Smartlead and undocumented on Instantly, so a re-exported lead can otherwise be contacted twice.
find 0 is the re-emit path — no work, no spend, prints what is already stored. That is
what to run for give me that file again; there is no export verb and none is coming.
For anything programmatic, prefer --json over parsing the CSV. It is JSON Lines: one record
per line on stdout, carrying every CSV column plus profile_text — the raw firmographic text the
qualifier judged on, which is what a sender writes a message from — source_fields (the title,
state, country and company tags, each under its Lead Finder name; {} when the store has none)
and employees_min/employees_max (the employer's LinkedIn size band, null when unreported).
The run's own metadata is one
JSON object on stderr:
outfind find 10 --json > leads.jsonl 2> run.json
outfind find 10 --json | jq -r '.email' # the records
One record, two serialisations: the JSON is the whole thing, the CSV is the importer-safe projection of it. A reader ignores keys it does not know — the finder never renames a key or repurposes one, and only ever adds.
Exit 0 means the goal was met, and nothing else. Anything short still prints its rows and exits non-zero with a single line on stderr:
error: <type>: <message>
Under --json that becomes {"error": {"type": ..., "message": ...}}, still on stderr. The type
is a stable string worth branching on:
| type | What it means | What to do |
|---|---|---|
goal_unreached | Ran, produced fewer than asked. The rows are on stdout. | Read the message: a drained index is a dead end, addresses on order are a reason to run again later. |
not_initialized | No pipeline at this database yet. | outfind check |
onboarding_incomplete | The run was not given everything it needs. | The message names every missing variable; outfind status does too. |
no_credential | No BetterContact key. | Configure one; discovery needs it too, and the free tier has 40 credits. |
provider_auth | The key was rejected. | Do not retry; the key is wrong. |
provider_out_of_credits | Credits exhausted. | Free find N still works; addresses do not. |
provider_rate_limited | 429. | Back off. Never retry at speed — the provider's docs say that can block the account. |
provider_unavailable | Provider unreachable at all. | Transient; retry later. |
bad_config | A value is set but unusable (e.g. a negative count). | Read the message; it names the field. |
qualify_pending | --agent-qualify stopped one candidate short of the AI_MODEL call it opted out of. | Judge the candidate carried on the error object, then re-run with --verdict/--reason — see Answering qualify yourself. |
population_pending | --agent-qualify on a fresh store: the walk's 4 initial searches and the ideal profiles are needed first. | Write them from the error's product_docs/campaign_target/rules in its schema, then re-run with --population '<json>'. |
keyword_guess_pending | --agent-qualify before a composed round: the market or keywords the walk could search on have no guess yet. | Guess the market (if market is null) and each keyword's people and fits, counted over everyone on LinkedIn in the country as counts_mean says, from the error's payload in its schema, then re-run with --keyword-guesses '<json>'. |
unanchored | The ideal profiles could not be written (the model failed or wrote none), and the walk does not start without them. Nothing was fired. | Transient on the model path; run again. |
Treat a non-zero exit as partial success with a stated reason, not as "nothing happened" — the rows are already on stdout. And never report a failed run to the user as "no leads matched": a throttled or unauthorised run that reads as an empty result is the worst possible answer, which is why every failure carries a type.
The export is a one-way boundary: leads leave, nothing comes back. There is no inbound endpoint and no callback. Whoever sends owns the conversation, the suppression list and the opt-out duty.
So the natural next step after a run is another tool's importer — Instantly, Smartlead, Lemlist, a CRM, a spreadsheet, or OpenOutSend for the sending half. Tell the user to switch on their sequencer's import deduplication: it is opt-in on Smartlead and undocumented on Instantly, so a lead exported twice can otherwise be contacted twice.
run verb, a scheduler, or a watch loop. find is the whole of it.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub eracle/openoutfind --plugin openoutfindOther plugins' skills for the same job