---
name: ai-sales-pipeline-064d539f9653
description: "Open-source AI marketing skills for Claude Code \u2014 growth experiments, sales pipeline, content ops, outbound, SEO, and finance automation"
---

# AI Sales Pipeline

## Preamble (runs on skill start)

```bash
# Version check (silent if up to date)
python3 telemetry/version_check.py 2>/dev/null || true

# Telemetry opt-in (first run only, then remembers your choice)
python3 telemetry/telemetry_init.py 2>/dev/null || true
```

> **Privacy:** This skill logs usage locally to `~/.ai-marketing-skills/analytics/`. Remote telemetry is opt-in only. No code, file paths, or repo content is ever collected. See `telemetry/README.md`.

---

Complete AI-powered sales pipeline automation: website visitor identification → intent scoring → suppression → campaign routing → dead deal resurrection → trigger prospecting → self-learning ICP optimization.

## When to Use

Use this skill when:
- Setting up automated outbound from website visitor identification (RB2B)
- Running suppression checks before cold outreach
- Routing leads to the right cold email campaigns
- Reviving closed-lost deals from HubSpot
- Finding companies showing buying signals (new hires, funding, job postings)
- Analyzing prospect approve/reject patterns to improve ICP targeting

## Tools

### RB2B Pipeline (visitor → outbound)

| Script | Purpose | Key Command |
|--------|---------|-------------|
| `rb2b_webhook_ingest.py` | Webhook server + intent scoring | `python3 rb2b_webhook_ingest.py --serve --port 4100` |
| `rb2b_suppression_pipeline.py` | 5-layer suppression checks | `python3 rb2b_suppression_pipeline.py --email user@example.com` |
| `rb2b_instantly_router.py` | Full pipeline: score → suppress → route → enroll | `python3 rb2b_instantly_router.py --serve --port 4100` |

### Deal Intelligence

| Script | Purpose | Key Command |
|--------|---------|-------------|
| `deal_resurrector.py` | 3-layer dead deal revival (time decay + POC expansion + champion tracking) | `python3 deal_resurrector.py --top 10 --dry-run` |
| `trigger_prospector.py` | Web signal monitoring (new hires, funding, agency searches) | `python3 trigger_prospector.py --days 7 --top 15` |
| `icp_learning_analyzer.py` | Learn from approve/reject decisions, recommend ICP changes | `python3 icp_learning_analyzer.py` |

## Configuration

All scripts use environment variables for API keys and configuration. Copy `.env.example` to `.env` and fill in your values.

### Required Environment Variables

- `HUBSPOT_API_KEY` — HubSpot private app token (Deal Resurrector, Suppression)
- `INSTANTLY_API_KEY` — Instantly API key (Router, Suppression)
- `BRAVE_API_KEY` — Brave Search API key (Trigger Prospector)
- `DATABASE_URL` — PostgreSQL connection string (ICP Analyzer only)

### Key Customization Points

- **Intent scoring**: Edit `PAGE_INTENT_SCORES` dict in webhook_ingest to match your URL patterns
- **Agency detection**: Edit `AGENCY_KEYWORDS_*` in router for your market
- **Loss reason scoring**: Edit `LOSS_REASON_BONUS` in deal_resurrector for your close reasons
- **Signal queries**: Edit `SEARCH_QUERIES` in trigger_prospector for your target market
- **Campaign routing**: Edit `data/campaigns.json` with your Instantly campaign UUIDs

## Data Flow

```
RB2B Webhook → Ingest (score) → Suppress (5 layers) → Route (classify) → Instantly
HubSpot CRM  → Deal Resurrector (score + draft emails) → Review Queue
Brave Search → Trigger Prospector (score + enrich) → Outreach Queue
Prospect DB  → ICP Analyzer (learn patterns) → Filter Recommendations
```

## Dependencies

- Python 3.9+
- `requests` (for HubSpot API)
- `psycopg2-binary` (for ICP Analyzer only)
- No other external dependencies — scripts use stdlib HTTP server and urllib


---
Source attribution: ericosiu
Original project: https://github.com/ericosiu/ai-marketing-skills/blob/8088e1a167804d5615f6e982f62e5b4b6ff8f2f1/sales-pipeline/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Single Grain

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: ericosiu
Original project: https://github.com/ericosiu/ai-marketing-skills/blob/8088e1a167804d5615f6e982f62e5b4b6ff8f2f1/sales-pipeline/SKILL.md
Attribution basis: Source repository record

Fields of work: Marketing, Sales
Roles: Growth Marketer, Marketing Analyst, Product Marketer, Sales Operations, Sales Development Rep (SDR)
Specialties: API, Backend
Tools: HubSpot, PostgreSQL
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 37d030bcbbd0350603d107107a25066fc796a9aa3ea5b1a5853a25125561f903
