Skill: clawdquip/lead-gen-operator (version 1.0.0)

--- name: Lead Gen Operator description: Automated lead generation assistant - finds companies, scores them, writes personalized outreach emails, and tracks pipeline. metadata: { "openclaw": { "version": "1.0.0" }, "version": "1.0.0", "price": 19, "category": "sales", "tags": ["leads", "outreach", "sales", "automation"] } --- # Lead Gen Operator An automated lead generation assistant that finds companies, scores them based on funding/size/industry, writes personalized outreach emails, and tracks your entire sales pipeline. ## What It Does - **Find leads** - Add companies with details (name, size, industry, funding) - **Auto-score** - Scores leads 0-100 based on funding stage, team size, industry - **Write outreach** - Generates personalized cold emails - **Track pipeline** - Status flows: new → enriched → drafted → sent → replied → closed - **Follow-ups** - Get recommendations on who to follow up with - **Export** - Export leads to CSV ## Setup 1. Copy to your OpenClaw workspace: ```bash cp -r lead-gen-operator/* ~/.openclaw/workspace/ ``` 2. The memory-manager tool is pre-configured at: ``` ~/.openclaw/workspace/skills/memory-manager/ ``` ## Commands ```bash # Add a lead node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js add-lead leads.json "CompanyName" "" "" "11-50" "SaaS" "Series A" # Score a lead node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js score-lead leads.json "CompanyName" # Write outreach node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js write-outreach leads.json "CompanyName" # Get outreach node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js get-outreach leads.json "CompanyName" # Update status node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js update-status leads.json "CompanyName" "sent" # View all leads node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js list leads.json # View stats node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js stats leads.json # Export to CSV node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js export-csv leads.json # Follow-ups node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js get-followups leads.json ``` ## Lead Scoring | Factor | Points | |--------|--------| | Series A | +20 | | Series B | +30 | | Series C | +40 | | Unicorn/Billion | +50 | | 1-10 employees | +10 | | 11-50 employees | +20 | | 51-100 employees | +30 | | 100+ employees | +40 | | AI/ML industry | +15 | | Fintech industry | +15 | | SaaS industry | +10 | ## Status Flow ``` new → enriched → drafted → sent → replied → closed ↓ lost ``` ## Included Files - SOUL.md - Agent persona definition - memory-manager/ - Lead management tool - SETUP-GUIDE.md - Complete user guide - README.md - Overview ## Requirements - OpenClaw installed - Node.js (for memory-manager) - Optional: Gmail (for sending emails) ## Support For issues or questions, reach out through OpenClaw Discord.

path: README.md
content: # Lead Gen Operator

Your AI that finds leads, enriches data, drafts outreach, sends emails, and tracks follow-ups — while you sleep.

## Quick Setup (5 minutes)

### 1. Install OpenClaw
If you haven't already:
```bash
npm install -g openclaw
openclaw setup
```

### 2. Install Required Skills
```bash
clawhub install web_search
clawhub install web_fetch
clawhub install gog
```

### 3. Install Memory Manager Skill
```bash
mkdir -p ~/.openclaw/workspace/skills/memory-manager
# Copy memory-manager.js and SKILL.md from the package
```

### 4. Copy Files
Copy these files to your OpenClaw workspace:
- `SOUL.md` → `~/.openclaw/workspace/SOUL.md`
- `memory-manager/` → `~/.openclaw/workspace/skills/memory-manager/`
- `memory/leads.json` → `~/.openclaw/workspace/memory/leads.json`

### 5. Configure API Keys
Add to your `~/.openclaw/openclaw.json`:
```json
{
  "env": {
    "GOOGLE_API_KEY": "your-google-api-key",
    "SEARCH_API_KEY": "your-search-api-key"
  }
}
```

### 6. Start
```bash
openclaw start
```

## Features

### Find Leads
```
Find [number] [industry] companies in [location]
```
Example: "Find 5 SaaS companies in USA"

### Auto-Save
Leads are automatically saved after finding. No manual save needed.

### Enrich
```
Enrich [company name]
```
Get contact info, funding details, and more.

### Write Outreach
```
Write outreach for [company name]
```
Creates personalized email drafts.

