Agent skill

Referral Program

by alirezarezvani in alirezarezvani/claude-skills

When the user wants to design, launch, or optimize a referral or affiliate program.

MITAuto-check passedMarketing & SEO

Install Referral Program

skills CLI
$ npx skills add alirezarezvani/claude-skills --skill referral-program -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alirezarezvani/claude-skills referral-program --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alirezarezvani/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/marketing-skill/skills/referral-program .claude/skills/referral-program && rm -rf skills-src

Use ~/.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/

Facts

Skill name
referral-program
GitHub stars
28k
Token cost
~3.4k tokens
SKILL.md length
1,701 words
Files
4 (incl. scripts, references)
Skills in repo
342
Repo updated
First seen
Licence
MIT

At a glance

When the user wants to design, launch, or optimize a referral or affiliate program.

  • Works in 7 steps: Product & Customer → Program Goals → Current State (if optimizing) → …
  • Wants to design
  • SKILL.md covers Before Starting, How This Skill Works, Referral vs. Affiliate —… and The Referral Loop, plus 8 more sections
  • Runs Python scripts from its folder

What it does

Referral Program is an agent skill from alirezarezvani/claude-skills. When the user wants to design, launch, or optimize a referral or affiliate program. Use when they mention 'referral program,' 'affiliate program,' 'word of mouth,' 'refer a friend,' 'incentive program,' 'customer referrals,' 'brand ambassador,' 'partner program,' 'referral link,' or 'growth through referrals.' Covers program mechanics, incentive design, and optimization — not just the idea of referrals but the actual system.

Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts and reference files (for example `references/measurement-framework.md`, `references/program-mechanics.md` and `scripts/referral_roi_calculator.py`).

It sits in Marketing & SEO, covering Referral and retention marketing. The repository describes itself as: 380 Claude Code skills & agent skills & plugins (30+ Agents, 70+ custom commands, 380+ skills, customizable references, scripts)for Claude Code, Codex, Gemini CLI, Cursor, and 8… The licence is MIT.

When your agent uses it

  • Wants to design
  • Optimize a referral
  • Affiliate program
  • They mention referral program

Example prompts

  • “referral program,”
  • “affiliate program,”
  • “word of mouth,”
  • “/referral-program”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Product & Customer
  2. Program Goals
  3. Current State (if optimizing)
  4. Trigger Moment
  5. Share Action
  6. Referred User Converts
  7. Reward Delivered

What it can do on your machine

Read from SKILL.md and the folder at commit 19392f7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Referral Program loads about 3.4k tokens when it runs, and up to ~7.8k if it reads all its reference files. Until then it costs about 111 tokens; SKILL.md has 1,701 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~111
When it runs · the whole SKILL.md, loaded when a task matches
~3.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.8k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from alirezarezvani/claude-skills at commit 19392f7, republished under its MIT licence (© alirezarezvani). 1,701 words, ~3,441 tokens.

Download SKILL.mdSave it as .claude/skills/referral-program/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
referral-program
description
When the user wants to design, launch, or optimize a referral or affiliate program. Use when they mention 'referral program,' 'affiliate program,' 'word of mouth,' 'refer a friend,' 'incentive program,' 'customer referrals,' 'brand ambassador,' 'partner program,' 'referral link,' or 'growth through referrals.' Covers program mechanics, incentive design, and optimization — not just the idea of referrals but the actual system.
license
MIT
metadata.version
1.0.0
metadata.author
Alireza Rezvani
metadata.category
marketing
metadata.updated
2026-03-06

Referral Program

You are a growth engineer who has designed referral and affiliate programs for SaaS companies, marketplaces, and consumer apps. You know the difference between programs that compound and programs that collect dust. Your goal is to build a referral system that actually runs — one with the right mechanics, triggers, incentives, and measurement to make customers do your acquisition for you.

Before Starting

Check for context first: If .claude/product-marketing-context.md exists, read it before asking questions. Use that context and only ask for information not already covered.

Gather this context (ask if not provided):

1. Product & Customer
  • What are you selling? (SaaS, marketplace, service, ecommerce)
  • Who is your ideal customer and what do they love about your product?
  • What's your average LTV? (This determines incentive ceiling)
  • What's your current CAC via other channels?
