Rfm Customer Segmentation
liangdabiao/claude-data-analysis-ultra-main
Perform RFM (Recency, Frequency, Monetary) customer segmentation analysis on e-commerce data.
Perform RFM (Recency, Frequency, Monetary) customer segmentation from transaction data.
$ npx skills add asgard-ai-platform/skills --skill ecom-rfm-analysis -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install asgard-ai-platform/skills ecom-rfm-analysis --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/asgard-ai-platform/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/ecom-rfm-analysis .claude/skills/ecom-rfm-analysis && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "ecom-rfm-analysis" agent skill from https://github.com/asgard-ai-platform/skills/tree/main/ecom-rfm-analysis into .claude/skills/ecom-rfm-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ecom-rfm-analysis", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/asgard-ai-platform/skills/tree/main/ecom-rfm-analysisType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add asgard-ai-platform/skills --skill ecom-rfm-analysis -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install asgard-ai-platform/skills ecom-rfm-analysis --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/asgard-ai-platform/skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/ecom-rfm-analysis .agents/skills/ecom-rfm-analysis && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "ecom-rfm-analysis" agent skill from https://github.com/asgard-ai-platform/skills/tree/main/ecom-rfm-analysis into .agents/skills/ecom-rfm-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ecom-rfm-analysis", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add asgard-ai-platform/skills --skill ecom-rfm-analysis -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install asgard-ai-platform/skills ecom-rfm-analysis --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/asgard-ai-platform/skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/ecom-rfm-analysis .cursor/skills/ecom-rfm-analysis && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "ecom-rfm-analysis" agent skill from https://github.com/asgard-ai-platform/skills/tree/main/ecom-rfm-analysis into .cursor/skills/ecom-rfm-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ecom-rfm-analysis", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/asgard-ai-platform/skills.git --path ecom-rfm-analysis--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add asgard-ai-platform/skills --skill ecom-rfm-analysis -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install asgard-ai-platform/skills ecom-rfm-analysis --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/asgard-ai-platform/skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/ecom-rfm-analysis .gemini/skills/ecom-rfm-analysis && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "ecom-rfm-analysis" agent skill from https://github.com/asgard-ai-platform/skills/tree/main/ecom-rfm-analysis into .gemini/skills/ecom-rfm-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ecom-rfm-analysis", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install asgard-ai-platform/skills ecom-rfm-analysisInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add asgard-ai-platform/skills --skill ecom-rfm-analysis -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/asgard-ai-platform/skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/ecom-rfm-analysis .github/skills/ecom-rfm-analysis && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "ecom-rfm-analysis" agent skill from https://github.com/asgard-ai-platform/skills/tree/main/ecom-rfm-analysis into .github/skills/ecom-rfm-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ecom-rfm-analysis", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add asgard-ai-platform/skills --skill ecom-rfm-analysis -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install asgard-ai-platform/skills ecom-rfm-analysis --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/asgard-ai-platform/skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/ecom-rfm-analysis .opencode/skills/ecom-rfm-analysis && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "ecom-rfm-analysis" agent skill from https://github.com/asgard-ai-platform/skills/tree/main/ecom-rfm-analysis into .opencode/skills/ecom-rfm-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ecom-rfm-analysis", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
ecom-rfm-analysisPerform RFM (Recency, Frequency, Monetary) customer segmentation from transaction data.
Ecom Rfm Analysis is an agent skill from asgard-ai-platform/skills. Perform RFM (Recency, Frequency, Monetary) customer segmentation from transaction data. Use this skill when the user needs to segment customers by purchase behavior, identify high-value buyers, design retention campaigns, or prioritize marketing spend by customer value — even if they say 'who are our best customers', 'which customers are at risk of churning', or 'how do we target our marketing'.
Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `examples/sample_input.json`, `references/clv-prediction.md` and `references/rfm-implementation.md`).
The repository describes itself as: 301 open-source coding agent skills across 22 domains — methodology, judgment & gotchas packaged as Claude Agent Skills for the Asgard AI Platform. The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 4e7f4f8. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
pythonFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Ecom Rfm Analysis loads about 1.3k tokens when it runs, and up to ~7.8k if it reads all its reference files. Until then it costs about 104 tokens; SKILL.md has 459 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from asgard-ai-platform/skills at commit 4e7f4f8, republished under its MIT licence (© asgard-ai-platform). 459 words, ~1,342 tokens.
.claude/skills/ecom-rfm-analysis/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.RFM segments customers based on three behavioral dimensions: Recency (when they last bought), Frequency (how often they buy), and Monetary (how much they spend). It converts raw transaction data into actionable customer segments for targeted marketing.
IRON LAW: RFM Uses ACTUAL Behavior, Not Demographics
RFM is behavioral segmentation — it classifies by what customers DO,
not who they ARE. A 25-year-old and a 65-year-old in the same RFM segment
should receive the same treatment. Never mix RFM with demographic
assumptions.| Dimension | What It Measures | How to Calculate |
|---|---|---|
| Recency (R) | Days since last purchase | Today - Last purchase date |
| Frequency (F) | Number of purchases in period | Count of distinct transactions |
| Monetary (M) | Total spend in period | Sum of transaction values |
Note: For Recency, LOWER days = HIGHER score (more recent is better).
| Segment | RFM Pattern | Description | Strategy |
|---|---|---|---|
| Champions | R5, F5, M5 | Best customers, recent, frequent, high-value | Reward, loyalty program, early access |
| Loyal | R4-5, F4-5, M3-5 | Consistent buyers | Upsell, cross-sell, referral program |
| Potential Loyalists | R4-5, F2-3, M2-3 | Recent, moderate frequency | Nurture to increase frequency |
| At Risk | R2-3, F3-5, M3-5 | Were frequent/high-value, not buying recently | Win-back campaign, special offers |
| Hibernating | R1-2, F1-2, M1-2 | Long dormant, low value | Low-cost reactivation or let go |
| New Customers | R5, F1, M1-2 | Just made first purchase | Onboarding, second-purchase incentive |
Phase 1: Data Preparation
Phase 2: Calculate RFM Scores
Phase 3: Segment and Act
# RFM Analysis: {Business}
## Data Summary
- Customers analyzed: {N}
- Analysis window: {start} to {end}
- Transactions: {N}
## Segment Distribution
| Segment | Count | % | Avg R (days) | Avg F | Avg M |
|---------|-------|---|-------------|-------|-------|
| Champions | {N} | {%} | {days} | {count} | ${X} |
| At Risk | {N} | {%} | ... | ... | ... |
| ... | ... | ... | ... | ... | ... |
## Key Findings
- Top 20% customers contribute {X%} of revenue
- {N} customers at risk of churning (were high-value, now dormant)
- {N} new customers need second-purchase nurturing
## Recommended Actions
| Segment | Action | Channel | Expected Impact |
|---------|--------|---------|----------------|
| Champions | {loyalty reward} | {email/app} | Increase AOV by X% |
| At Risk | {win-back offer} | {email/SMS} | Recover X% of dormant revenue || Script | Description | Usage |
|---|---|---|
scripts/rfm_score.py | Score customers on R/F/M and assign segment labels | python scripts/rfm_score.py --help |
Run python scripts/rfm_score.py --verify to execute built-in sanity tests.
references/rfm-implementation.mdreferences/clv-prediction.md© asgard-ai-platform, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (scripts, references) in ecom-rfm-analysis of asgard-ai-platform/skills.
Open the folder on GitHubat commit 4e7f4f8
Ecom Rfm Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Ecom Rfm Analysis this skillasgard-ai-platform/skills | 242 | — | ~1.3k | Automated safety check: Pass | MIT | |
| Rfm Customer Segmentationliangdabiao/claude-data-analysis-ultra-main | 290 | — | ~1k | Automated safety check: Notes | None | |
| React Performanceaffaan-m/ECC | 277k | 1 repos | ~4.5k | Automated safety check: Pass | MIT | |
| Shopify Admin Rfm Customer Segmentation40RTY-ai/shopify-admin-skills | 194 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Performance Profileralirezarezvani/claude-skills | 28k | — | ~684 | Automated safety check: Pass | MIT | |
| Eighty Twenty Customer Value Rfmhashgraph-online/awesome-codex-plugins | 1.3k | — | ~770 | Automated safety check: Pass | MIT |
liangdabiao/claude-data-analysis-ultra-main
Perform RFM (Recency, Frequency, Monetary) customer segmentation analysis on e-commerce data.
affaan-m/ECC
React and Next.js performance optimization patterns adapted from Vercel Engineering's React Best Practices (https://github.com/vercel-labs/agent-skills).
40RTY-ai/shopify-admin-skills
Read-only: scores every customer on Recency, Frequency, and Monetary value to segment them into actionable groups (Champions, Loyal, At-Risk, Lost).
alirezarezvani/claude-skills
Systematic performance profiling for Node.js, Python, and Go applications.
hashgraph-online/awesome-codex-plugins
Segment customers and lists by 80/20 value, responsiveness, recency, frequency, and money.
udecode/plate
Review performance lanes with GitHub-scale tactics not owned by Vercel React rules: cohort segmentation, repeated-unit budgets, interaction-level INP, memory tagging, degradation contracts, browser…
asgard-ai-platform/skills
Implement BM25 ranking function for e-commerce product search relevance scoring.
asgard-ai-platform/skills
Calculate Cpk process capability index to assess whether a process meets specification requirements.
asgard-ai-platform/skills
Calculate price elasticity of demand to quantify how price changes affect sales volume.
asgard-ai-platform/skills
Apply Bayesian averaging to rank items by combining observed ratings with prior expectations.
asgard-ai-platform/skills
Implement Elo rating system to rank items or players from pairwise comparison outcomes.
asgard-ai-platform/skills
Calculate Wilson Score confidence intervals for ranking items by positive proportion with sample size correction.
Perform RFM (Recency, Frequency, Monetary) customer segmentation from transaction data. Ecom Rfm Analysis is an agent skill from asgard-ai-platform/skills. Perform RFM (Recency, Frequency, Monetary) customer segmentation from transaction data.
Ecom Rfm Analysis fits situations like: the user needs to segment customers by purchase behavior; identify high-value buyers; design retention campaigns; prioritize marketing spend by customer value — even if they say who are our best customers.
Run `npx skills add asgard-ai-platform/skills --skill ecom-rfm-analysis -a claude-code`. Or copy the skill folder (ecom-rfm-analysis in asgard-ai-platform/skills) into .claude/skills/ecom-rfm-analysis in your project. Claude Code loads it when a task matches its description.
Run `npx skills add asgard-ai-platform/skills --skill ecom-rfm-analysis -a codex`. Or copy the skill folder (ecom-rfm-analysis in asgard-ai-platform/skills) into .agents/skills/ecom-rfm-analysis in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add asgard-ai-platform/skills --skill ecom-rfm-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ecom-rfm-analysis, .gemini/skills/ecom-rfm-analysis, .github/skills/ecom-rfm-analysis and .opencode/skills/ecom-rfm-analysis in your project.
Going by SKILL.md and its folder, Ecom Rfm Analysis needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Ecom Rfm Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.3k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.4k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Ecom Rfm Analysis: Rfm Customer Segmentation (liangdabiao/claude-data-analysis-ultra-main, 290 stars), React Performance (affaan-m/ECC, 277k stars), Shopify Admin Rfm Customer Segmentation (40RTY-ai/shopify-admin-skills, 194 stars) and Performance Profiler (alirezarezvani/claude-skills, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
asgard-ai-platform (a GitHub organization) maintains it in asgard-ai-platform/skills, which has 242 GitHub stars. The repository holds 207 skills in this directory. The repository was last updated on June 6, 2026.
Source: asgard-ai-platform/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.