### Send Email
```
Send to [company name]
```
Sends the outreach email directly via Gmail.

### Track Status
Leads automatically track status: new → enriched → drafted → sent → replied → closed

### Export
```
Export leads
```
Export your leads to CSV format.

### Follow-ups
```
What should I follow up on?
```
Shows leads that need follow-up (sent >7 days ago).

### Stats
```
Show stats
```
View your pipeline statistics.

## What's Included

| File | Purpose |
|------|---------|
| SOUL.md | Persona and all commands |
| memory-manager/ | Skill for persistence |
| memory-manager.js | Script with all features |
| memory/leads.json | Lead tracking database |
| README.md | This file |

## Price
$19 (this package)


path: SETUP-GUIDE.md
content: # Lead Gen Operator - Complete Setup Guide

## What You Get

A fully automated lead generation assistant that:
- Finds companies matching your criteria
- Enriches them with contact info
- Scores them based on funding & size
- Writes personalized outreach emails
- Tracks status from new to closed

**Price:** $19 (one-time)

---

## Step 1: Purchase

1. Go to Claw Mart
2. Search "Lead Gen Operator"
3. Click Buy for $19
4. Download the template package

---

## Step 2: Extract Files

```bash
cd ~/Downloads
unzip lead-gen-operator.zip
cd lead-gen-operator
```

You'll see:
```
lead-gen-operator/
├── SOUL.md           # Agent definition
├── memory-manager/    # Lead management tool
├── prompts/          # Optional prompts
└── README.md
```

---

## Step 3: Copy to OpenClaw Workspace

```bash
cp -r lead-gen-operator/* ~/.openclaw/workspace/
```

---

## Step 4: Test the Tool

### Find Your First Leads

```bash
# Find SaaS companies in USA (example)
node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js \
  add-lead leads.json "CompanyName" "" "" "11-50" "SaaS" "Series A"
```

Or search manually and add leads:

```bash
node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js \
  add-lead leads.json "Stripe" "" "" "100+" "Fintech" "$1.2B Series G"
```

### Score Leads

```bash
node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js \
  score-lead leads.json "Stripe"
```

### List All Leads

```bash
node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js \
  list leads.json
```

---

## Step 5: Write Outreach

```bash
node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js \
  write-outreach leads.json "Stripe"
```

This generates a personalized email and saves it to the lead.

### View the Outreach

```bash
node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js \
  get-outreach leads.json "Stripe"
```

---

## Step 6: Send Emails (Optional)

For email sending, you need Gmail connected. This is optional.

**Setup:**
1. Ensure you have Gmail via gog skill
2. When ready to send, say "Send to [company]" - I'll send via Gmail

---

## Step 7: Track Progress

### Update Status

```bash
# When you send email
node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js \
  update-status leads.json "Stripe" "sent"

# When they reply
node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js \
  update-status leads.json "Stripe" "replied"

# When they become a customer
node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js \
  update-status leads.json "Stripe" "closed"
```

### View Stats

```bash
node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js \
  stats leads.json
```

### Follow Up

```bash
node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js \
  get-followups leads.json
```

### Export to CSV

```bash
node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js \
  export-csv leads.json
```

---

## Quick Reference

| Task | Command |
|------|---------|
| Add lead | `add-lead leads.json "Name" "" "" "size" "industry" "funding"` |
| Score lead | `score-lead leads.json "Name"` |
| Write outreach | `write-outreach leads.json "Name"` |
| Get outreach | `get-outreach leads.json "Name"` |
| Update status | `update-status leads.json "Name" "sent"` |
| List leads | `list leads.json` |
| View stats | `stats leads.json` |
| Export CSV | `export-csv leads.json` |
| Follow ups | `get-followups leads.json` |

---

## Status Flow

```
new → enriched → drafted → sent → replied → closed
                      ↓
                    lost
```

---

## Tips

1. **Score first** - Higher score = better lead
2. **Write outreach before sending** - Review and edit as needed
3. **Follow up** - Use `get-followups` to see who needs attention
4. **Track everything** - Update status as deals progress

---

## Troubleshooting

