Logo de Customer Analytics

Customer Analytics

Organização
SkillMedev
customer-analytics

Turns transaction data into cohort retention, lifetime value, RFM segments, and churn predictions tied to concrete actions. Use when someone asks "what's our customer LTV", "build a cohort retention table", "which customers are about to churn", "how do repeat purchase rates look by cohort", or "who should we target with a win-back offer". Do NOT use for event-level product usage and feature adoption analysis - use product-analytics instead; for defining market segments for positioning and messaging - use segmentation-strategy instead; for designing the interventions that reduce churn once at-risk customers are identified - use churn-reduction instead; for step-by-step conversion drop-off - use funnel-analysis instead.

Visão geral

Publicado porSkillMedev
Repositórioskills
Nome da habilidadecustomer-analytics
Estrelas
25
Forks
3
Arquivos incluídos
Somente instruções
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    Habilidades de IA são Markdown simples, não código específico de um provedor, por isso funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Completa em si mesma

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por SkillMedev no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Customer Analytics no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL da pasta da habilidade exibida abaixo e confirme.
    https://github.com/SkillMedev/skills/tree/main/skills/customer-analytics
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL GitHub, depois cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SkillMedev/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/customer-analytics .claude/skills/customer-analytics
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Customer Analytics em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Customer Analytics automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Customer Analytics não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Customer Analytics

Transaction logs already contain the answers to "who stays, who spends, who is about to leave" - the failure mode is computing them wrong: cohort charts that include the current incomplete month, LTV built on revenue instead of margin, and churn models validated on shuffled data that collapse in production. This skill produces cohort, LTV, and churn outputs a finance or lifecycle team can act on directly.

Operating procedure

Work the steps in order: cohorts establish the retention reality that LTV math depends on, and churn modeling is only worth doing after the churn definition survives the cohort view.

Step 1: Gather inputs

Collect these first; apply defaults and label guesses as guesses.

  1. Transaction table: customer_id, order_date, revenue, and cost or margin if available.
  2. Business model: contractual (subscription) or non-contractual (e-commerce/retail). This decides the LTV method in Step 3.
  3. Cohort granularity. Default: monthly cohorts when the natural purchase cycle is 2 weeks or longer; weekly cohorts for high-frequency products (food delivery, media). Granularity finer than the purchase cycle produces jagged, unreadable triangles.
  4. Gross margin, as a fraction. If unknown, get finance's blended number and mark it a guess - never silently assume 100%.
  5. Churn definition. Contractual: subscription cancelled or lapsed. Non-contractual default: no purchase in 90 days, but check it against the observed inter-purchase distribution - set the cutoff near the 90th percentile of gaps between orders, not at a round number chosen by habit.

Step 2: Build cohorts and retention curves

Group customers by acquisition period and track activity across subsequent periods:

sql
with first_order as (
  select customer_id,
         date_trunc('month', min(order_date)) as cohort_month
  from orders group by 1
),
activity as (
  select o.customer_id,
         f.cohort_month,
         date_trunc('month', o.order_date) as active_month
  from orders o join first_order f using (customer_id)
)
select cohort_month,
       date_diff('month', cohort_month, active_month) as month_number,
       count(distinct customer_id) as active_customers
from activity group by 1, 2 order by 1, 2;

Render as a retention triangle: cohorts on rows, months-since-acquisition on columns, each cell as a percent of cohort size. Always exclude the most recent incomplete period - it reads as a retention cliff that is not there. Retention usually drops fast then flattens; the flattening level is the durable base, and it is the single most important number on the chart. Reference points: e-commerce cohorts commonly flatten with 20-30% of customers making a repeat purchase; healthy subscription monthly logo churn runs under 5% for SMB, under 2% for mid-market, under 1% for enterprise. A cohort curve that never flattens means the product has no retained core - fix that before spending on acquisition.

Step 3: Lifetime value

Two approaches; label which one each number came from.

  1. Historical: sum realized margin per customer to date. Ground truth, but backward-looking.
  2. Predictive: model expected future value.

Contractual LTV:

LTV = ARPU * gross_margin / churn_rate