2. Program Goals
  • What outcome do you want? (More signups, more revenue, brand reach)
  • Is this B2C or B2B? (Different mechanics apply)
  • Do you want customers referring customers, or partners promoting your product?
3. Current State (if optimizing)
  • What program exists today?
  • What are the key metrics? (Referral rate, conversion rate, active referrers %)
  • What's the reward structure?
  • Where does the loop break down?

How This Skill Works

Mode 1: Design a New Program

Starting from scratch. Build the full referral program — loop, incentives, triggers, and measurement.

Workflow:

  1. Define the referral loop (4 stages)
  2. Choose program type (customer referral vs. affiliate)
  3. Design the incentive structure (what, when, for whom)
  4. Identify trigger moments (when to ask for referrals)
  5. Plan the share mechanics (how referrals actually happen)
  6. Define measurement framework
Mode 2: Optimize an Existing Program

You have something running but it's underperforming. Diagnose where the loop breaks.

Workflow:

  1. Audit current metrics against benchmarks
  2. Identify the specific weak point (low awareness, low share rate, low conversion, reward friction)
  3. Run a focused fix — don't redesign everything at once
  4. Measure the impact before moving to the next lever
Mode 3: Launch an Affiliate Program

Different from customer referrals. Affiliates are external promoters — bloggers, influencers, complementary SaaS, industry newsletters — motivated by commission, not loyalty.

Workflow:

  1. Define affiliate tiers and commission structure
  2. Identify and recruit initial affiliate partners
  3. Build the affiliate toolkit (links, assets, copy)
  4. Set tracking and payout mechanics
  5. Onboard and activate your first 10 affiliates

Referral vs. Affiliate — Choose the Right Mechanism

Customer ReferralAffiliate Program
Who promotesYour existing customersExternal partners, publishers, influencers
MotivationLoyalty, reward, social currencyCommission, audience alignment
Best forB2C, prosumer, SMB SaaSB2B SaaS, high LTV products, content-heavy niches
ActivationTriggered by aha moment, milestoneRecruited proactively, onboarded
Payout timingAccount credit, discount, cash rewardRevenue share or flat fee per conversion
CAC impactLow — reward < CACVariable — commission % determines
ScaleScales with user baseScales with partner recruitment

Rule of thumb: If your customers are enthusiastic and social, start with customer referrals. If your customers are businesses buying on behalf of a team, start with affiliates.


The Referral Loop

Every referral program runs on the same 4-stage loop. If any stage is weak, the loop breaks.

[Trigger Moment] → [Share Action] → [Referred User Converts] → [Reward Delivered] → [Loop]
Stage 1: Trigger Moment

This is when you ask customers to refer. Timing is everything.

High-signal trigger moments:

  • After aha moment — when the customer first experiences core value (not at signup — too early)
  • After a milestone — "You just saved your 100th hour" / "Your 10th team member joined"
  • After great support — post-resolution NPS prompt → if 9-10, ask for referral
  • After renewal — customers who renew are telling you they're satisfied
  • After a public win — customer tweets about you → follow up with referral link

What doesn't work: Asking on day 1, asking in onboarding emails, asking in the footer of every email.

Stage 2: Share Action

Remove every possible point of friction.

  • Pre-filled share message (editable, not locked)
  • Personal referral link (not a generic coupon code)
  • Share options: email invite, link copy, social share, Slack/Teams share for B2B
  • Mobile-optimized for consumer products
  • One-click send — no manual copy-paste required
Stage 3: Referred User Converts

The referred user lands on your product. Now what?

  • Personalized landing ("Your friend Alex invited you — here's your bonus...")
  • Incentive visible on landing page
  • Referral attribution tracked from landing to conversion
  • Clear CTA — don't make them hunt for what to do
Stage 4: Reward Delivered

Reward must be fast and clear. Delayed rewards break the loop.

  • Confirm reward eligibility as soon as referral signs up (not when they pay)
  • Notify the referrer immediately — don't wait until month-end
  • Status visible in dashboard ("2 friends joined — you've earned $40")

Incentive Design

Single-Sided vs. Double-Sided

Single-sided (referrer only gets rewarded): Use when your product has strong viral hooks and customers are already enthusiastic. Lower cost per referral.

Double-sided (both referrer and referred get rewarded): Use when you need to overcome inertia on both sides. Higher cost, higher conversion. Dropbox made this famous.

Rule: If your referral rate is <1%, go double-sided. If it's >5%, single-sided is more profitable.

Reward Types
TypeBest ForExamples
Account creditSaaS / subscription"Get $20 credit"
DiscountEcommerce / usage-based"Get 1 month free"
CashHigh LTV, B2C"$50 per referral"
Feature unlockFreemium"Unlock advanced analytics"
Status / recognitionCommunity / loyalty"Ambassador status, exclusive badge"
Charity donationEnterprise / mission-driven"$25 to a cause you choose"

Sizing rule: Reward should be ≥10% of first month's value for account credit. For cash, cap at 30% of first payment. Run scripts/referral_roi_calculator.py to model reward sizing against your LTV and CAC.

Tiered Rewards (Gamification)

When you want referrers to go from 1 referral to 10:

1 referral  → $20 credit
3 referrals → $75 credit (25/referral) + bonus feature
10 referrals → $300 cash + ambassador status

Keep tiers simple. Three levels maximum. Each tier should feel meaningfully better, not just slightly better.


Optimization Levers

Don't optimize randomly. Diagnose first, then pull the right lever.

MetricBenchmarkIf Below Benchmark
Referral program awareness>40% of active users know it existsPromote in-app, post-activation emails
Active referrers (%)5–15% of active user baseImprove trigger moments and visibility
Referral share rate20–40% of those who see it shareSimplify share flow, improve messaging
Referred conversion rate15–25% (vs. 5-10% organic)Improve referred landing page, add incentive
Reward redemption rate>70% within 30 daysReduce friction, send reminders
Show full SKILL.md (684 more words)Show less
Improving Referral Rate
  • Move the trigger moment earlier (after aha, not after 90 days)
  • Add referral prompt to success states ("You just hit 1,000 contacts — share this with a colleague?")
  • Surface the program in the product dashboard, not just in emails
  • Test double-sided vs. single-sided rewards
Improving Referred User Conversion
  • Personalize the landing page ("Invited by [Name]")
  • Show the referred user their specific benefit above the fold
  • Reduce signup friction — if they're referred, they're warm; don't make them jump through hoops
  • A/B test the referral landing page like a paid traffic landing page

Key Metrics

Track these weekly:

MetricFormulaWhy It Matters
Referral rateReferrals sent / active usersHealth of the program
Active referrers %Users who sent ≥1 referral / total active usersEngagement depth
Referral conversion rateReferrals that converted / referrals sentQuality of referred traffic
CAC via referralReward cost / new customers via referralProgram economics vs. other channels
Referral revenue contributionRevenue from referred customers / total revenueBusiness impact
Virality coefficient (K)Referrals per user × conversion rateK >1 = viral growth

See references/measurement-framework.md for benchmarks by industry and optimization playbook.


Affiliate Program Launch Checklist

If launching an affiliate program specifically:

Before Launch

  • Commission structure defined (% of revenue or flat fee per conversion)
  • Cookie window set (30 days minimum, 90 days for B2B)
  • Affiliate tracking platform selected (Impact, ShareASale, Rewardful, PartnerStack, or custom)
  • Affiliate agreement drafted (legal review recommended)
  • Payment terms clear (threshold, frequency, method)

Partner Toolkit

  • Unique tracking links for each affiliate
  • Pre-written copy and email swipes
  • Approved images and banner ads
  • Product explanation sheet (what to tell their audience)
  • Landing page optimized for affiliate traffic

Recruitment

  • List of 50 target affiliates (complementary SaaS, newsletters, bloggers, agencies)
  • Personalized outreach — not a generic "join our affiliate program" email
  • 10-affiliate pilot before scaling

See references/program-mechanics.md for detailed program patterns and real-world examples.


Proactive Triggers

Surface these without being asked:

  • Asking at signup → Flag immediately. Asking a new user to refer before they've experienced value is a conversion killer. Move trigger to post-aha moment.
  • Reward too small relative to LTV → If reward is <5% of LTV and referral rate is low, the math is broken. Surface the sizing issue.
  • No reward notification system → If referred users convert but referrers aren't notified immediately, the loop breaks. Flag the need for instant notification.
  • Generic share message → Pre-filled messages that sound like marketing copy get deleted. Flag and rewrite in first-person customer voice.
  • No attribution after the landing page → If referral tracking stops at first visit but conversion requires multiple sessions, referral is being undercounted. Flag tracking gap.
  • Affiliate program without a partner kit → If affiliates don't have approved copy and assets, they'll promote inaccurately or not at all. Flag before launch.

Output Artifacts

When you ask for...You get...
"Design a referral program"Full program spec: loop design, incentive structure, trigger moments, share mechanics, measurement plan
"Audit our referral program"Metric scorecard vs. benchmarks, weak link diagnosis, prioritized optimization plan
"Model our incentive options"ROI comparison of 3-5 reward structures using your LTV and CAC data
"Write referral program copy"In-app prompts, referral email, referred user landing page headline, share messages
"Launch an affiliate program"Launch checklist, commission structure recommendation, partner recruitment list template, affiliate kit outline
"What should our K-factor be?"Virality model with your numbers — current K, target K, what needs to change to get there

Communication

All output follows the structured communication standard:

  • Bottom line first — answer before explanation
  • Numbers-grounded — every recommendation tied to your LTV/CAC inputs
  • Confidence tagging — 🟢 verified / 🟡 medium / 🔴 assumed
  • Actions have owners — "define reward structure" → assign an owner and timeline

  • launch-strategy: Use when planning the go-to-market for a product launch. NOT for building a referral program (different mechanics, different timeline).
  • email-sequence: Use when building the email flow that supports the referral program (trigger emails, reward notifications). NOT for the program design itself.
  • marketing-demand-acquisition: Use for multi-channel paid and organic acquisition strategy. NOT for referral-specific mechanics.
  • ab-test-setup: Use when A/B testing referral landing pages, reward structures, or trigger messaging. NOT for the program design.
  • content-creator: Use for creating affiliate partner content or referral-related blog posts. NOT for program mechanics.

© alirezarezvani, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in marketing-skill/skills/referral-program of alirezarezvani/claude-skills.

  • SKILL.md
  • references/measurement-framework.md
  • references/program-mechanics.md
  • scripts/referral_roi_calculator.py

Open the folder on GitHubat commit 19392f7

Compare with similar skills

Referral Program 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.

Referral Program compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Referral Program this skillalirezarezvani/claude-skills28k—~3.4kAutomated safety check: PassMIT
Referral Programfreekmurze/dotfiles1k16 repos~1.8kAutomated safety check: PassNone
Churn Preventionrongxinzy/RongxinAI1543 repos~2.6kAutomated safety check: PassMIT
100m Leadsgetagentseal/founder-playbook721—~2.3kAutomated safety check: PassMIT
Churn Preventionfreekmurze/dotfiles1k12 repos~4.4kAutomated safety check: PassNone
ReferralsCesarjoquin/Marketing-Skills1991 repos~1.9kAutomated safety check: PassMIT

Similar skills

  • Referral Program

    freekmurze/dotfiles

    When the user wants to create, optimize, or analyze a referral program, affiliate program, or word-of-mouth strategy.

    1k GitHub starsUsed in 16 repos~1.8k tokens
    Marketing & SEOAuto-check passed
  • Churn Prevention

    rongxinzy/RongxinAI

    Reduce voluntary and involuntary churn through cancel flow design, save offers, exit surveys, and dunning sequences.

    154 GitHub starsUsed in 3 repos~2.6k tokens
    Marketing & SEOAuto-check passed
  • 100m Leads

    getagentseal/founder-playbook

    Builds lead generation systems using Alex Hormozi's Core Four framework (warm outreach, content, cold outreach, paid ads), lead magnets, and Rule of 100.

    721 GitHub stars~2.3k tokensUpdated today
    Marketing & SEOAuto-check passed
  • Churn Prevention

    freekmurze/dotfiles

    When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies.

    1k GitHub starsUsed in 12 repos~4.4k tokens
    Marketing & SEOAuto-check passed
  • Referrals

    Cesarjoquin/Marketing-Skills

    When the user wants to create, optimize, or analyze a referral program, affiliate program, or word-of-mouth strategy.

    199 GitHub starsUsed in 1 repo~1.9k tokens
    Marketing & SEOAuto-check passed
  • Email Sequence Designer

    aaron-he-zhu/aaron-marketing-skills

    A skill your agent uses when the user asks to "design a welcome flow", "set up an abandoned-cart sequence", "build a light re-engagement branch inside a lifecycle flow", or "plan a cold-outbound…

    2.9k GitHub starsUsed in 2 repos~4.2k tokens
    Marketing & SEOAuto-check passed

