Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

customer-lifetime-value客户终生价值

Agent Skill

customer-lifetime-value 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

442

周安装

19

GitHub Stars

19

下载量

155
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:customer-lifetime-value(客户终生价值)
来源仓库:https://github.com/finsilabs/awesome-ecommerce-skills
仓库路径:skills/customer-lifetime-value
安装命令:
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill customer-lifetime-value
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill customer-lifetime-value

简介

customer-lifetime-value 计算客户在整个关系周期内的预期净收益,辅助商业决策。

  • 适用于设定获客成本目标、评估渠道回报及制定分层会员策略的场景。
  • 区分历史 CLV 与预测模型,推荐对接专业分析工具处理大规模数据。
  • 结果依赖交易频率、平均订单价值等核心指标的历史准确性。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Customer Lifetime Value

Overview

Customer Lifetime Value (CLV) tells you the total net revenue expected from a customer over their relationship with your store, enabling smarter decisions on acquisition spend, retention investment, and customer tier management. Most platforms calculate historical CLV (total spent to date) natively. For predictive CLV and churn risk scoring, use a dedicated analytics app (Klaviyo, Metorik, Triple Whale) or build a custom model for stores with 10k+ customers.

When to Use This Skill

  • When setting CAC targets for acquisition channels based on expected return
  • When building a VIP tier program that needs a quantitative threshold
  • When predicting which customers are likely to churn and triggering win-back automation
  • When calculating the ROI of retention programs (loyalty points, VIP benefits)
  • When segmenting customers by predicted future value rather than historical spend alone

Core Instructions

Step 1: Determine platform and choose the right CLV tool

PlatformHistorical CLVPredictive CLV
ShopifyBuilt-in: Admin → Analytics → Customers (shows lifetime spend)Triple Whale, Lifetimely, or Klaviyo for predictive scoring
WooCommerceMetorik or WooCommerce Analytics → Customers reportMetorik Pro for churn prediction; Klaviyo integration for CLV-based flows
BigCommerceBuilt-in customer analytics; Google Analytics 4 for cohort analysisKlaviyo or Metorik for predictive CLV
Custom / HeadlessBuild SQL queries against your order databaseBuild a parametric or BG/NBD model against your historical data

Step 2: Access and track historical CLV

Historical CLV is the sum of all revenue from a customer. Platforms show this natively.

Shopify

  1. Go to Admin → Analytics → Reports → Customers over time — shows total customers, orders, and revenue by cohort
  2. Go to Admin → Customers → [Customer] — each customer profile shows total spent, order count, and last order date
  3. For bulk export: go to Customers → Export — the CSV includes Total Spent and Number of Orders per customer

More advanced CLV reporting:

  • Install Lifetimely from the App Store — provides cohort-based LTV curves, payback period by acquisition channel, and predicted future spend
  • Install Triple Whale — includes CLV by acquisition source, cohort analysis, and attribution modeling

WooCommerce

  1. Go to WooCommerce → Analytics → Customers — shows lifetime value, order count, and average order value per customer
  2. Sort by Lifetime value descending to see your top customers
  3. Filter by date range to see CLV for specific acquisition cohorts

Metorik for deeper analytics:

  • Install Metorik (connects via WooCommerce REST API)
  • Metorik's customer dashboard shows CLV distributions, cohort retention, and automatically flags at-risk customers
  • Metorik Pro adds churn probability scoring and automated win-back email triggers

BigCommerce

  1. Go to Analytics → Customers for a summary of customer spending
  2. Individual customer profiles show total orders and lifetime spend
  3. For cohort analysis: connect Google Analytics 4 and use the User Lifetime reports

Step 3: Set up CLV-based customer segments

Once you can measure CLV, create segments to target different value tiers with different messaging.

