Qualify leads

From Othmane-Khadri/YALC-the-GTM-operating-system · View interactive version

Qualify leads is an AI agent skill from the GitHub repository Othmane-Khadri/YALC-the-GTM-operating-system. Run the GTM-OS 7-gate qualification pipeline over a batch of leads from a CSV, JSON, Notion DB, profile-visitors export, post-engagers export, or an existing SQLite result set. Writes per-lead pass/fail data back into SQLite and returns a result-set id you can hand to the campaign launcher. Use when

How to use this skill

Skill file

Qualify Leads

I'll wrap leads:qualify. I'll ask for the input source and path, validate locally, run the CLI, parse the per-gate counts, and surface the result-set id so you can hand it to launch-linkedin-campaign or personalize-message.

When This Skill Applies

Use this skill when the user says:

NOT this skill (use personalize-message instead):

NOT this skill (use scrape-post-engagers instead):

What This Skill Does

  1. Asks where the leads live (CSV path, JSON path, Notion DB id, visitors export, engagers export, or an existing result-set id).
  2. Validates the input locally — file exists, Notion id has the right shape, result-set id format looks plausible.
  3. Shells out to npx tsx src/cli/index.ts leads:qualify <args> from ~/Desktop/gtm-os/.
  4. Parses the CLI's stdout — the pipeline emits per-gate counters and the resultSetId.
  5. Renders a clean per-gate summary, the result-set id, and the top hot leads.
  6. Offers two follow-up moves: launch a campaign or personalize messages.

What This Skill Does NOT

Pre-flight (do this before step 1)

  1. Onboarding interruption guard. Run:

```bash

test -f ~/.gtm-os/.in-flight-setup && echo "BLOCKED" || echo "OK"

```

If BLOCKED, stop. Tell the user: "Setup is mid-flight. Finish yalc-gtm start first, then re-invoke me." Exit cleanly.

  1. Confirm cwd. All shell-outs assume ~/Desktop/gtm-os/.

Workflow

Step 0 — Ask for input

One question at a time:

  1. Where do the leads live? Five options:
  1. Any toggles? Ask only if volunteered:

Step 1 — Validate the input locally

Step 2 — Shell out

cd ~/Desktop/gtm-os && set -a && source .env.local && set +a && \
  npx tsx src/cli/index.ts leads:qualify --source <type> --input <path>

…or for an existing result set:

cd ~/Desktop/gtm-os && set -a && source .env.local && set +a && \
  npx tsx src/cli/index.ts leads:qualify --result-set <id>

Per the merged 0.13.0 benchmark in docs/skills-architecture.md, single-command side-effecting skills shell out unconditionally. The CLI is the source of truth for env loading, tenant resolution, and the withDiagnostics() wrapper.

Step 3 — Parse the output

leads:qualify writes [qualify] log lines to stdout, one per gate, plus the result-set id and survivor count. On non-zero exit, surface stderr verbatim — no summarising.

Step 4 — Render

Show the per-gate funnel, result-set id, and top 5 hot leads. See references/example-output.md.

Step 5 — Offer follow-ups

"Want me to also:

(a) launch a LinkedIn campaign for the qualified leads via launch-linkedin-campaign, or

(b) personalize messages for the top N via personalize-message?"

Don't run anything unless the user says yes.

Failure surfacing — verbatim, never summarised

When leads:qualify exits non-zero, paste its stderr unchanged. The CLI's messages are tested and stable.

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.