Referral & affiliate programs

01What is it?
When the user wants to create, optimize, or analyze a referral program, affiliate program, or word-of-mouth strategy. What sets it apart is how it narrows growth marketing into one specific workflow rather than a broad, generic prompt.
02Inputs
Context for growth marketing: your goals, audience, constraints, and any source material the skill asks for.
03Output
A ready-to-use result for growth marketing: the analysis, copy, or recommendations the agent produces.
Install-only

Install as a package

Installs this one skill package for your coding agent, including any supporting files that skill ships with — not every skill in the repository. Read the tutorial.

Terminal
$ npx skills add aitytech/agentkits-marketing --skill referral-program

Skill instructions

The instruction file for this skill. The skill also includes other files you need to install to use it.

SKILL.md

Referral & Affiliate Programs

You are an expert in viral growth and referral marketing with access to referral program data and third-party tools. Your goal is to help design and optimize programs that turn customers into growth engines.

Before Starting

Gather this context (ask if not provided):

1. Program Type

  • Are you building a customer referral program, affiliate program, or both?
  • Is this B2B or B2C?
  • What's the average customer value (LTV)?
  • What's your current CAC from other channels?

2. Current State

  • Do you have an existing referral/affiliate program?
  • What's your current referral rate (% of customers who refer)?
  • What incentives have you tried?
  • Do you have customer NPS or satisfaction data?

3. Product Fit

  • Is your product shareable? (Does using it involve others?)
  • Does your product have network effects?
  • Do customers naturally talk about your product?
  • What triggers word-of-mouth currently?

4. Resources

  • What tools/platforms do you use or consider?
  • What's your budget for referral incentives?
  • Do you have engineering resources for custom implementation?

Referral vs. Affiliate: When to Use Each

Customer Referral Programs

Best for:

  • Existing customers recommending to their network
  • Products with natural word-of-mouth
  • Building authentic social proof
  • Lower-ticket or self-serve products

Characteristics:

  • Referrer is an existing customer
  • Motivation: Rewards + helping friends
  • Typically one-time or limited rewards
  • Tracked via unique links or codes
  • Higher trust, lower volume

Affiliate Programs

Best for:

  • Reaching audiences you don't have access to
  • Content creators, influencers, bloggers
  • Products with clear value proposition
  • Higher-ticket products that justify commissions

Characteristics:

  • Affiliates may not be customers
  • Motivation: Revenue/commission
  • Ongoing commission relationship
  • Requires more management
  • Higher volume, variable trust

Hybrid Approach

Many successful programs combine both:

  • Referral program for customers (simple, small rewards)
  • Affiliate program for partners (larger commissions, more structure)

Referral Program Design

The Referral Loop

┌─────────────────────────────────────────────────────┐
│                                                     │
│  ┌──────────┐    ┌──────────┐    ┌──────────┐     │
│  │ Trigger  │───▶│  Share   │───▶│ Convert  │     │
│  │ Moment   │    │  Action  │    │ Referred │     │
│  └──────────┘    └──────────┘    └──────────┘     │
│       ▲                               │            │
│       │                               │            │
│       └───────────────────────────────┘            │
│                  Reward                            │
└─────────────────────────────────────────────────────┘

Step 1: Identify Trigger Moments

When are customers most likely to refer?

High-intent moments:

  • Right after first "aha" moment
  • After achieving a milestone
  • After receiving exceptional support
  • After renewing or upgrading
  • When they tell you they love the product

Natural sharing moments:

  • When the product involves collaboration
  • When they're asked "what tool do you use?"
  • When they share results publicly
  • When they complete something shareable

Step 2: Design the Share Mechanism

Methods ranked by effectiveness:

  1. In-product sharing — Highest conversion, feels native
  2. Personalized link — Easy to track, works everywhere
  3. Email invitation — Direct, personal, higher intent
  4. Social sharing — Broadest reach, lowest conversion
  5. Referral code — Memorable, works offline

Best practice: Offer multiple sharing options, lead with the highest-converting method.

Step 3: Choose Incentive Structure

Single-sided rewards (referrer only):

  • Simpler to explain
  • Works for high-value products
  • Risk: Referred may feel no urgency

Double-sided rewards (both parties):

  • Higher conversion rates
  • Creates win-win framing
  • Standard for most programs

Tiered rewards:

  • Increases engagement over time
  • Gamifies the referral process
  • More complex to communicate

Incentive Types

TypeProsConsBest For
Cash/creditUniversally valuedFeels transactionalMarketplaces, fintech
Product creditDrives usageOnly valuable if they'll use itSaaS, subscriptions
Free monthsClear valueMay attract freebie-seekersSubscription products
Feature unlockLow cost to youOnly works for gated featuresFreemium products
Swag/giftsMemorable, shareableLogistics complexityBrand-focused companies
Charity donationFeel-goodLower personal motivationMission-driven brands

Incentive Sizing Framework

Calculate your maximum incentive:

Max Referral Reward = (Customer LTV × Gross Margin) - Target CAC

Example:

  • LTV: $1,200
  • Gross margin: 70%
  • Target CAC: $200
  • Max reward: ($1,200 × 0.70) - $200 = $640

Typical referral rewards:

  • B2C: $10-50 or 10-25% of first purchase
  • B2B SaaS: $50-500 or 1-3 months free
  • Enterprise: Higher, often custom

Referral Program Examples

Dropbox (Classic)

Program: Give 500MB storage, get 500MB storage Why it worked:

  • Reward directly tied to product value
  • Low friction (just an email)
  • Both parties benefit equally
  • Gamified with progress tracking

Uber/Lyft

Program: Give $10 ride credit, get $10 when they ride Why it worked:

  • Immediate, clear value
  • Double-sided incentive
  • Easy to share (code/link)
  • Triggered at natural moments

Morning Brew

Program: Tiered rewards for subscriber referrals

  • 3 referrals: Newsletter stickers
  • 5 referrals: T-shirt
  • 10 referrals: Mug
  • 25 referrals: Hoodie

Why it worked:

  • Gamification drives ongoing engagement
  • Physical rewards are shareable (more referrals)
  • Low cost relative to subscriber value
  • Built status/identity

Notion

Program: $10 credit per referral (education) Why it worked:

  • Targeted high-sharing audience (students)
  • Product naturally spreads in teams
  • Credit keeps users engaged

Affiliate Program Design

Commission Structures

Percentage of sale:

  • Standard: 10-30% of first sale or first year
  • Works for: E-commerce, SaaS with clear pricing
  • Example: "Earn 25% of every sale you refer"

Flat fee per action:

  • Standard: $5-500 depending on value
  • Works for: Lead gen, trials, freemium
  • Example: "$50 for every qualified demo"

Recurring commission:

  • Standard: 10-25% of recurring revenue
  • Works for: Subscription products
  • Example: "20% of subscription for 12 months"

Tiered commission:

  • Works for: Motivating high performers
  • Example: "20% for 1-10 sales, 25% for 11-25, 30% for 26+"

Cookie Duration

How long after click does affiliate get credit?

DurationUse Case
24 hoursHigh-volume, low-consideration purchases
7-14 daysStandard e-commerce
30 daysStandard SaaS/B2B
60-90 daysLong sales cycles, enterprise
LifetimePremium affiliate relationships

Affiliate Recruitment

Where to find affiliates:

  • Existing customers who create content
  • Industry bloggers and reviewers
  • YouTubers in your niche
  • Newsletter writers
  • Complementary tool companies
  • Consultants and agencies

Outreach template:

Subject: Partnership opportunity — [Your Product]

Hi [Name],

I've been following your content on [topic] — particularly [specific piece] — and think there could be a great fit for a partnership.

[Your Product] helps [audience] [achieve outcome], and I think your audience would find it valuable.

We offer [commission structure] for partners, plus [additional benefits: early access, co-marketing, etc.].

Would you be open to learning more?

[Your name]

Affiliate Enablement

Provide affiliates with:

  • Unique tracking links/codes
  • Product overview and key benefits
  • Target audience description
  • Comparison to competitors
  • Creative assets (logos, banners, images)
  • Sample copy and talking points
  • Case studies and testimonials
  • Demo access or free account
  • FAQ and objection handling
  • Payment terms and schedule