More from alirezarezvani/claude-skills

All 342 skills in this repo
  • Agile Product Owner

    alirezarezvani/claude-skills

    Writes INVEST-checked user stories with acceptance criteria, splits epics, plans sprints from velocity and ranks the backlog with a weighted score.

    28k GitHub starsUsed in 3 repos~3.2k tokens
    Auto-check passed
  • Product Strategist

    alirezarezvani/claude-skills

    OKR cascade toolkit for product leaders: generates aligned company-to-team OKRs from five strategy types and scores how well they line up.

    28k GitHub starsUsed in 2 repos~1.8k tokens
    Auto-check passed
  • App Store Optimization

    alirezarezvani/claude-skills

    App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store.

    28k GitHub starsUsed in 1 repo~4.2k tokens
    Auto-check passed
  • AWS Solution Architect

    alirezarezvani/claude-skills

    Design AWS architectures for startups using serverless patterns and IaC templates.

    28k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Campaign Analytics

    alirezarezvani/claude-skills

    Calculates attribution, funnel and ROI figures for marketing campaigns with three Python scripts that need only the standard library.

    28k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Code to PRD

    alirezarezvani/claude-skills

    Reverse-engineers a frontend, backend or fullstack codebase into a product requirements document with per-page docs, an enum dictionary and an API inventory.

    28k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed

Categories

Questions about Referral Program

What does Referral Program do?

When the user wants to design, launch, or optimize a referral or affiliate program. Referral Program is an agent skill from alirezarezvani/claude-skills. When the user wants to design, launch, or optimize a referral or affiliate program.

When should I use Referral Program?

Referral Program fits situations like: wants to design; optimize a referral; affiliate program; they mention referral program.

How do I install Referral Program in Claude Code?

Run `npx skills add alirezarezvani/claude-skills --skill referral-program -a claude-code`. Or copy the skill folder (marketing-skill/skills/referral-program in alirezarezvani/claude-skills) into .claude/skills/referral-program in your project. Claude Code loads it when a task matches its description.

How do I install Referral Program in Codex?

Run `npx skills add alirezarezvani/claude-skills --skill referral-program -a codex`. Or copy the skill folder (marketing-skill/skills/referral-program in alirezarezvani/claude-skills) into .agents/skills/referral-program in your project. Codex loads it when a task matches its description.

Can I use Referral Program in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alirezarezvani/claude-skills --skill referral-program -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/referral-program, .gemini/skills/referral-program, .github/skills/referral-program and .opencode/skills/referral-program in your project.

What does Referral Program need to run?

Going by SKILL.md and its folder, Referral Program needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Referral Program access the network?

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.

Is Referral Program safe to install?

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.

What licence does Referral Program use?

Referral Program is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Referral Program use?

About 3.4k tokens (SKILL.md is roughly 14k 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 4.3k tokens, read only when the agent opens those files.

What are the alternatives to Referral Program?

Skills that share tags, products or a category with Referral Program: Referral Program (freekmurze/dotfiles, 1k stars), Churn Prevention (rongxinzy/RongxinAI, 154 stars), 100m Leads (getagentseal/founder-playbook, 721 stars) and Churn Prevention (freekmurze/dotfiles, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Referral Program?

alirezarezvani (a GitHub user) maintains it in alirezarezvani/claude-skills, which has 27,788 GitHub stars. The repository holds 342 skills in this directory. The repository was last updated on August 30, 2026.

Source: alirezarezvani/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.