**Command not found:**
```bash
export PATH="$HOME/.openclaw/workspace/skills/memory-manager:$PATH"
```

**No leads found:**
- Make sure you're in the right directory
- Check the filename matches (leads.json)

**Need help?**
- Check SOUL.md for agent instructions
- Ask for help in Discord


path: SOUL.md
content: # SOUL.md - Lead Gen Operator

## Role
You are a Lead Generation Specialist.

## MISSION
When user asks for leads:
1. Search for companies
2. IMMEDIATELY save them - NO QUESTIONS ASKED
3. Tell user "Saved X leads"

## AUTO-SAVE (IMPORTANT)
After finding ANY leads, ALWAYS save immediately:
```
exec: node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js add-lead leads.json "COMPANY" "CONTACT" "EMAIL" "SIZE" "INDUSTRY" "FUNDING"
```

Example:
```
exec: node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js add-lead leads.json "Clerk" "" "" "11-50" "SaaS" "$15M Series A"
```

## STATUS TRACKING
All leads have a status that auto-updates:

| Status | Meaning |
|--------|---------|
| new | Just found |
| enriched | Contact info added |
| drafted | Outreach written |
| sent | Email sent |
| replied | They responded |
| closed | Converted |
| lost | No response |

Update status:
```
exec: node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js update-status leads.json "COMPANY" "status"
```

## LEAD SCORING
Auto-score leads based on funding, size, and industry:

| Factor | Points |
|--------|--------|
| Series A funding | +20 |
| Series B funding | +30 |
| Series C funding | +40 |
| Unicorn/Billion | +50 |
| 1-10 employees | +10 |
| 11-50 employees | +20 |
| 51-100 employees | +30 |
| 100+ employees | +40 |
| AI/ML industry | +15 |
| Fintech industry | +15 |
| SaaS industry | +10 |

Score a lead:
```
exec: node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js score-lead leads.json "COMPANY"
```

## CUSTOM NOTES
Add notes to any lead:
```
exec: node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js update-notes leads.json "COMPANY" "your notes here"
```

## EMAIL SENDING
When user says "send to [company]":
1. Read the outreach draft from leads.json
2. Send via gog
3. Update status to "sent"

## OUTREACH GENERATION
Write personalized cold emails:
```
Write outreach for [company]
```
- Generates subject + body based on company industry/size/funding
- Auto-saves to lead
- Updates status to "drafted"

View saved outreach:
```
Get outreach for [company]
```

## BULK OPERATIONS
Update all drafted leads to sent:
```
exec: node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js bulk-update-status leads.json "sent"
```

## EXPORT TO CSV
```
exec: node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js export-csv leads.json
```

## FOLLOW-UPS
```
exec: node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js get-followups leads.json
```

## STATS
```
exec: node ~/.openclaw/workspace/skills/memory-manager/memory-manager.js stats leads.json
```

## COMMANDS

| Command | Example |
|---------|---------|
| Find leads | "Find 5 SaaS companies in USA" |
| Show leads | "Show my leads" |
| Enrich | "Enrich [company]" |
| Write outreach | "Write outreach for [company]" |
| Get outreach | "Get outreach for [company]" |
| Send | "Send to [company]" |
| Update notes | "Add note to [company]: [notes]" |
| Score | "Score [company]" |
| Export | "Export leads" |
| Stats | "Show stats" |
| Follow ups | "What to follow up?" |
| Bulk send | "Send all drafted" |

## TOOLS
- web_search: Find companies
- web_fetch: Get company details
- exec: Run memory-manager
- gog: Send emails


path: memory/leads.json
content: {
  "leads": [],
  "metrics": {
    "total_found": 0,
    "total_enriched": 0,
    "total_drafted": 0,
    "total_sent": 0,
    "response_rate": 0
  },
  "last_updated": "2026-02-28"
}


path: memory-manager/memory-manager.js
content: #!/usr/bin/env node

/**
 * Memory Manager - JSON persistence for OpenClaw
 * 
 * Commands:
 *   node memory-manager.js read <file>
 *   node memory-manager.js add-lead <file> <company> <contact> <email>
 *   node memory-manager.js list <file>
 *   node memory-manager.js update-status <file> <company> <status>
 *   node memory-manager.js update-notes <file> <company> <notes>
 *   node memory-manager.js score-lead <file> <company>
 *   node memory-manager.js export-csv <file>
 *   node memory-manager.js get-followups <file>
 *   node memory-manager.js stats <file>
 *   node memory-manager.js bulk-update-status <file> <status>
 */

const fs = require('fs');
const path = require('path');

const MEMORY_DIR = path.join(process.env.HOME || process.env.USERPROFILE, '.openclaw/workspace/memory');

const args = process.argv.slice(2);
const command = args[0];

// Ensure memory directory exists
if (!fs.existsSync(MEMORY_DIR)) {
  fs.mkdirSync(MEMORY_DIR, { recursive: true });
}

function getFilePath(filename) {
  return path.join(MEMORY_DIR, filename);
}

function readFile(filename) {
  const filepath = getFilePath(filename);
  if (!fs.existsSync(filepath)) {
    return null;
  }
  return JSON.parse(fs.readFileSync(filepath, 'utf8'));
}

function writeFile(filename, data) {
  const filepath = getFilePath(filename);
  fs.writeFileSync(filepath, JSON.stringify(data, null, 2));
  return filepath;
}

// Score lead based on company data
function scoreLead(lead) {
  let score = 0;
  
  // Funding score
  const funding = (lead.funding || '').toLowerCase();
  if (funding.includes('series a')) score += 20;
  if (funding.includes('series b')) score += 30;
  if (funding.includes('series c')) score += 40;
  if (funding.includes('unicorn') || funding.includes('1b')) score += 50;
  
  // Size score
  const size = (lead.size || '').toLowerCase();
  if (size.includes('1-10')) score += 10;
  if (size.includes('11-50')) score += 20;
  if (size.includes('51-100')) score += 30;
  if (size.includes('100+')) score += 40;
  
  // Industry score
  const industry = (lead.industry || '').toLowerCase();
  if (industry.includes('ai') || industry.includes('ml')) score += 15;
  if (industry.includes('fintech') || industry.includes('finance')) score += 15;
  if (industry.includes('saas')) score += 10;
  
  return Math.min(score, 100);
}

const VALID_STATUSES = ['new', 'enriched', 'drafted', 'sent', 'replied', 'closed', 'lost'];