Use margin, never revenue - revenue LTV flatters the business by the full cost of goods. For non-contractual businesses the churn-rate formula is invalid (there is no observable churn event); use a BG/NBD model for purchase frequency and a Gamma-Gamma model for monetary value:

python
from lifetimes import BetaGeoFitter, GammaGammaFitter
bgf = BetaGeoFitter(penalizer_coef=0.01)
bgf.fit(rfm['frequency'], rfm['recency'], rfm['T'])

Cap the projection horizon at roughly the data you have: with 12 months of history, projecting beyond 24 months is extrapolation - present it as a range, not a number. Report LTV by cohort and by acquisition channel, because the blended average hides the channels that are underwater.

Step 4: RFM segmentation

Score customers on Recency, Frequency, and Monetary value into quintiles (1-5 each), then group into named, actionable segments: Champions (R5 F4-5), Loyal, At Risk (R1-2 F4-5 - used to buy often, went quiet), and Hibernating (R1-2 F1-2). Each segment must map to one campaign: Champions get referral asks, At Risk gets the win-back offer (pair with win-back-campaign), Hibernating gets suppressed from paid retargeting to save spend.

Step 5: Churn prediction

Only after the churn definition is fixed. Build features per customer as of a snapshot date:

  • Recency, frequency, monetary, tenure.
  • Trend features: change in order rate quarter over quarter - trend beats level for early warning.
  • Engagement: logins, support tickets, feature usage where available.

Train a gradient boosting classifier. Evaluate with AUC and, more importantly, precision at the top decile - that is the list the retention team will actually work. Calibrate probabilities so "70% churn risk" means 70%. Validate on a held-out future window, never a random shuffle: shuffled validation leaks the future and overstates AUC. Use SHAP to explain drivers so the business can act on causes, not just scores.

Worked artifact: retention triangle excerpt with reading

Cohort     Size    M0     M1     M2     M3     M6
2024-01    2,140   100%   34%    27%    24%    22%
2024-02    2,380   100%   31%    25%    23%    21%
2024-03    2,910   100%   26%    19%    16%    -
Reading: Jan and Feb flatten at 21-22% - a durable base. The March cohort is
tracking 5-7 points below at every age: acquisition mix shifted (paid social
spike). LTV for March-acquired customers will run ~25% below plan; flag the
channel before scaling it further.

Deliverable

Produce a customer analytics pack containing: the retention triangle with the flattening level called out, LTV by cohort and channel (method labeled historical or predictive, margin-based), RFM segment sizes with one mapped action each, and a scored churn list with top-decile precision and the top three SHAP drivers.

Do NOT

  • Do not include the current incomplete period in cohort charts; it fabricates a retention cliff.
  • Do not compute LTV on revenue; use contribution margin.
  • Do not apply the ARPU/churn formula to non-contractual businesses; use BG/NBD + Gamma-Gamma.
  • Do not validate a churn model with a random split; use a held-out future window or the production model will disappoint.
  • Do not ship a metric without an owner and an action - "who do we contact, with what offer" is part of the analysis, not a follow-up.

Quality bar

  • Cohort definition, churn definition, and margin assumption are written on the artifact.
  • Every LTV number states its method and horizon; projections beyond ~2x the observed history are presented as ranges.
  • Churn model reports AUC and top-decile precision on a future window, with calibrated probabilities.
  • Each RFM segment has exactly one attached action and owner.

Perguntas frequentes

O que a habilidade de IA Customer Analytics faz?

Turns transaction data into cohort retention, lifetime value, RFM segments, and churn predictions tied to concrete actions. Use when someone asks "what's our customer LTV", "build a cohort retention table", "which customers are about to churn", "how do repeat purchase rates look by cohort", or "who should we target with a win-back offer". Do NOT use for event-level product usage and feature adoption analysis - use product-analytics instead; for defining market segments for positioning and messaging - use segmentation-strategy instead; for designing the interventions that reduce churn once a...

Por que usar Customer Analytics no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Customer Analytics é escrito em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Customer Analytics no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/SkillMedev/skills/tree/main/skills/customer-analytics. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Customer Analytics?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Customer Analytics?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Customer Analytics com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Customer Analytics é gratuita?

Sim. A habilidade é publicada no GitHub por SkillMedev sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, modelos de documento ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