Shopify + Klaviyo

  1. In Klaviyo, go to Lists & Segments → Create Segment
  2. Create a "VIP Customers" segment: Customer → Predicted CLV is greater than $500 (Klaviyo calculates predicted CLV automatically for Shopify stores)
  3. Create an "At Risk - High Value" segment: Customer → Predicted CLV > $200 AND Last order date is more than 90 days ago
  4. Use these segments as audiences for targeted email flows

Klaviyo's predictive analytics (available on paid plans):

  • Klaviyo shows Predicted CLV, Churn Risk, and Predicted Next Order Date per profile
  • Find these under Analytics → Predictive Analytics or on individual customer profiles
  • Use these predictions as segment filters without any custom code

WooCommerce + Klaviyo

  1. Install Klaviyo for WooCommerce from WordPress.org
  2. Klaviyo syncs customer purchase history automatically
  3. Create the same CLV-based segments as described above

Step 4: Automate retention based on CLV and churn risk

Once segments are defined, create automated flows for each tier.

Win-back flow for high-value at-risk customers:

Klaviyo (all platforms):

  1. Go to Flows → Create Flow → Win-Back
  2. Set trigger: customer enters the "At Risk - High Value" segment
  3. Configure the sequence:

- Day 0: personalized email — "We miss you" with product recommendations based on purchase history - Day 7: email with a small incentive (free shipping or 10% off) - Day 14: final email from the "founder" or customer success team

  1. Stop the flow if the customer makes a purchase (add a flow filter: "Ordered zero times since starting this flow")

VIP tier recognition:

  1. Create a VIP segment (CLV > $500 or 5+ orders)
  2. When a customer enters the segment, send a personalized "You're now a VIP" email with exclusive benefits
  3. On Shopify: tag the customer with vip automatically using Shopify Flow (Plus) or a tagging app; use the tag to show VIP-specific content on the storefront

Custom / Headless

For stores building their own CLV calculations:

// lib/clv.ts

// Simple parametric CLV prediction — practical for most stores
export function calculatePredictedCLV(inputs: {
  avgOrderValue: number;
  avgOrderFrequencyPerYear: number;
  avgCustomerLifespanYears: number;
  grossMarginRate: number;
}): number {
  const { avgOrderValue, avgOrderFrequencyPerYear, avgCustomerLifespanYears, grossMarginRate } = inputs;
  return avgOrderValue * avgOrderFrequencyPerYear * avgCustomerLifespanYears * grossMarginRate;
}

// Per-customer prediction from their actual order history
export async function predictCustomerCLV(customerId: string, projectionYears = 2): Promise<number> {
  const orders = await db.orders.findMany({
    where: { customerId, status: { notIn: ['cancelled', 'refunded'] } },
    orderBy: { createdAt: 'asc' },
  });
  if (orders.length < 2) return 0;  // Not enough history

  const dates = orders.map(o => o.createdAt.getTime());
  const tenureDays = (dates[dates.length - 1] - dates[0]) / 86400000;
  const avgIntervalDays = tenureDays / (orders.length - 1);
  const purchasesPerYear = 365 / avgIntervalDays;
  const aov = orders.reduce((sum, o) => sum + o.subtotalCents / 100, 0) / orders.length;

  // Reduce projection for customers who haven't ordered recently
  const daysSinceLast = (Date.now() - dates[dates.length - 1]) / 86400000;
  const effectiveYears = daysSinceLast < 90 ? projectionYears : projectionYears * 0.5;

  return aov * purchasesPerYear * effectiveYears * 0.50;  // 50% gross margin
}

// Churn probability based on recency vs. typical purchase cadence
export async function calculateChurnProbability(customerId: string): Promise<number> {
  const orders = await db.orders.findMany({
    where: { customerId, status: { notIn: ['cancelled', 'refunded'] } },
    orderBy: { createdAt: 'desc' },
  });

  if (orders.length === 0) return 0.95;
  if (orders.length === 1) return 0.65;

  const daysSinceLast = (Date.now() - orders[0].createdAt.getTime()) / 86400000;
  const avgInterval = orders.slice(0, -1).reduce((sum, o, i) =>
    sum + (o.createdAt.getTime() - orders[i + 1].createdAt.getTime()) / 86400000, 0) / (orders.length - 1);

  // Sigmoid: churn probability rises as recency exceeds 2× typical interval
  const recencyRatio = daysSinceLast / avgInterval;
  return Math.min(0.99, Math.max(0.01, 1 / (1 + Math.exp(-2 * (recencyRatio - 2)))));
}