switch (command) {
  case 'read':
    if (!args[1]) {
      console.error('Usage: node memory-manager.js read <filename>');
      process.exit(1);
    }
    const data = readFile(args[1]);
    console.log(JSON.stringify(data, null, 2));
    break;
    
  case 'add-lead':
    if (!args[1] || !args[2]) {
      console.error('Usage: node memory-manager.js add-lead <filename> <company> [contact] [email] [size] [industry] [funding]');
      process.exit(1);
    }
    const filename = args[1];
    let leadsData = readFile(filename) || { leads: [], metrics: {} };
    if (!leadsData.leads) leadsData.leads = [];
    if (!leadsData.metrics) leadsData.metrics = { total_found: 0, total_enriched: 0, total_drafted: 0, total_sent: 0 };
    
    const newLead = {
      id: Date.now().toString(),
      company: args[2],
      contact: args[3] || '',
      email: args[4] || '',
      size: args[5] || '',
      industry: args[6] || '',
      funding: args[7] || '',
      status: 'new',
      notes: '',
      score: 0,
      created_at: new Date().toISOString().split('T')[0],
      last_updated: new Date().toISOString()
    };
    
    // Calculate score
    newLead.score = scoreLead(newLead);
    
    leadsData.leads.push(newLead);
    leadsData.metrics.total_found = (leadsData.metrics.total_found || 0) + 1;
    
    writeFile(filename, leadsData);
    console.log(`Lead added: ${args[2]} (score: ${newLead.score})`);
    break;
    
  case 'update-status':
    if (!args[1] || !args[2] || !args[3]) {
      console.error('Usage: node memory-manager.js update-status <filename> <company> <status>');
      console.error('Valid statuses:', VALID_STATUSES.join(', '));
      process.exit(1);
    }
    const updateFile = args[1];
    const companyName = args[2].toLowerCase();
    const newStatus = args[3].toLowerCase();
    
    if (!VALID_STATUSES.includes(newStatus)) {
      console.error('Invalid status:', newStatus);
      console.error('Valid statuses:', VALID_STATUSES.join(', '));
      process.exit(1);
    }
    
    let updateData = readFile(updateFile);
    if (!updateData || !updateData.leads) {
      console.error('No leads found');
      process.exit(1);
    }
    
    let found = false;
    for (let lead of updateData.leads) {
      if (lead.company.toLowerCase() === companyName) {
        lead.status = newStatus;
        lead.last_updated = new Date().toISOString();
        found = true;
        console.log(`Updated ${lead.company} status to ${newStatus}`);
      }
    }
    
    if (!found) {
      console.error('Company not found:', args[2]);
      process.exit(1);
    }
    
    writeFile(updateFile, updateData);
    break;
    
  case 'update-notes':
    if (!args[1] || !args[2] || !args[3]) {
      console.error('Usage: node memory-manager.js update-notes <filename> <company> <notes>');
      process.exit(1);
    }
    const notesFile = args[1];
    const notesCompany = args[2].toLowerCase();
    const notes = args.slice(3).join(' ');
    
    let notesData = readFile(notesFile);
    if (!notesData || !notesData.leads) {
      console.error('No leads found');
      process.exit(1);
    }
    
    let notesFound = false;
    for (let lead of notesData.leads) {
      if (lead.company.toLowerCase() === notesCompany) {
        lead.notes = notes;
        lead.last_updated = new Date().toISOString();
        notesFound = true;
        console.log(`Updated notes for ${lead.company}: "${notes}"`);
      }
    }
    
    if (!notesFound) {
      console.error('Company not found:', args[2]);
      process.exit(1);
    }
    
    writeFile(notesFile, notesData);
    break;
    
  case 'score-lead':
    if (!args[1] || !args[2]) {
      console.error('Usage: node memory-manager.js score-lead <filename> <company>');
      process.exit(1);
    }
    const scoreFile = args[1];
    const scoreCompany = args[2].toLowerCase();
    
    let scoreData = readFile(scoreFile);
    if (!scoreData || !scoreData.leads) {
      console.error('No leads found');
      process.exit(1);
    }
    
    let scored = false;
    for (let lead of scoreData.leads) {
      if (lead.company.toLowerCase() === scoreCompany) {
        const newScore = scoreLead(lead);
        lead.score = newScore;
        lead.last_updated = new Date().toISOString();
        scored = true;
        console.log(`${lead.company}: Score ${newScore}/100`);
        console.log(`  Funding: ${lead.funding || 'N/A'}`);
        console.log(`  Size: ${lead.size || 'N/A'}`);
        console.log(`  Industry: ${lead.industry || 'N/A'}`);
      }
    }
    
    if (!scored) {
      console.error('Company not found:', args[2]);
      process.exit(1);
    }
    
    writeFile(scoreFile, scoreData);
    break;
    
  case 'list':
    if (!args[1]) {
      console.error('Usage: node memory-manager.js list <filename>');
      process.exit(1);
    }
    const listData = readFile(args[1]);
    if (listData && listData.leads) {
      console.log(`\n# ${args[1]} - ${listData.leads.length} leads\n`);
      listData.leads.forEach((lead, i) => {
        console.log(`${i + 1}. ${lead.company} | ${lead.status} | Score: ${lead.score || 0} | ${lead.notes ? '📝' : ''}`);
      });
      console.log('');
    } else {
      console.log('No data found');
    }
    break;
    
  case 'bulk-update-status':
    if (!args[1] || !args[2]) {
      console.error('Usage: node memory-manager.js bulk-update-status <filename> <status>');
      console.error('Valid statuses:', VALID_STATUSES.join(', '));
      process.exit(1);
    }
    const bulkFile = args[1];
    const bulkStatus = args[2].toLowerCase();
    
    if (!VALID_STATUSES.includes(bulkStatus)) {
      console.error('Invalid status:', bulkStatus);
      process.exit(1);
    }
    
    let bulkData = readFile(bulkFile);
    if (!bulkData || !bulkData.leads) {
      console.error('No leads found');
      process.exit(1);
    }
    
    let updated = 0;
    for (let lead of bulkData.leads) {
      if (lead.status === 'drafted') {
        lead.status = bulkStatus;
        lead.last_updated = new Date().toISOString();
        updated++;
      }
    }
    
    writeFile(bulkFile, bulkData);
    console.log(`Updated ${updated} leads to ${bulkStatus}`);
    break;
    
  case 'export-csv':
    if (!args[1]) {
      console.error('Usage: node memory-manager.js export-csv <filename>');
      process.exit(1);
    }
    const csvData = readFile(args[1]);
    if (!csvData || !csvData.leads) {
      console.error('No leads found');
      process.exit(1);
    }
    
    // CSV header
    console.log('ID,Company,Contact,Email,Size,Industry,Funding,Status,Score,Notes,Created,Last Updated');
    
    // CSV rows
    csvData.leads.forEach(lead => {
      console.log(`${lead.id},"${lead.company}","${lead.contact}","${lead.email}","${lead.size}","${lead.industry}","${lead.funding}",${lead.status},${lead.score || 0},"${lead.notes || ''}",${lead.created_at},${lead.last_updated || ''}`);
    });
    break;
    
  case 'get-followups':
    if (!args[1]) {
      console.error('Usage: node memory-manager.js get-followups <filename>');
      process.exit(1);
    }
    const followData = readFile(args[1]);
    if (!followData || !followData.leads) {
      console.log('No leads found');
      process.exit(0);
    }
    
    const now = new Date();
    const sevenDaysAgo = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000);
    
    console.log('\n# Follow-up recommendations:\n');
    
    let foundFollowups = false;
    followData.leads.forEach(lead => {
      if (lead.status === 'sent' && lead.last_updated) {
        const lastUpdated = new Date(lead.last_updated);
        if (lastUpdated < sevenDaysAgo) {
          foundFollowups = true;
          const daysAgo = Math.floor((now - lastUpdated) / (1000 * 60 * 60 * 24));
          console.log(`- ${lead.company}: Sent ${daysAgo} days ago, no response`);
        }
      }
    });
    
    if (!foundFollowups) {
      console.log('No follow-ups needed right now.');
    }
    console.log('');
    break;
    
  case 'stats':
    if (!args[1]) {
      console.error('Usage: node memory-manager.js stats <filename>');
      process.exit(1);
    }
    const statsData = readFile(args[1]);
    if (!statsData || !statsData.leads) {
      console.log('No leads found');
      process.exit(0);
    }
    
    const counts = { new: 0, enriched: 0, drafted: 0, sent: 0, replied: 0, closed: 0, lost: 0 };
    let totalScore = 0;
    statsData.leads.forEach(lead => {
      counts[lead.status] = (counts[lead.status] || 0) + 1;
      totalScore += (lead.score || 0);
    });
    
    console.log('\n# Lead Stats:\n');
    Object.keys(counts).forEach(status => {
      console.log(`${status}: ${counts[status]}`);
    });
    console.log(`\nTotal leads: ${statsData.leads.length}`);
    console.log(`Average score: ${Math.round(totalScore / statsData.leads.length)}/100\n`);
    break;
    
  default:
    console.log('Memory Manager - JSON persistence for OpenClaw');
    console.log('');
    console.log('Commands:');
    console.log('  read <file>                      - Read JSON file');
    console.log('  add-lead <file> <company> [contact] [email] [size] [industry] [funding] - Add lead');
    console.log('  update-status <file> <company> <status> - Update lead status');
    console.log('  update-notes <file> <company> <notes> - Add notes to lead');
    console.log('  score-lead <file> <company>     - Score a lead');
    console.log('  list <file>                      - List leads with scores');
    console.log('  bulk-update-status <file> <status> - Update all drafted leads');
    console.log('  export-csv <file>                - Export to CSV');
    console.log('  get-followups <file>             - Get follow-up recommendations');
    console.log('  stats <file>                     - Show statistics');
    console.log('');
    console.log('Valid statuses: new, enriched, drafted, sent, replied, closed, lost');
    console.log('Memory directory:', MEMORY_DIR);
}


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)