Skill: deepseekcmo/sales-rhythm-tracker (version 1.0.0)

--- name: sales-rhythm-tracker version: 1.0.0 author: yinguofeng007 description: > B2B sales pipeline manager powered by the Alibaba Iron Army (阿里铁军) methodology. Use this skill for daily sales briefings, lead management, pipeline health checks, weekly sprint planning, customer follow-up prioritization, and closing strategy. Triggered by phrases like: "morning sales brief", "add lead", "pipeline review", "who should I call today", "weekly sales plan", "sales update", "close rate", "follow up", "deal stuck", "customer type", "sales sprint". tags: [sales, crm, pipeline, b2b, productivity, business, revenue] category: business --- # Sales Rhythm Tracker ### Powered by the Alibaba Iron Army Methodology (阿里铁军方法论) > "Let 80% of your people achieve 80% of the top performer's results — through system, not talent." > — Alibaba Iron Army Core Principle --- ## What This Skill Does This skill transforms your OpenClaw agent into a personal B2B sales coach and pipeline manager. It applies the same methodology that built Alibaba's legendary direct sales force — the "Iron Army" that grew Alibaba.com from zero to market dominance across China's SMB sector. Unlike generic CRM tools, this skill encodes *sales thinking*, not just data storage. Your agent will tell you **who to call, when, why, and how** — based on proven rhythms, not gut feel. **Data lives locally.** No SaaS subscription. No API keys. Your pipeline in plain markdown files. --- ## The Methodology: Alibaba Iron Army Framework Before using this skill, understand the philosophy your agent now operates on: ### Principle 1: The Boiling Water Theory (烧水理论) Every customer relationship is like water heating toward boiling (closing). A first visit gets the water to 70°C. Consistent follow-up brings it to 100°C (close). **A gap that's too long lets the water cool back to cold** — and you restart from scratch. Your agent tracks the "temperature" of every lead and alerts you before deals go cold. ### Principle 2: Three-Step Sprint Cycle (三步一杀) Every 4-week cycle follows this rhythm: - **Week 1 — Seed (播种)**: Maximum outreach. Volume is the foundation. Target 40+ touches. - **Week 2 — Flip (翻牌)**: Filter ruthlessly. Identify the top 30% worth pursuing. Walk away from the rest. - **Week 3 — Harvest (采果)**: Close sprint. Push every qualified lead to YES or NO. No gray zones. - **Week 4 — Reset (机动)**: Handle onboarding, collect payment, start seeding next cycle. ### Principle 3: The 8-Visit Daily Structure (每日八访) A productive sales day consists of: - 4 × New customer visits/calls (seed phase) - 2 × Follow-up visits (nurture phase, 2nd or 3rd contact) - 2 × Closing visits (harvest phase, move to YES/NO) ### Principle 4: Four Customer Personality Types (四型客户) Every customer has a dominant style. Matching your approach to their type is the single highest-leverage sales skill: | Type | Chinese | Traits | What They Need | Your Approach | |------|---------|--------|---------------|---------------| | **Tiger** | 老虎型 | Direct, decisive, impatient, results-driven | Bottom line, ROI, fast answers | Lead with outcomes. Be brief. Skip small talk. Use data. | | **Peacock** | 孔雀型 | Enthusiastic, social, optimistic, status-conscious | Recognition, relationships, exciting vision | Build rapport first. Tell success stories. Be energetic. | | **Koala** | 无尾熊型 | Patient, loyal, risk-averse, team-oriented | Safety, proof, support, consensus | Build trust slowly. Provide case studies. Never rush. | | **Owl** | 猫头鹰型 | Analytical, precise, systematic, skeptical | Data, accuracy, process, completeness | Prepare detailed answers. Be precise. Address every concern. | ### Principle 5: The Traffic Light System (红黄绿) Every lead gets a status color at each review: - 🟢 **Green**: Momentum is healthy. Follow-up on schedule. Keep heating. - 🟡 **Yellow**: Stalled. Something slowed down. Needs diagnosis and intervention. - 🔴 **Red**: Relationship cooling. Urgent action required or acknowledge as lost. ### Principle 6: Four-Step Sales Conversation (四步销售法) Every customer interaction follows this sequence: 1. **挖需求 (Uncover)**: Ask questions to understand their real pain. 70% listening, 30% talking. 2. **抛产品 (Present)**: Match your solution to their specific pain. Not features — outcomes. 3. **解问题 (Address)**: Handle objections. Every objection is a buying signal in disguise. 4. **提成交 (Close)**: Ask for the commitment. Silence after asking is your best tool. ### Principle 7: Phone Call Protocol (电话拜访规则) - Optimal call length: **3–5 minutes** (maximum 6 minutes) - Before every call: Write down your ONE objective for this call - Best use cases: Follow-up confirmation, closing push, payment collection - After every call: Log the result within 10 minutes while memory is fresh ### Principle 8: ASK Growth System Every sales improvement requires development in three dimensions: - **A — Attitude (心态)**: Belief in the product, resilience, ownership mindset - **S — Skill (技能)**: Prospecting, questioning, objection handling, closing - **K — Knowledge (知识)**: Industry, product, competition, customer context --- ## Pipeline Stages Leads move through 8 stages. Your agent tracks stage and days-in-stage: | Stage | Label | Description | Healthy Duration | |-------|-------|-------------|-----------------| | 1 | `prospect` | Identified, not yet contacted | — | | 2 | `connected` | First contact made, initial interest | 1–3 days | | 3 | `qualified` | Pain confirmed, budget exists | 3–7 days | | 4 | `presented` | Solution presented | 3–7 days | | 5 | `proposal` | Formal proposal submitted | 3–10 days | | 6 | `negotiation` | Active negotiation on terms | 3–14 days | | 7 | `closing` | Final push — YES or NO this week | 1–5 days | | 8 | `won` | Closed. Onboarding. Collect payment. | — | | 9 | `lost` | Lost. Record reason. Learn. | — | **Alert rule**: Any lead stuck in the same stage for more than double the healthy duration = 🔴 Red status. --- ## Lead Scoring (0–100) Your agent automatically scores each lead to prioritize your daily actions: | Factor | Max Points | How It's Calculated | |--------|-----------|---------------------| | Stage progression | 25 | Higher stage = more points | | Recency of contact | 20 | Last contact < 3 days = 20pts; < 7 days = 10pts; > 14 days = 0pts | | Engagement level | 20 | Customer-initiated contact = high; passive = low | | Deal size | 15 | Relative to your average deal size | | Time pressure | 20 | Customer deadline approaching = high score | **Score interpretation**: - 80–100: 🔥 Hot — close this week - 60–79: ✅ Warm — maintain rhythm, don't let cool - 40–59: 🟡 Lukewarm — needs intervention or deprioritize - Below 40: 🔴 Cold — decide: revive or move on --- ## Commands & Usage ### Daily Commands **Morning Brief** (run every morning before 9am): > "Morning sales brief" / "Who should I call today?" / "Sales priorities today" Agent will: Scan pipeline → Score all leads → Generate top 3–5 priority actions → Suggest approach for each based on customer type. **Log Activity** (after every call/meeting): > "Log: [customer name] — [what happened] — [next step]" > Example: "Log: Sarah Chen at TechBridge — she's interested but wants to loop in her CEO — next step: send exec summary by Thursday" Agent will: Record activity → Update lead status → Recalculate score → Flag if rhythm is at risk. **Add New Lead**: > "New lead: [Name] at [Company] — [context]" > Example: "New lead: David Park at Sunrise Manufacturing — met at trade show, interested in reducing procurement costs" Agent will: Create lead profile → Classify personality type from context → Set stage to connected → Add to next morning brief. **Check Deal Status**: > "How is [customer name] doing?" / "Update on [company]" Agent will: Pull customer profile → Show stage, score, last contact, temperature → Recommend next action. ### Weekly Commands **Weekly Sprint Plan** (every Monday morning): > "Weekly sprint plan" / "Monday sales planning" Agent will: Apply Three-Step Sprint logic to current week in the cycle → Categorize all leads by this week's priority tier → Generate a concrete 5-day action plan → Identify leads that need a YES/NO decision this week. **Pipeline Health Review** (every Friday): > "Pipeline review" / "End of week sales check" / "Pipeline health" Agent will: Calculate overall pipeline velocity → Flag stalled deals → Identify temperature-cooling risks → Suggest which leads to cut (翻牌) → Project next 2-week revenue likelihood. **Stuck Deal Diagnosis**: > "Deal stuck: [customer name]" / "[Customer] hasn't responded, what do I do?" Agent will: Diagnose cause of stall using Iron Army framework → Suggest intervention based on customer type → Provide exact language/script for next outreach. --- ## File Structure This skill uses local files in your workspace: ``` ~/.openclaw/workspace/sales/ ├── pipeline.md ← Your CRM: all active leads ├── activity-log.md ← Every interaction logged ├── weekly-sprint.md ← Current week's plan └── closed-deals.md ← Won/lost deals (for learning) ``` To initialize: run `scripts/init-pipeline.sh` once. --- ## Morning Brief Format Every morning brief follows this structure: ``` 📊 SALES MORNING BRIEF — [Date] Cycle: Week [1/2/3/4] of [Month] Sprint 🔥 TOP PRIORITY TODAY (must-do): 1. [Customer] — [Stage] — Score: [X] — [Why urgent] — [Recommended action] 2. [Customer] — [Stage] — Score: [X] — [Why urgent] — [Recommended action] ✅ MAINTAIN RHYTHM (important): 3. [Customer] — [Stage] — Last contact: [X days ago] — [Action] 4. [Customer] — [Stage] — Last contact: [X days ago] — [Action] ⚡ SEED TODAY (new outreach): - [Target sector/type for today's cold outreach] 📈 PIPELINE SNAPSHOT: - Active leads: [N] - This week's close targets: [N] - Deals cooling (>7 days no contact): [N] - 🔴 Red alerts: [N] ``` --- ## Weekly Sprint Plan Format ``` 🗓 WEEKLY SPRINT — Week [N] of [Month] — [3-Step Phase] Phase: [SEED / FLIP / HARVEST / RESET] PHASE OBJECTIVE: [What this week is about based on the 3-step cycle] MONDAY — Launch: TUESDAY — Deepen: WEDNESDAY — Accelerate: THURSDAY — Push: FRIDAY — Review & Reset: THIS WEEK'S CLOSE TARGETS (need YES or NO): 1. [Customer] — [Stage] — Closing script: [approach] 2. [Customer] — [Stage] — Closing script: [approach] LEADS TO FLIP (qualify or drop): - [Customer] — [Reason to decide] SEED TARGETS (new outreach, 4+ per day): - [Target profile for this week] FRIDAY SUCCESS CRITERIA: □ [N] deals moved forward at least one stage □ [N] YES or NO decisions obtained □ [N] new leads added to pipeline ``` --- ## Stuck Deal Scripts (by Customer Type) ### Tiger (老虎型) — deal stalled: > "I know you're busy, so I'll be direct: the question on the table is X. If we move forward by [date], you get [specific benefit]. If not, I completely understand. Which is it?" ### Peacock (孔雀型) — deal stalled: > "Hey [name], I was just showing your situation to a colleague and they immediately said this reminded them of [success story]. Made me think — let's get the team together for a quick 20-min call this week. When works for you?" ### Koala (无尾熊型) — deal stalled: > "I wanted to check in and share something that might help ease the decision. Three other companies in your industry have been through exactly this situation — here's what they found. No rush at all — just want to make sure you have everything you need to feel confident." ### Owl (猫头鹰型) — deal stalled: > "I realized I hadn't sent over the complete technical spec and the full pricing breakdown with all variables. Sending that now. Let me know if any number looks different from what you expected — I'd rather address it directly than have any ambiguity." --- ## Integration Notes - Works with any messaging channel (Telegram, WhatsApp, Slack, Discord) - No external API required — all data stored locally - Pairs well with: `gog` skill (Google Calendar integration for scheduling follow-ups) - Compatible with: `memo` (brew) for quick voice-to-text lead logging - Daily cron suggested: `0 8 * * 1-5` for automatic morning brief delivery --- ## Quick Start ```bash # 1. Install skill cp -r sales-rhythm-tracker ~/.openclaw/skills/ # 2. Initialize your pipeline workspace ~/.openclaw/skills/sales-rhythm-tracker/scripts/init-pipeline.sh # 3. Add your first lead (via your messaging app): # "New lead: [Name] at [Company] — [context of how you met]" # 4. Get your first morning brief: # "Morning sales brief" ``` --- *Built on the Alibaba Iron Army (阿里铁军) methodology — the sales system that trained 10,000+ B2B salespeople and generated billions in SMB revenue across China.*

path: README.md
content: # Sales Rhythm Tracker
### B2B Pipeline Manager powered by the Alibaba Iron Army Methodology

[![ClawHub](https://img.shields.io/badge/ClawHub-Business-blue)](https://clawhub.ai)
[![Category](https://img.shields.io/badge/Category-Business-green)](https://clawhub.ai)
[![Version](https://img.shields.io/badge/Version-1.0.0-orange)](https://github.com)
[![License](https://img.shields.io/badge/License-MIT-lightgrey)](LICENSE)

> **"Let 80% of your team achieve 80% of the top performer's results — through system, not talent."**
> — Alibaba Iron Army Core Principle

---

## What Is This?

**Sales Rhythm Tracker** turns your OpenClaw agent into a B2B sales coach that tells you *who to call, when, why, and how* — every single day.

It encodes the **Alibaba Iron Army (阿里铁军)** methodology — the same sales operating system that built Alibaba's B2B direct sales force from zero, trained 10,000+ salespeople, and was later adopted by companies like Meituan, Didi, and hundreds of Chinese startups.

This is not a generic CRM. It's a **sales thinking engine** built on proven frameworks.

---

## Why This Works

Most CRM tools track data. This skill encodes *behavior* — the daily rhythms, weekly sprint cycles, customer psychology frameworks, and closing tactics that separate top performers from average ones.

**The core insight**: Sales performance is 80% rhythm and 20% talent. The Iron Army proved this by making ordinary people extraordinary through discipline and system.

---

## Core Methodologies Encoded

| Framework | What It Does |
|-----------|-------------|
| **Three-Step Sprint (三步一杀)** | 4-week cycle: Seed → Flip → Harvest → Reset. Never lose momentum. |
| **8-Visit Daily Structure** | 4 new + 2 follow-up + 2 closing visits every day. Non-negotiable. |
| **Four Customer Types** | Tiger/Peacock/Koala/Owl — match your approach to their psychology. |
| **Boiling Water Theory (烧水理论)** | Track deal temperature. Never let water cool. |
| **Traffic Light System (红黄绿)** | Green/Yellow/Red status on every lead. Instant risk visibility. |
| **Four-Step Sales Conversation** | Uncover → Present → Address → Close. Every interaction. |
| **Phone Call Protocol** | 3-5 minute calls. One clear objective. Log within 10 minutes. |
| **Lead Scoring (0-100)** | Stage + Recency + Engagement + Deal Size + Time Pressure. |

---

## Installation

```bash
# Step 1: Copy skill to OpenClaw
cp -r sales-rhythm-tracker ~/.openclaw/skills/

# Step 2: Make scripts executable
chmod +x ~/.openclaw/skills/sales-rhythm-tracker/scripts/*.sh

# Step 3: Initialize your pipeline workspace
~/.openclaw/skills/sales-rhythm-tracker/scripts/init-pipeline.sh

# Step 4 (Optional): Set up daily morning brief at 8am
openclaw cron add \
  --name "morning-sales-brief" \
  --schedule "0 8 * * 1-5" \
  --message "Morning sales brief"
```

---

## Quick Start — First 10 Minutes

**1. Add your first lead** (via your messaging app):
```
New lead: John Smith at Acme Manufacturing — met at trade show, interested in reducing procurement costs
```

**2. Get your morning brief**:
```
Morning sales brief
```

**3. Log your first activity**:
```
Log: John Smith — called him, he's interested but wants to loop in his VP — I'll send an exec summary
```

**4. Get a weekly plan**:
```
Weekly sprint plan
```

---

## Daily Commands

| You say... | Agent does... |
|-----------|--------------|
| "Morning sales brief" | Scans pipeline → Scores leads → Gives top 3-5 priorities with scripts |
| "New lead: [Name] at [Company] — [context]" | Creates lead profile, sets stage, schedules first follow-up |
| "Log: [Customer] — [what happened] — [next step]" | Records activity, updates pipeline, recalculates score |
| "How is [customer] doing?" | Full status: stage, score, last contact, temperature, next action |
| "Deal stuck: [customer]" | Diagnoses stall reason + provides exact intervention script by customer type |
| "Pipeline review" | Full health analysis: velocity, risks, cuts, next week guidance |
| "Weekly sprint plan" | Monday plan based on current sprint phase and pipeline state |

---

## Data Structure

All data lives locally in plain markdown files — no cloud, no subscriptions:

```
~/.openclaw/workspace/sales/
├── pipeline.md          ← Your live CRM
├── activity-log.md      ← Every touchpoint logged
├── weekly-sprint.md     ← Current week's plan
└── closed-deals.md      ← Won/Lost + learnings
```

---

## What You Get Each Morning

```
📊 SALES MORNING BRIEF — 2026-02-24 (Monday)
Sprint: Week 1 | Phase: SEED — Maximize outreach. Build your pipeline.

🔥 TOP PRIORITY TODAY:
1. Sarah Chen @ TechBridge — Stage: Closing — Score: 88
   Last contact: 2 days ago. Sent proposal Thursday.
   → She's a Koala. Don't rush. Send: "I wanted to make sure you have
     everything you need to feel confident about this decision..."

2. David Park @ Sunrise Mfg — Stage: Negotiation — Score: 76
   Last contact: 5 days ago. 🟡 Rhythm slipping.
   → He's a Tiger. Be direct: "David, where are we on the final number?"

✅ MAINTAIN RHYTHM:
3. Wei Lin @ FastGrow Ltd — Stage: Qualified — Score: 61
   Last contact: 3 days ago. Demo scheduled Friday.
   → Prep 3 ROI data points before the demo. She's an Owl.

⚡ SEED TODAY (4 new contacts):
Target: Manufacturing companies, 50-200 employees, procurement pain

📈 PIPELINE SNAPSHOT:
• Active leads: 8 | Closing this week: 2 | 🔴 Red alerts: 1
• Deal cooling: Marcus @ RetailCo (12 days no contact — intervene today)
```

---

## Proven Results: The Iron Army Track Record

The Alibaba Iron Army methodology this skill encodes:
- Trained **10,000+** B2B salespeople in China
- Achieved **80%+ quota attainment** across the team (not just top performers)
- Methodology was adopted by **Meituan, Didi, and 100+ Chinese startups**
- Core principle proven: systematic rhythm beats individual talent
- Average cycle length: **21 days** from first contact to close (SMB B2B)

---

## Pairs Well With

- [`gog`](https://clawhub.ai) — Google Calendar integration for scheduling follow-ups
- [`memo`](https://formulae.brew.sh/formula/memo) — Voice-to-text lead logging
- [`remind`](https://formulae.brew.sh/formula/remind) — Time-based follow-up reminders

---

## Philosophy

> *"Manage the process, not just the outcome. The outcome is a result of the process."*

Most salespeople track what happened. The Iron Army tracks what *should* happen next — and ensures it does. This skill brings that discipline to your OpenClaw agent.

---

## License

MIT License — Free to use, modify, and distribute.

---

*Built on the Alibaba Iron Army (阿里铁军) methodology.*
*If this skill helps you close deals, consider leaving a ⭐ on ClawHub.*


path: scripts/add-lead.sh
content: #!/bin/bash
# Sales Rhythm Tracker — Add New Lead
# Usage: add-lead.sh "Name" "Company" "stage" "deal_size" "notes"
# Called by OpenClaw agent when user says "New lead: ..."

SALES_DIR="${HOME}/.openclaw/workspace/sales"
PIPELINE="$SALES_DIR/pipeline.md"
TODAY=$(date +"%Y-%m-%d")

NAME="${1:-Unknown}"
COMPANY="${2:-Unknown Company}"
STAGE="${3:-connected}"
DEAL_SIZE="${4:-TBD}"
NOTES="${5:-First contact. Personality type unknown — determine on next call.}"

if [ ! -f "$PIPELINE" ]; then
  echo "❌ Pipeline not initialized. Run: init-pipeline.sh first"
  exit 1
fi

# Append new lead to pipeline
cat >> "$PIPELINE" << EOF

### ${NAME} @ ${COMPANY}
- **Stage**: ${STAGE}
- **Type**: Unknown — detect on next interaction (look for Tiger/Peacock/Koala/Owl signals)
- **Score**: 45
- **Status**: 🟢 Green
- **Deal Size**: ${DEAL_SIZE}
- **Last Contact**: ${TODAY}
- **Next Action**: Schedule discovery call within 48 hours — prepare 3 open questions about their pain
- **Key Pain**: To be discovered
- **Notes**: ${NOTES}

EOF

echo "✅ Lead added: ${NAME} @ ${COMPANY}"
echo "📌 Stage: ${STAGE}"
echo "📅 Last Contact: ${TODAY}"
echo ""
echo "💡 Next step: Prepare your discovery call using the Four-Step method:"
echo "   1. 挖需求: 'What's the biggest challenge you're dealing with in [their area] right now?'"
echo "   2. 抛产品: Match your solution to their specific answer — not your script"
echo "   3. 解问题: Address the real objection (not the stated one)"
echo "   4. 提成交: Ask for the next concrete commitment"


path: scripts/init-pipeline.sh
content: #!/bin/bash
# Sales Rhythm Tracker — Initialize Pipeline Workspace
# Run once to set up your local CRM files

SALES_DIR="${HOME}/.openclaw/workspace/sales"

echo "🚀 Initializing Sales Rhythm Tracker workspace..."

mkdir -p "$SALES_DIR"

# Create pipeline.md if it doesn't exist
if [ ! -f "$SALES_DIR/pipeline.md" ]; then
cat > "$SALES_DIR/pipeline.md" << 'EOF'
# Sales Pipeline
> Managed by Sales Rhythm Tracker | Alibaba Iron Army Methodology

---

## Active Leads

<!-- Each lead follows this format:

### [Lead Name] @ [Company]
- **Stage**: [prospect/connected/qualified/presented/proposal/negotiation/closing]
- **Type**: [Tiger/Peacock/Koala/Owl/Unknown]
- **Score**: [0-100]
- **Status**: [🟢 Green / 🟡 Yellow / 🔴 Red]
- **Deal Size**: [estimated value]
- **Last Contact**: [YYYY-MM-DD]
- **Next Action**: [what to do + by when]
- **Key Pain**: [their main problem you're solving]
- **Notes**: [context, objections, anything relevant]

-->

EOF
echo "✅ Created pipeline.md"
fi

# Create activity-log.md if it doesn't exist
if [ ! -f "$SALES_DIR/activity-log.md" ]; then
cat > "$SALES_DIR/activity-log.md" << 'EOF'
# Sales Activity Log
> Every interaction matters. Log it within 10 minutes.

---

<!-- Format:
## [YYYY-MM-DD] — [Customer Name] @ [Company]
- **Activity**: [call/email/meeting/demo/proposal/other]
- **Duration**: [X min]
- **What happened**: [brief summary]
- **Customer reaction**: [positive/neutral/negative/no response]
- **Objections raised**: [none / list them]
- **Next step**: [specific action + date]
- **Temperature**: [hotter/same/cooler]
-->

EOF
echo "✅ Created activity-log.md"
fi

# Create weekly-sprint.md
if [ ! -f "$SALES_DIR/weekly-sprint.md" ]; then
cat > "$SALES_DIR/weekly-sprint.md" << 'EOF'
# Weekly Sales Sprint
> Updated every Monday morning

---

EOF
echo "✅ Created weekly-sprint.md"
fi

# Create closed-deals.md
if [ ! -f "$SALES_DIR/closed-deals.md" ]; then
cat > "$SALES_DIR/closed-deals.md" << 'EOF'
# Closed Deals
> Won and lost deals — your most valuable data

---

## Won Deals

<!-- Format:
### [Customer] @ [Company] — WON [YYYY-MM-DD]
- **Value**: [amount]
- **Cycle length**: [X days from first contact to close]
- **Customer type**: [Tiger/Peacock/Koala/Owl]
- **What worked**: [key factor that closed the deal]
-->

---

## Lost Deals

<!-- Format:
### [Customer] @ [Company] — LOST [YYYY-MM-DD]
- **Stage when lost**: [stage name]
- **Customer type**: [Tiger/Peacock/Koala/Owl]
- **Lost reason**: [price/competition/no budget/timing/no decision]
- **What I'd do differently**: [honest reflection]
- **Reactivation date**: [when to try again, if ever]
-->

EOF
echo "✅ Created closed-deals.md"
fi

echo ""
echo "✅ Sales Rhythm Tracker workspace ready at: $SALES_DIR"
echo ""
echo "Next steps:"
echo "  1. Add your first lead via your OpenClaw agent:"
echo "     'New lead: [Name] at [Company] — [context]'"
echo "  2. Get your first morning brief:"
echo "     'Morning sales brief'"
echo "  3. Set up daily automation (optional):"
echo "     openclaw cron add --name morning-sales --schedule '0 8 * * 1-5' --message 'Morning sales brief'"


path: scripts/log-activity.sh
content: #!/bin/bash
# Sales Rhythm Tracker — Log Sales Activity
# Usage: log-activity.sh "Customer" "Company" "activity_type" "summary" "next_step"
# Called by OpenClaw agent when user says "Log: ..."

SALES_DIR="${HOME}/.openclaw/workspace/sales"
ACTIVITY_LOG="$SALES_DIR/activity-log.md"
PIPELINE="$SALES_DIR/pipeline.md"
TODAY=$(date +"%Y-%m-%d")
TIME=$(date +"%H:%M")

CUSTOMER="${1:-Unknown}"
COMPANY="${2:-Unknown}"
ACTIVITY="${3:-call}"
SUMMARY="${4:-No summary provided}"
NEXT_STEP="${5:-Follow up within 3 days}"

if [ ! -f "$ACTIVITY_LOG" ]; then
  echo "❌ Activity log not found. Run: init-pipeline.sh first"
  exit 1
fi

# Append activity to log
cat >> "$ACTIVITY_LOG" << EOF

## ${TODAY} ${TIME} — ${CUSTOMER} @ ${COMPANY}
- **Activity**: ${ACTIVITY}
- **Summary**: ${SUMMARY}
- **Next step**: ${NEXT_STEP}
- **Logged**: $(date)

EOF

echo "✅ Activity logged: ${CUSTOMER} @ ${COMPANY}"
echo "📝 Activity type: ${ACTIVITY}"
echo "📅 Date: ${TODAY} ${TIME}"
echo ""
echo "💡 AGENT INSTRUCTIONS — After logging, please:"
echo "1. Find ${CUSTOMER} @ ${COMPANY} in pipeline.md"
echo "2. Update their Last Contact to ${TODAY}"
echo "3. Update their Next Action to: ${NEXT_STEP}"
echo "4. Reassess their temperature (hotter/same/cooler) based on: ${SUMMARY}"
echo "5. Update Score and Status (🟢/🟡/🔴) accordingly"
echo "6. If stage should advance, update it"
echo "7. If this was a close attempt — record outcome"
echo ""
echo "📞 PHONE CALL REMINDER (if this was a call):"
echo "   • Did the call stay under 6 minutes?"
echo "   • Did you achieve your ONE objective for the call?"
echo "   • Did you ask for a specific next commitment?"


path: scripts/morning-brief.sh
content: #!/bin/bash
# Sales Rhythm Tracker — Morning Brief Generator
# Reads pipeline.md and outputs a prioritized action plan
# Called by OpenClaw agent when user asks for morning brief

SALES_DIR="${HOME}/.openclaw/workspace/sales"
PIPELINE="$SALES_DIR/pipeline.md"
TODAY=$(date +"%Y-%m-%d")
DAY_OF_WEEK=$(date +"%A")

if [ ! -f "$PIPELINE" ]; then
  echo "❌ Pipeline not initialized. Run: init-pipeline.sh first"
  exit 1
fi

# Determine sprint week (cycles reset on 1st of each month)
DAY_OF_MONTH=$(date +"%d")
if [ "$DAY_OF_MONTH" -le 7 ]; then
  SPRINT_WEEK=1
  SPRINT_PHASE="SEED (播种) — Maximize outreach volume today. Target 4+ new contacts."
elif [ "$DAY_OF_MONTH" -le 14 ]; then
  SPRINT_WEEK=2
  SPRINT_PHASE="FLIP (翻牌) — Qualify ruthlessly. Identify your top 30%. Cut the rest."
elif [ "$DAY_OF_MONTH" -le 21 ]; then
  SPRINT_WEEK=3
  SPRINT_PHASE="HARVEST (采果) — Push every qualified lead to YES or NO. No gray zones."
else
  SPRINT_WEEK=4
  SPRINT_PHASE="RESET (机动) — Onboard wins, collect payment, seed next cycle."
fi

echo "============================================"
echo "📊 SALES MORNING BRIEF — $TODAY ($DAY_OF_WEEK)"
echo "Sprint: Week $SPRINT_WEEK | Phase: $SPRINT_PHASE"
echo "============================================"
echo ""
echo "📌 DAILY TARGET (8-Visit Structure):"
echo "   • 4 × New customer outreach (seed)"
echo "   • 2 × Follow-up contacts (nurture)"
echo "   • 2 × Closing push (harvest)"
echo ""
echo "---"
echo "📋 PIPELINE DATA:"
echo ""
cat "$PIPELINE"
echo ""
echo "---"
echo ""
echo "💡 AGENT INSTRUCTIONS:"
echo "Based on the pipeline above, please:"
echo "1. Identify all leads with Last Contact > 7 days → flag 🔴 Red"
echo "2. Identify leads in 'closing' or 'negotiation' stage → top priority"
echo "3. For each priority lead, check their Type (Tiger/Peacock/Koala/Owl)"
echo "   and suggest the right approach script"
echo "4. List top 3-5 actions for today, ordered by urgency score"
echo "5. Identify which leads to SEED today (new outreach)"
echo "6. End with: total active leads, deals at risk, and one this-week close target"
echo ""
echo "Format output as the morning brief structure defined in SKILL.md"


path: scripts/pipeline-health.sh
content: #!/bin/bash
# Sales Rhythm Tracker — Pipeline Health Check
# Reads pipeline and outputs health analysis with recommendations
# Best used on Fridays or when user asks "pipeline review"

SALES_DIR="${HOME}/.openclaw/workspace/sales"
PIPELINE="$SALES_DIR/pipeline.md"
ACTIVITY_LOG="$SALES_DIR/activity-log.md"
TODAY=$(date +"%Y-%m-%d")

if [ ! -f "$PIPELINE" ]; then
  echo "❌ Pipeline not initialized. Run: init-pipeline.sh first"
  exit 1
fi

echo "============================================"
echo "🏥 PIPELINE HEALTH REVIEW — ${TODAY}"
echo "============================================"
echo ""
echo "📋 FULL PIPELINE:"
cat "$PIPELINE"
echo ""
echo "---"
echo ""
echo "📋 RECENT ACTIVITY (last 14 days):"
cat "$ACTIVITY_LOG" | tail -100
echo ""
echo "---"
echo ""
echo "💡 AGENT INSTRUCTIONS — Perform full health analysis:"
echo ""
echo "STEP 1 — TEMPERATURE CHECK"
echo "For each active lead, calculate days since Last Contact."
echo "  • >14 days no contact = 🔴 Red (cooling fast)"
echo "  • 8-14 days = 🟡 Yellow (needs attention)"
echo "  • <7 days = 🟢 Green (healthy rhythm)"
echo ""
echo "STEP 2 — STAGE VELOCITY ANALYSIS"
echo "Flag any lead stuck in the same stage past healthy duration:"
echo "  • connected > 3 days without moving = flag"
echo "  • qualified > 7 days = flag"
echo "  • proposal > 10 days = flag"
echo "  • negotiation > 14 days = flag"
echo "  • closing > 5 days = URGENT flag"
echo ""
echo "STEP 3 — BOILING WATER RISK ASSESSMENT"
echo "Identify leads where momentum is at risk of cooling completely."
echo "These need intervention THIS WEEK or should be classified as lost."
echo ""
echo "STEP 4 — FLIP DECISIONS (翻牌)"
echo "Identify leads that should be cut from active pipeline:"
echo "  • No response after 3+ contacts"
echo "  • Confirmed no budget"
echo "  • Stuck >21 days with no movement"
echo "Moving these to 'inactive' clears mental bandwidth for live opportunities."
echo ""
echo "STEP 5 — PIPELINE METRICS SUMMARY"
echo "Calculate and report:"
echo "  • Total active leads"
echo "  • Leads per stage (show as mini funnel)"
echo "  • Overall pipeline conversion rate estimate"
echo "  • Expected closes in next 2 weeks"
echo "  • Red flags count"
echo ""
echo "STEP 6 — NEXT WEEK RECOMMENDATIONS"
echo "Based on the analysis:"
echo "  • What's the sprint phase next week? (Seed/Flip/Harvest/Reset)"
echo "  • Which 3 leads are the top priorities?"
echo "  • Which leads should be cut?"
echo "  • How many new leads need to be added to maintain healthy pipeline?"
echo ""
echo "Format as the Pipeline Health Report structure."
echo "End with one clear directive: the single most important action for Monday morning."


path: scripts/weekly-sprint.sh
content: #!/bin/bash
# Sales Rhythm Tracker — Weekly Sprint Planner
# Generates a full weekly plan using the Three-Step Sprint Cycle
# Best run every Monday morning

SALES_DIR="${HOME}/.openclaw/workspace/sales"
PIPELINE="$SALES_DIR/pipeline.md"
SPRINT_FILE="$SALES_DIR/weekly-sprint.md"
TODAY=$(date +"%Y-%m-%d")
WEEK_NUM=$(date +"%V")

# Determine sprint phase
DAY_OF_MONTH=$(date +"%d")
if [ "$DAY_OF_MONTH" -le 7 ]; then
  SPRINT_WEEK=1; PHASE="SEED (播种)"; PHASE_GOAL="Maximize volume. Build a full pipeline for the month."
elif [ "$DAY_OF_MONTH" -le 14 ]; then
  SPRINT_WEEK=2; PHASE="FLIP (翻牌)"; PHASE_GOAL="Qualify hard. Keep the top 30%. Release the rest."
elif [ "$DAY_OF_MONTH" -le 21 ]; then
  SPRINT_WEEK=3; PHASE="HARVEST (采果)"; PHASE_GOAL="Close sprint. Every lead needs a YES or NO by Friday."
else
  SPRINT_WEEK=4; PHASE="RESET (机动)"; PHASE_GOAL="Onboard wins, collect payment, plan next month."
fi

echo "============================================"
echo "🗓 WEEKLY SPRINT PLANNER"
echo "Week $WEEK_NUM | Sprint Week $SPRINT_WEEK | $TODAY"
echo "Phase: $PHASE"
echo "Goal: $PHASE_GOAL"
echo "============================================"
echo ""
echo "📋 CURRENT PIPELINE:"
cat "$PIPELINE"
echo ""
echo "---"
echo ""
echo "💡 AGENT INSTRUCTIONS — Generate this week's sprint plan:"
echo ""
echo "Based on the pipeline above and the current phase ($PHASE), create:"
echo ""
echo "1. WEEK OBJECTIVE"
echo "   One sentence capturing what winning this week looks like."
echo ""
echo "2. DAILY ACTION PLAN (Monday-Friday)"
echo "   For each day, list:"
echo "   - Primary focus (which leads to advance)"
echo "   - New outreach targets (how many, what sector/profile)"
echo "   - Specific commitments to get from key leads"
echo ""
echo "3. CLOSE TARGETS THIS WEEK"
echo "   List all leads in 'closing' or 'negotiation' stage."
echo "   For each: name, stage, customer type, and the exact closing approach to use."
echo "   (Match approach to Tiger/Peacock/Koala/Owl type)"
echo ""
echo "4. FLIP CANDIDATES"
echo "   Leads that need a YES or NO decision this week."
echo "   These are wasting space in the pipeline if not resolved."
echo ""
echo "5. SEED TARGETS"
echo "   Profile of the 4+ new contacts to reach each day."
echo "   What sector? What pain point? What opening line?"
echo ""
echo "6. FRIDAY SUCCESS CRITERIA"
echo "   Exactly 3-4 measurable outcomes that define a successful week."
echo "   (Examples: 2 deals advanced to next stage, 1 close, 20 new contacts seeded)"
echo ""
echo "7. WEEKLY MANTRA"
echo "   One motivating principle from the Iron Army for this week's phase."
echo ""
echo "Write the plan to: $SPRINT_FILE"
echo "Format clearly with day headers and bullet points."


path: templates/sample-pipeline.md
content: # Sales Pipeline — SAMPLE (Delete before using)
> This is an example showing how to structure your pipeline entries.
> Replace with your real leads after running init-pipeline.sh

---

## Active Leads

### Sarah Chen @ TechBridge Solutions
- **Stage**: closing
- **Type**: Koala (patient, risk-averse, needs reassurance)
- **Score**: 88
- **Status**: 🟢 Green
- **Deal Size**: $8,500
- **Last Contact**: 2026-02-22
- **Next Action**: Follow up on proposal — reassure with case study — get YES/NO by Feb 26
- **Key Pain**: Current supplier is unreliable, causing production delays
- **Notes**: Very thorough decision-maker. Needs to feel 100% safe before committing.
  Her boss (Tiger) will sign off, but she recommends. Win her heart first.
  Sent proposal Feb 20. She said "looks good" but needs to review with team.

---

### David Park @ Sunrise Manufacturing
- **Stage**: negotiation
- **Type**: Tiger (direct, impatient, results-focused)
- **Score**: 76
- **Status**: 🟡 Yellow (5 days since last contact — rhythm slipping)
- **Deal Size**: $22,000
- **Last Contact**: 2026-02-19
- **Next Action**: Direct call TODAY — ask "where are we on the final number?" — max 5 min
- **Key Pain**: Manual procurement process costing 3 hrs/day per buyer (6 buyers)
- **Notes**: He ran the numbers himself: $180K/year in labor cost just for procurement.
  Our solution pays back in 4 months. He knows the ROI — the holdup is IT approval.
  Don't over-explain. He hates it. One direct question per call.

---

### Wei Lin @ FastGrow Retail
- **Stage**: qualified
- **Type**: Owl (analytical, needs data, asks many questions)
- **Score**: 61
- **Status**: 🟢 Green
- **Deal Size**: $5,200
- **Last Contact**: 2026-02-21
- **Next Action**: Demo scheduled Feb 27 — prepare complete spec sheet + 3 competitor comparison tables
- **Key Pain**: Can't reconcile inventory data across 5 warehouse locations
- **Notes**: Asked 14 questions in the discovery call. That's a good sign — Owls who
  aren't interested don't bother asking. She will ask for a detailed spec before
  committing. Have the data ready before she asks.

---

### Marcus Chen @ RetailCo Group
- **Stage**: presented
- **Type**: Peacock (social, relationship-driven, status-conscious)
- **Score**: 34
- **Status**: 🔴 Red (12 days since last contact — URGENT)
- **Deal Size**: $15,000
- **Last Contact**: 2026-02-12
- **Next Action**: URGENT — send a warm re-engagement today before water goes cold
- **Key Pain**: Wants to be the "first in their industry" to use AI for procurement
- **Notes**: Demo went well, he was excited. Then went quiet. Classic Peacock pattern —
  got distracted by something shiny. Re-engage with a story about a competitor
  doing something similar. His FOMO is the lever.
  Message: "Marcus — I was just thinking about you. One of your industry
  competitors just moved forward with something very similar to what we discussed.
  Thought you'd want to know. 15 mins this week?"

---

### Emma Zhang @ BlueSky Trading
- **Stage**: connected
- **Type**: Unknown — first call next week
- **Score**: 45
- **Status**: 🟢 Green
- **Deal Size**: TBD
- **Last Contact**: 2026-02-23
- **Next Action**: Discovery call Feb 28 — focus on 挖需求 (uncover pain), 70% listen
- **Key Pain**: Unknown — she mentioned "scaling issues" but didn't elaborate
- **Notes**: Warm intro from a mutual contact. She was receptive on first call.
  Next call: ask 3 open questions, shut up and listen. Don't pitch until
  pain is clearly articulated.
  Personality type detection: observe how she opens the call.
  Quick and direct = Tiger. Warm and chatty = Peacock. Cautious = Koala. Detailed = Owl.


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