Today's Agent Skill: Customer Purchase Trend Reporter

What It Does

Your sales data is a goldmine of insight about what customers want, when they buy, and which products are gaining or losing traction — but most small business owners never look at it systematically. An AI agent can analyze your transaction history and produce a clear trend report showing your top and bottom sellers, customers who haven't returned in 90-plus days, and products on a declining trajectory. This turns raw numbers into decisions you can act on before small problems become serious revenue issues.

How It Works

You provide a CSV export of your sales transactions — date, product or service, revenue, and customer identifier. The agent calculates sales by product and period, ranks your top and bottom performers, flags customers inactive beyond your threshold, checks for dangerous revenue concentration, and generates a plain-language summary explaining what the data shows and what specific actions to take.

How to Deploy It

Trigger it by typing "analyze my sales trends" and attaching a CSV of your transaction history. Compatible with Claude Code, Gemini CLI (with file tool enabled), Cursor, and Windsurf. Export your CSV directly from Shopify, Square, WooCommerce, or any POS system — all support CSV download from their Reports or Analytics section. Run monthly to catch trend shifts before they become significant problems.

SKILL.md — Ready to Deploy

## Description
Analyzes a CSV of sales transactions to identify top and bottom performing products or services, trend direction, at-risk customers who have not repurchased, and revenue concentration risk — then delivers plain-language recommended actions.

## Trigger
User says "analyze my sales trends", "which products are selling best?", or "show me my purchase trends" and provides transaction data.

## Input
- transactions_csv: CSV with columns: date, product_name (or service_name), revenue, customer_id (required)
- period: "weekly" or "monthly" — analysis grouping, defaults to monthly
- lookback: Number of periods to analyze, defaults to 6
- at_risk_days: Days since last purchase to flag a customer as at-risk, defaults to 90

## Steps
1. Parse and validate the CSV. Note missing or null values and their likely impact on analysis.
2. Group transactions by product and by period. Calculate total revenue and transaction count per group.
3. Rank products or services by total revenue across the full lookback period. Identify Top 5 and Bottom 5.
4. For each product, calculate period-over-period trend by comparing total revenue in the most recent 3 periods to the 3 prior periods. Classif

Copy the full SKILL.md and drop it into your agent's skills directory to activate this skill.

← Back to All Posts | Home — AZ AI Tools