// Nightly job: update CLV scores and trigger win-back automation
export async function runChurnPreventionNightly() {
  const activeCustomers = await db.customers.findMany({ where: { orderCount: { gte: 2 } } });

  for (const customer of activeCustomers) {
    const [churnProbability, predictedCLV] = await Promise.all([
      calculateChurnProbability(customer.id),
      predictCustomerCLV(customer.id),
    ]);

    await db.customers.update({ where: { id: customer.id }, data: { churnProbability, predictedCLV } });

    // High-value, high-churn-risk: trigger win-back
    if (churnProbability > 0.70 && predictedCLV > 200) {
      const alreadyTriggered = await db.winBackTriggers.findFirst({
        where: { customerId: customer.id, createdAt: { gte: new Date(Date.now() - 90 * 86400000) } },
      });
      if (!alreadyTriggered) {
        await klaviyo.triggerFlow(customer.email, 'win-back-high-value');
        await db.winBackTriggers.create({ data: { customerId: customer.id } });
      }
    }
  }
}

For stores with 100k+ customers: Use the BG/NBD probabilistic model (Python lifetimes library) for significantly more accurate predictions than the parametric approach:

from lifetimes import BetaGeoFitter, GammaGammaFitter
from lifetimes.utils import summary_data_from_transaction_data

# Build RFM summary and fit BG/NBD model
rfm = summary_data_from_transaction_data(orders_df, 'customer_id', 'created_at', 'subtotal_cents')
bgf = BetaGeoFitter(penalizer_coef=0.001)
bgf.fit(rfm['frequency'], rfm['recency'], rfm['T'])

ggf = GammaGammaFitter(penalizer_coef=0.001)
ggf.fit(rfm[rfm['frequency'] > 0]['frequency'], rfm[rfm['frequency'] > 0]['monetary_value'])

rfm['predicted_clv_12mo'] = ggf.customer_lifetime_value(bgf, rfm['frequency'], rfm['recency'], rfm['T'], rfm['monetary_value'], time=12, discount_rate=0.01)

Best Practices

  • Use Klaviyo's predictive CLV for Shopify/WooCommerce before building anything custom — their model is well-calibrated and works out of the box
  • Refresh CLV scores weekly at minimum — customer behavior changes; stale scores lead to mistargeted retention campaigns
  • Separate predicted CLV from historical spend in your segments — they answer different questions: historical shows past value, predicted shows where to invest
  • Set CAC ceilings per acquisition channel based on CLV — if average CLV from Google Ads customers is $80 at 50% margin, your maximum sustainable CAC is $40
  • Calibrate churn probability against actual outcomes — compare predictions from 6 months ago to who actually churned; adjust thresholds if the model is over- or under-predicting

Common Pitfalls

ProblemSolution
CLV model inflated by a few very large ordersUse median order value rather than mean AOV for parametric models; single outlier orders skew the mean significantly
Win-back emails trigger for customers who took a vacationSet a minimum "days since last purchase" threshold of 60+ days before triggering win-back; short gaps are normal, not churn signals
CLV calculation includes cancelled ordersAlways filter status NOT IN ('cancelled', 'refunded') — cancelled orders overstate revenue
Predicted CLV lower than historical for loyal customersIn BG/NBD, verify that the tenure variable (T) is measured from first purchase, not account creation date

Related Skills

  • @customer-segmentation
  • @referral-program
  • @personalization-engine

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.19%
按下载量换算55

Claude

28.48%
按下载量换算44

Cursor

18.4%
按下载量换算29

Gemini CLI

8.92%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills