Works with the AI Agents you already use
retail basket affinity analyst
Analyzes transaction baskets to identify product affinity patterns. Computes association rules with support, confidence, and lift metrics to find co-purchased items and cross-sell opportunities.
$1.99
retail basket affinity analyst
Example session with this skill installed
Analyze these 500 transactions to find product affinities. Use a min_support of 0.02 and min_lift of 1.2. Identify the top cross-sell opportunities.
- Read your context and instructions
- Compiled the retail basket affinity
Analysis of 500 transaction records is complete. I have identified 12 significant association rules meeting your thresholds.
Market Basket Analysis Results
1. Summary
| Metric | Value |
|---|---|
| Transactions analyzed | 500 |
| Unique items | 142 |
| Unique pairs observed | 864 |
| Association rules | 12 |
| Average basket size | 3.4 |
2. Association Rules
| Antecedent | Consequent | Support | Confidence | Lift |
|---|---|---|---|---|
| ORGANIC_BANANAS | WHOLE_MILK | 0.0420 | 0.3200 | 1.8500 |
| AVOCADO | LIME | 0.0280 | 0.4500 | 2.1000 |
| COFFEE_BEANS | PAPER_FILTERS | 0.0210 | 0.6800 | 4.2500 |
| PASTA_SAUCE | SPAGHETTI | 0.0350 | 0.5200 | 3.1500 |
3. Top Product Pairs
| Product A | Product B | Pair Count | Support | Lift |
|---|---|---|---|---|
| COFFEE_BEANS | PAPER_FILTERS | 11 | 0.0210 | 4.2500 |
| PASTA_SAUCE | SPAGHETTI | 18 | 0.0350 | 3.1500 |
| AVOCADO | LIME | 14 | 0.0280 | 2.1000 |
4. Findings
High Affinity Bundle: COFFEE_BEANS and PAPER_FILTERS show a lift of 4.25, indicating a very strong logical pairing for a morning routine bundle.
- Cross-Sell Opportunity: PASTA_SAUCE and SPAGHETTI have high confidence (0.52). Consider a "Meal Kit" promotion.
Fresh Produce Link: AVOCADO and LIME show significant lift (2.10), suggesting these should be merchandised in close proximity.
Next steps
- Validate the COFFEE_BEANS affinity against current inventory levels for bundling.
- Review the PASTA_SAUCE findings to see if specific brands drive higher confidence.
- Apply these rules to your recommendation engine for the "Frequently Bought Together" section.
Connects securely to your tools. The creator never sees your data.
About this skill
Retailers often struggle to identify which products are actually bought together versus what they assume is paired. This skill automates market basket analysis to find hidden product affinities and cross-sell opportunities using transaction data.
What it does
- Association Rule Mining calculates support, confidence, and lift metrics for product pairings.
- Cross-Sell Identification highlights strong affinities that suggest effective bundling or placement strategies.
- Basket Composition Analysis reports on average basket size and unique item distribution across transactions.
- Rule Ranking filters and sorts co-purchase patterns by statistical strength to prioritize merchandising focus.
How it works
- Prepare a JSON request containing transaction records with unique IDs and lists of product IDs.
- Configure optional thresholds for minimum support, confidence, and lift to filter out noise.
- Execute the analysis via the provided Python script to process the transaction data.
- Review the generated summary table and association rules to identify high-lift product pairs.
Frameworks & tools
The skill uses a Python-based execution environment to run deterministic association rule mining scripts. It processes structured JSON transaction data.
Why this beats prompting it yourself
Manual prompting often leads to hallucinated patterns or incorrect statistical calculations for lift and confidence. This skill uses a deterministic script to ensure every metric is mathematically accurate and reproducible across thousands of transactions.
Use cases
- Identify products for "Frequently Bought Together" website sections.
- Optimize physical store layouts by placing high-affinity items near each other.
- Design promotional bundles based on statistically significant co-purchase rates.
- Discover unexpected product relationships that contradict gut-feeling merchandising.
Known limitations
Requires consistent product identifiers across all transactions. Analysis is limited to association patterns and does not account for external factors like seasonality or active promotions.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.
Requires consistent product IDs. Does not account for seasonality or active promotions. Analytical estimates require business validation.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed today