Skip to main content

The Claude Agents Playbook: 18 AI Agents for Ecommerce Operators

What This Is

Claude agents for ecommerce are pre-configured AI specialists that run recurring analysis workflows — SKU margin ranking, ROAS reconciliation, at-risk customer detection, cohort LTV builds, and contribution margin by channel — using data exported from Shopify and Klaviyo. Each agent has three components: an Agent Brief (system prompt configured once in Claude Projects), an Input Spec (the exact CSV export to provide), and an Output Spec (the formatted analysis returned). This playbook covers 18 agents across 6 operating stacks that run with zero code in Claude Projects.

How It Works

Every agent in this playbook follows the same three-component structure: Agent Brief — A system prompt you configure once in a Claude Project. It tells Claude its role, the analytical framework it should apply, the specific outputs you expect, and the format of the response. Once set, it persists across every session in that project. Input Spec — The exact data export you provide at the start of each session. Usually a CSV or spreadsheet from Shopify or Klaviyo. The spec tells you exactly which fields to include and how to format them. Output Spec — The formatted analysis Claude returns. Designed to be actionable: a table with the ranked finding, the implication, and the recommended action — not a prose summary. This structure is repeatable. Once you build the agent brief once, you run the same analysis weekly by uploading the latest export and asking Claude to run the analysis.

Stack 1: Customer Intelligence

The foundation. Run these before any other stack.

Agent 1: RFM Distributor

What it does: Ingests a Shopify order export and segments every customer into RFM tiers. Outputs the size of each segment, the revenue contribution of each segment, and the percentage of total contribution margin each segment represents. Agent Brief:
Input Spec: Shopify orders export (CSV). Required fields: Customer ID, Order Date, Order Total, Discount Amount. Output Spec: RFM distribution table + concentration flag + top 3 action recommendations.

Agent 2: Cohort LTV Builder

What it does: Takes a Shopify order export grouped by acquisition month and builds 30, 60, 90, 180, and 365-day LTV curves for each cohort. Identifies which cohorts are compounding versus which are churning early. Agent Brief:
Input Spec: Shopify orders export (CSV). Required fields: Customer ID, First Order Date, All Subsequent Order Dates, Order Totals. Output Spec: Cohort LTV table by month + top/bottom cohort analysis + acquisition period flags.

Agent 3: Champion Segment Profiler

What it does: Takes the Champion segment from the RFM analysis and builds a behavioral profile: first product purchased, average time to second purchase, average order frequency, acquisition source patterns. Agent Brief:
Input Spec: Shopify orders export filtered to Champion segment (from Agent 1 output). Fields: Customer ID, First Product, Order Dates, Geography, Klaviyo source tags if available. Output Spec: Champion Profile Card formatted as a one-page brief.

Stack 2: Margin Intelligence

Where the P&L conversation starts.

Agent 4: SKU Margin Ranker

What it does: Ingests a product margin spreadsheet and ranks SKUs by contribution margin — not gross margin. Flags SKUs where high revenue is masking negative contribution margin after accounting for returns, discounts, and variable costs. Agent Brief:
Input Spec: Product/SKU spreadsheet. Required fields: SKU, Revenue, Units Sold, COGS, Return Rate %, Average Discount %, Shipping Cost. Output Spec: SKU margin ranking table + Margin Trap flags + action recommendations.

Agent 5: Channel Margin Comparator

What it does: Compares contribution margin per customer by acquisition channel — paid social, paid search, email, organic, creator — to identify which channels produce margin-positive cohorts versus volume-only cohorts. Agent Brief:
Input Spec: Customer acquisition channel export + order history. Fields: Customer ID, Acquisition Channel, Acquisition Date, All Order Dates, Order Totals, Discount %. Output Spec: Channel margin comparison table + 90/365-day views + volume-without-margin flags.

Agent 6: Discount Leakage Identifier

What it does: Identifies where discount codes are being applied to customers who would likely have purchased without them — specifically, Champions and Loyal customers receiving promotional discounts. Agent Brief:
Input Spec: Order export with RFM segment labels and discount codes applied. Fields: Customer ID, RFM Segment, Order Total, Discount Code, Discount Amount. Output Spec: Discount Leakage Report with total margin lost + code-level breakdown + restructuring recommendations.

Stack 3: Retention Intelligence

The 90-day window where most brands lose.

Agent 7: At-Risk Customer Detector

What it does: Ingests Klaviyo customer data with purchase history and churn risk scores to identify which high-value customers are approaching the point where intervention becomes impossible. Agent Brief:
Input Spec: Klaviyo customer export with churn risk scores and CLV. Fields: Customer ID, Email, CLV, Churn Risk (Low/Medium/High), Last Order Date, Total Orders. Output Spec: Priority list sorted by revenue at risk + intervention type recommendation per customer tier.

Agent 8: Second-Purchase Optimizer

What it does: Analyzes the first-to-second-purchase journey to identify the optimal intervention window and the products that most reliably trigger a second purchase. Agent Brief:
Input Spec: Shopify orders export filtered to customers with 1–2 orders. Fields: Customer ID, First Order Date, First Product Purchased, Second Order Date (if exists), Second Product Purchased (if exists). Output Spec: Second Purchase Conversion Map with product-level repeat rates + timing recommendations.

Agent 9: Winback Segment Builder

What it does: Segments lapsed customers by value and recency to build differentiated winback strategies — personal outreach for high-value, automated for mid-value, suppression for low-value. Agent Brief:
Input Spec: Customer export of lapsed customers. Fields: Customer ID, LTV, Last Order Date, Total Orders, Average Order Value. Output Spec: 2×2 winback matrix with customer counts + intervention brief per quadrant.

Stack 4: Media Intelligence

Connect the ad account to the customer file.

Agent 10: Lookalike Seed Builder

What it does: Outputs a clean, formatted Champion segment list ready for upload as a custom audience seed in Meta — with the LTV column Meta uses for value-based lookalikes. Agent Brief:
Input Spec: Customer export with LTV. Fields: Customer ID, Email, Phone, First Name, Last Name, LTV, Email Subscription Status. Output Spec: Meta-formatted CSV ready for upload + seed summary.

Agent 11: ROAS Reconciler

What it does: Compares platform-reported ROAS against Shopify revenue to quantify the attribution gap and identify which channel’s self-reported numbers are most overstated. Agent Brief:
Input Spec: Platform ROAS reports (Meta, Google, TikTok) + Shopify revenue export for same date range. Fields: Platform, Spend, Claimed Revenue, Clicks. Shopify: Total Revenue, Orders, Period. Output Spec: Attribution Audit Report with gap analysis + incrementality testing recommendation.

Agent 12: Channel Mix Optimizer

What it does: Uses cohort LTV data by acquisition channel to recommend a budget reallocation that optimizes for 365-day contribution margin rather than platform ROAS. Agent Brief:
Input Spec: Channel spend + cohort LTV by channel. Fields: Channel, Spend (period), Customers Acquired, 90-day LTV per customer, 365-day LTV per customer, Average contribution margin %. Output Spec: Reallocation recommendation table + projected margin impact.

Stack 5: Creative Intelligence

Brief from data, not instinct.

Agent 13: Review Mining Agent

What it does: Processes a bulk export of customer reviews to extract the specific phrases, emotional triggers, and pain points that should appear in creative briefs. Agent Brief:
Input Spec: Customer reviews export (text file or CSV). Fields: Review Text, Star Rating, Date. Output Spec: Creative Brief Input Document with verbatim customer phrases, objection list, and usage recommendations.

Agent 14: Segment Creative Strategist

What it does: Takes the Champion Profile (from Agent 3) and the Review Mining output (from Agent 13) and builds a creative brief specific to the Champion segment for a given campaign objective. Agent Brief:
Input Spec: Champion Profile Card (Agent 3 output) + Creative Brief Input Document (Agent 13 output) + campaign objective statement. Output Spec: Formatted creative brief with insight, customer language, objection, value prop, and format recommendations per placement.

Agent 15: Email Subject Line Generator

What it does: Generates subject line variants calibrated to specific RFM segments — not generic A/B testing variants, but segment-specific language built from behavioral understanding. Agent Brief:
Input Spec: RFM segment name, campaign objective, customer phrase list (from Agent 13). Output Spec: 10 subject line variants with segment label and psychological trigger annotation.

Stack 6: Seasonal & Competitive Intelligence

Agent 16: Seasonal Cohort Planner

What it does: Analyzes two years of purchase history to identify which customer segments respond to seasonal promotions, what they respond to, and what the optimal timing is. Agent Brief:
Input Spec: 2-year Shopify orders export with RFM segment labels. Fields: Customer ID, RFM Segment, Order Date, Order Total, Discount Code, Discount Amount. Output Spec: Seasonal Response Map with segment-level response rates, timing recommendations, and offer structure by segment.

Agent 17: Competitive Review Analyzer

What it does: Processes competitor reviews to surface unmet customer needs, product gaps, and messaging angles the brand can own. Agent Brief:
Input Spec: Competitor reviews export. Fields: Review Text, Star Rating. Output Spec: Competitive Gap Map with ranked opportunities and messaging recommendations.

Agent 18: Weekly Intelligence Briefer

What it does: Takes a weekly data dump from Klaviyo and Shopify and produces a one-page intelligence brief with the 3 most important findings and the 3 recommended actions. Agent Brief:
Input Spec: Current week Klaviyo segment report + current week Shopify order summary + prior week equivalents for comparison. Output Spec: One-page Weekly Intelligence Brief with 3 findings + 3 actions, under 300 words.

How to Deploy

1

Set up Claude Projects

Create one Claude Project per stack (or one master project for all agents). In each project, paste the Agent Brief for each agent into the project instructions. Claude will remember this context across every session.
2

Build your data exports

Set up recurring exports from Shopify and Klaviyo that match each agent’s Input Spec. Most can be set to run automatically on a weekly schedule.
3

Run your first session

Upload the relevant export and type: “Run the [Agent Name] analysis on this data.” Claude will return the Output Spec formatted analysis.
4

Build the rolling Intelligence Brief

Create a Notion page or Google Doc. After each agent run, paste the key findings. Over time, this becomes the institutional intelligence that makes every subsequent decision smarter.
Click Open in Claude above to start configuring any of these agents with your own data. Claude will have this full playbook as context and can help you customize the Agent Briefs for your specific Shopify and Klaviyo setup.