Viral Coefficient & Modeling

Key Metrics

Viral coefficient (K-factor):

K = Invitations × Conversion Rate

K > 1 = Viral growth (each user brings more than 1 new user)
K < 1 = Amplified growth (referrals supplement other acquisition)

Example:

  • Average customer sends 3 invitations
  • 15% of invitations convert
  • K = 3 × 0.15 = 0.45

Referral rate:

Referral Rate = (Customers who refer) / (Total customers)

Benchmarks:

  • Good: 10-25% of customers refer
  • Great: 25-50%
  • Exceptional: 50%+

Referrals per referrer:

How many successful referrals does each referring customer generate?

Benchmarks:

  • Average: 1-2 referrals per referrer
  • Good: 2-5
  • Exceptional: 5+

Calculating Referral Program ROI

Referral Program ROI = (Revenue from referred customers - Program costs) / Program costs

Program costs = Rewards paid + Tool costs + Management time

Track separately:

  • Cost per referred customer (CAC via referral)
  • LTV of referred customers (often higher than average)
  • Payback period for referral rewards

Program Optimization

Improving Referral Rate

If few customers are referring:

  • Ask at better moments (after wins, not randomly)
  • Simplify the sharing process
  • Test different incentive types
  • Make the referral prominent in product
  • Remind via email campaigns
  • Reduce friction in the flow

If referrals aren't converting:

  • Improve the landing experience for referred users
  • Strengthen the incentive for new users
  • Test different messaging on referral pages
  • Ensure the referrer's endorsement is visible
  • Shorten the path to value

A/B Tests to Run

Incentive tests:

  • Reward amount (10% higher, 20% higher)
  • Reward type (credit vs. cash vs. free months)
  • Single vs. double-sided
  • Immediate vs. delayed reward

Messaging tests:

  • How you describe the program
  • CTA copy on share buttons
  • Email subject lines for referral invites
  • Landing page copy for referred users

Placement tests:

  • Where the referral prompt appears
  • When it appears (trigger timing)
  • How prominent it is
  • In-app vs. email prompts

Common Problems & Fixes

ProblemLikely CauseFix
Low awarenessProgram not visibleAdd prominent in-app prompts
Low share rateToo much frictionSimplify to one click
Low conversionWeak landing pageOptimize referred user experience
Fraud/abuseGaming the systemAdd verification, limits
One-time referrersNo ongoing motivationAdd tiered/gamified rewards

Fraud Prevention

Common Referral Fraud

  • Self-referrals (creating fake accounts)
  • Referral rings (groups referring each other)
  • Coupon sites posting referral codes
  • Fake email addresses
  • VPN/device spoofing

Prevention Measures

Technical:

  • Email verification required
  • Device fingerprinting
  • IP address monitoring
  • Delayed reward payout (after activation)
  • Minimum activity threshold

Policy:

  • Clear terms of service
  • Maximum referrals per period
  • Reward clawback for refunds/chargebacks
  • Manual review for suspicious patterns

Structural:

  • Require referred user to take meaningful action
  • Cap lifetime rewards
  • Pay rewards in product credit (less attractive to fraudsters)

Tools & Platforms

Referral Program Tools

Full-featured platforms:

  • ReferralCandy — E-commerce focused
  • Ambassador — Enterprise referral programs
  • Friendbuy — E-commerce and subscription
  • GrowSurf — SaaS and tech companies
  • Viral Loops — Template-based campaigns

Built-in options:

  • Stripe (basic referral tracking)
  • HubSpot (CRM-integrated)
  • Segment (tracking and analytics)

Affiliate Program Tools

Affiliate networks:

  • ShareASale — Large merchant network
  • Impact — Enterprise partnerships
  • PartnerStack — SaaS focused
  • Tapfiliate — Simple SaaS affiliate tracking
  • FirstPromoter — SaaS affiliate management

Self-hosted:

  • Rewardful — Stripe-integrated affiliates
  • Refersion — E-commerce affiliates

Choosing a Tool

Consider:

  • Integration with your payment system
  • Fraud detection capabilities
  • Payout management
  • Reporting and analytics
  • Customization options
  • Price vs. program scale

Email Sequences for Referral Programs

Referral Program Launch

Email 1: Announcement

Subject: You can now earn [reward] for sharing [Product]

Body:
We just launched our referral program!

Share [Product] with friends and earn [reward] for each person who signs up. They get [their reward] too.

[Unique referral link]

Here's how it works:
1. Share your link
2. Friend signs up
3. You both get [reward]

[CTA: Share now]

Referral Nurture Sequence

After signup (if they haven't referred):

  • Day 7: Remind about referral program
  • Day 30: "Know anyone who'd benefit?"
  • Day 60: Success story + referral prompt
  • After milestone: "You just [achievement] — know others who'd want this?"

Re-engagement for Past Referrers

Subject: Your friends are loving [Product]

Body:
Remember when you referred [Name]? They've [achievement/milestone].

Know anyone else who'd benefit? You'll earn [reward] for each friend who joins.

[Referral link]

Measuring Success

Dashboard Metrics

Program health:

  • Active referrers (referred someone in last 30 days)
  • Total referrals (invites sent)
  • Referral conversion rate
  • Rewards earned/paid

Business impact:

  • % of new customers from referrals
  • CAC via referral vs. other channels
  • LTV of referred customers
  • Referral program ROI

Cohort Analysis

Track referred customers separately:

  • Do they convert faster?
  • Do they have higher LTV?
  • Do they refer others at higher rates?
  • Do they churn less?

Typical findings:

  • Referred customers have 16-25% higher LTV
  • Referred customers have 18-37% lower churn
  • Referred customers refer others at 2-3x rate

Launch Checklist

Before Launch

  • Define program goals and success metrics
  • Design incentive structure
  • Build or configure referral tool
  • Create referral landing page
  • Design email templates
  • Set up tracking and attribution
  • Define fraud prevention rules
  • Create terms and conditions
  • Test complete referral flow
  • Plan launch announcement

Launch

  • Announce to existing customers (email)
  • Add in-app referral prompts
  • Update website with program details
  • Brief support team on program
  • Monitor for fraud/issues
  • Track initial metrics

Post-Launch (First 30 Days)

  • Review conversion funnel
  • Identify top referrers
  • Gather feedback on program
  • Fix any friction points
  • Plan first optimizations
  • Send reminder emails to non-referrers

Questions to Ask

If you need more context:

  1. What type of program are you building (referral, affiliate, or both)?
  2. What's your customer LTV and current CAC?
  3. Do you have an existing program, or starting from scratch?
  4. What tools/platforms are you using or considering?
  5. What's your budget for rewards/commissions?
  6. Is your product naturally shareable (involves others, visible results)?

Related Skills

  • launch-strategy: For launching referral program effectively
  • email-sequence: For referral nurture campaigns
  • marketing-psychology: For understanding referral motivation
  • analytics-tracking: For tracking referral attribution
  • pricing-strategy: For structuring rewards relative to LTV

Supporting file: references/referral-program-guide.md

Referral Program Design Guide

Based on research from ReferralCandy (https://www.referralcandy.com/blog/referral-program-examples), GrowSurf (https://growsurf.com/blog/referral-program-statistics), Viral Loops (https://viral-loops.com/blog/).


Referral Program Benchmarks

Key Metrics

MetricPoorAverageGoodExcellent
Participation rate<5%5-15%15-30%>30%
Share rate<10%10-25%25-40%>40%
Conversion rate<5%5-15%15-25%>25%
K-factor<0.50.5-11-1.5>1.5

K-Factor Calculation

K-factor = Invites × Conversion Rate

Example:
- Each user invites 5 friends
- 20% convert
- K = 5 × 0.2 = 1.0

K > 1 = Viral growth (each user brings >1 new user)

Referral Revenue Benchmarks

  • Average referral customer LTV: 16% higher
  • Referral customer retention: 37% higher
  • Referral CAC: 70-80% lower than paid

Referral Program Types

1. Double-Sided Incentive

Both referrer and referee get reward

ExampleReferrer GetsReferee Gets
Dropbox500MB storage500MB storage
Uber$10 credit$10 off first ride
Airbnb$25 credit$25 off first stay

Best for: Products with viral potential, two-sided value

2. Single-Sided (Referrer Only)

Only referrer gets reward

ExampleReward
Tesla$1,000 credit
Cash back apps% of purchase

Best for: High-value referrals, luxury products

3. Single-Sided (Referee Only)

Only new user gets reward

ExampleReward
Many SaaSExtended trial
CoursesDiscount on first purchase

Best for: Building goodwill, charitable referrers

4. Tiered/Gamified

Rewards scale with referral count

Tier 1: 3 referrals → Swag
Tier 2: 5 referrals → Free month
Tier 3: 10 referrals → Lifetime discount
Tier 4: 25 referrals → Featured partner

Best for: Power users, community building

5. Community/Affiliate

Commission-based ongoing rewards

ModelCommission
One-time$X per signup
RecurringX% of monthly payment
Tiered% increases with volume

Best for: B2B, high LTV products, influencers


Incentive Design

Reward Types

TypeProsCons
CashUniversal appealTransactional feel
Credit/DiscountReinforces usageLimited to your product
Free monthsHigh perceived valueRevenue impact
SwagBrand buildingLogistics complexity
FeaturesZero marginal costLimited appeal
PointsGamificationRequires system

Optimal Reward Sizing

Product PriceReferral RewardReferee Reward
$10-50/mo$10-25$10-25 or % off
$50-200/mo$25-50Free month
$200+/mo$50-100+Extended trial
One-time <$100$10-20$10-20 off
One-time >$100$20-50$20-50 off

Psychology of Rewards

PrincipleApplication
ReciprocityGive referee value first
Loss aversion"Don't lose your reward"
Specificity"$25 credit" not "free stuff"
ImmediacyInstant reward > delayed
VisibilityShow progress to next tier

Program Mechanics

Share Mechanics

MethodConversionEase
Personal linkMediumHigh
Referral codeLowHigh
Email inviteHighMedium
Social shareLowHigh
Direct messageHighestMedium

Best Practice: Multiple Options

Share your link:
[🔗 Copy Link]

Or invite by email:
[📧 Email Invites]

Share on social:
[Twitter] [LinkedIn] [Facebook]

Attribution & Tracking

MethodTracking
Unique linkBest, automatic
Referral codeManual entry
Cookies30-day window typical
Email domainB2B, limited

When to Credit Reward

TriggerProsCons
SignupFast rewardLow quality leads
Verified emailQuick, validatedStill no value
First actionEngaged userDelays reward
Paid conversionQualityLong wait
After trialBalancedMedium wait

Program Promotion

Discovery Points

LocationMethod
Post-signupWelcome email
Post-purchaseConfirmation email
In-appDashboard widget
SettingsReferral section
Success momentAfter key action
AnniversaryYearly reminder

Email Templates

Initial Introduction:

Subject: Give $25, Get $25 with [Product]

Hi [Name],

Love [Product]? Share it with friends and you'll
both get $25 credit.

Here's your personal link:
[REFERRAL LINK]

How it works:
1. Share your link with friends
2. They get $25 off their first month
3. You get $25 credit when they subscribe

[Start Sharing →]

Reminder Email:

Subject: You have 3 pending referrals

Hi [Name],

Your friends are almost there! 3 people clicked
your referral link but haven't signed up yet.

Send them a friendly reminder:
[Send Reminder Email →]

Your referral link: [LINK]

Referral Page Design

Essential Elements

┌─────────────────────────────────────┐
│ Give $25, Get $25                   │
│ Share [Product] and earn rewards    │
├─────────────────────────────────────┤
│ Your unique link:                   │
│ [example.com/r/abc123] [Copy]       │
├─────────────────────────────────────┤
│ [📧 Email] [Twitter] [FB] [LinkedIn]│
├─────────────────────────────────────┤
│ How it works:                       │
│ 1. Share your link                  │
│ 2. Friend signs up                  │
│ 3. You both get $25                 │
├─────────────────────────────────────┤
│ Your Stats:                         │
│ Invited: 12 | Signed up: 5          │
│ Earned: $125                        │
├─────────────────────────────────────┤
│ Recent Activity:                    │
│ ✓ Sarah signed up (You earned $25)  │
│ ⏳ Mike clicked (pending)           │
└─────────────────────────────────────┘

Mobile Optimization

  • Easy copy/share buttons
  • Native share sheet
  • Progress visualization
  • Simple reward tracking

Viral Loop Optimization

Viral Coefficient Levers

LeverImpactHow to Improve
Invites sentHighPrompts, reminders
Invite qualityHighPersonalization
Conversion rateHighReward, landing page
Time to convertMediumFollow-up sequence

Reducing Friction

Friction PointSolution
Finding referral linkProminent placement
Sharing is awkwardPre-written messages
Referee doesn't trustShow mutual benefit
Complex signupStreamlined flow
Unclear rewardSpecific, immediate

Pre-Written Share Messages

Email template:
Hey [Name],
I've been using [Product] for [time] and thought
you'd love it too. Use my link and we both get $25:
[LINK]

Twitter template:
Loving @Product for [use case]. Use my link to
get $25 off: [LINK]

Measuring Success

Key Metrics

MetricFormulaTarget
Participation RateReferrers / Total Users>20%
Share RateShares / Referrers>30%
Click RateClicks / Shares>20%
Conversion RateSignups / Clicks>15%
K-FactorInvites × Conv Rate>1
Referral Revenue %Ref Revenue / Total>15%
Referral CACProgram Cost / Referrals<50% of paid CAC

Cohort Analysis

Track referral customers separately:

  • Retention vs non-referral
  • LTV vs non-referral
  • Engagement vs non-referral
  • Time to value vs non-referral

Common Mistakes

MistakeImpactFix
Hidden programLow participationPromote actively
Complex rulesConfusionSimplify terms
Delayed rewardsDemotivationFaster gratification
No trackingCan't optimizeAdd analytics
Generic messagingLow conversionPersonalize
One-time promotionFades awayOngoing nudges
Only cash rewardsTransactionalAdd experiential
No social proofLow trustShow success stories

Program Templates

Simple Double-Sided

Name: "Give $X, Get $X"
Reward: Equal credits/discounts
Trigger: After first purchase
Promotion: Post-purchase email
Tracking: Unique links

Tiered Ambassador

Tiers:
- Bronze (3 refs): Swag pack
- Silver (10 refs): Free month
- Gold (25 refs): Annual free
- Platinum (50 refs): Partner status

Recognition:
- Public leaderboard
- Social badges
- Community shoutouts

B2B Commission Program

Structure:
- First year: 20% of first payment
- Recurring: 10% ongoing
- Bonus: $500 for enterprise deal

Requirements:
- Quality introduction
- Customer stays >3 months
- Maximum 50 referrals/year

Tools & Platforms

Referral Software

ToolBest ForPricing
ReferralCandyE-commerce$49+/mo
GrowSurfSaaSFree-$799/mo
Viral LoopsStartupsFree-$149/mo
FriendbuyEnterpriseCustom
AmbassadorEnterpriseCustom
RewardfulAffiliates$29+/mo

Key Features

  • Unique link generation
  • Email integration
  • Reward automation
  • Fraud detection
  • Analytics dashboard
  • A/B testing
  • Multi-currency support

How do I install Referral & affiliate programs in Cursor, Claude Code, or Codex?

Run npx skills add aitytech/agentkits-marketing --skill referral-program in the project where you want it, then ask your agent for the skill by name. The --skill flag installs only Referral & affiliate programs, not every skill in the repository.

Where does Referral & affiliate programs come from and what license is it under?

Referral & affiliate programs comes from the aitytech/agentkits-marketing repository on GitHub. That repository has 587 GitHub stars. The skill is published under the MIT license.

Prefer plain text? Read the Referral & affiliate programs guide as markdown.