# referral-program

> A Claude Code skill that designs referral and affiliate programs — incentive structure, viral loops, ambassador tiers, payout mechanics, attribution — with the math to know if it's actually working.

**Use case**: Design a referral program that compounds

**Canonical URL**: https://agentcookbooks.com/skills/referral-program/

**Topics**: claude-code, skills, marketing, growth

**Trigger phrases**: "referral program", "affiliate program", "viral loop", "refer a friend", "ambassador"

**Source**: [Corey Haines](https://github.com/coreyhaines31/marketingskills/tree/main/skills/referral-program)

**License**: MIT

---

## What it does

`referral-program` is a Claude Code skill from Corey Haines's [marketing-skills repo](https://github.com/coreyhaines31/marketingskills). It turns Claude into a referral-program designer who handles the full design — incentive structure (give X, get Y), viral coefficient math, ambassador tiers, payout mechanics, attribution — and the operational stuff that kills programs (fraud rules, payout cadence, T&Cs). The skill activates when you mention "referral", "affiliate", "viral loop", "refer a friend", or "ambassador".

The output of a session is a referral-program plan: incentive structure with rationale, viral-coefficient math, attribution rules, fraud detection thresholds, ambassador tier ladder, payout cadence, T&Cs outline, and the success metric that determines whether the program is earning its overhead.

## When to use it

Reach for it when:

- Customers refer organically and you want to reward and amplify it
- You're considering a paid affiliate program and want the math first
- An existing referral program is bleeding budget without producing real growth

When *not* to reach for it:

- Your retention rate is bad — referrals from churning users compound the wrong direction
- You don't have a way to attribute referrals; the program will produce "untracked" growth no one can defend

## Install

The skill is distributed via Corey Haines's [marketing-skills repo](https://github.com/coreyhaines31/marketingskills). Install via the repo's recommended path — copy the [`referral-program` SKILL.md](https://github.com/coreyhaines31/marketingskills/tree/main/skills/referral-program) into your project's `.claude/skills/referral-program/` directory, or use the repo's plugin install if you've set it up.

Once installed, the skill activates on the trigger phrases above. The first time it runs, it will check for `.agents/product-marketing-context.md` (or `.claude/product-marketing-context.md`) — populating that file with your product context first dramatically improves output quality across all of Haines's marketing skills.

## What a session looks like

A typical session has three phases:

1. **Incentive design.** Two-sided (give X, get Y) is the default; the skill will argue against one-sided unless you make a strong case. Reward type (cash, credit, product) tied to your margin economics.
2. **Math + attribution.** Viral coefficient calculation, payback math, attribution window, fraud detection thresholds. Without these, the program is hope, not strategy.
3. **Tiered ambassador layer.** For high-volume referrers, a separate tier with better rewards, more visibility, sometimes content-creation perks. The 1% who drive 80% of referrals get treated like ambassadors, not customers.

The discipline that makes it work: math before mechanics. A referral program with bad payback math doesn't break — it just slowly bleeds margin while looking healthy.

## Receipts

Honest reporting on what `referral-program` produces and where it has limits:

**Where it works well:**
- Two-sided incentive design beats one-sided in almost every category — the skill defaults to it for good reason
- Viral-coefficient math separates programs that scale from programs that linger near 1.0 forever
- Fraud-detection thresholds catch the inevitable abuse before it scales

**Where it backfires:**
- Programs need a referral *culture* — not every product has one, and incentives can't manufacture it
- Tracking attribution accurately is the wall most teams hit; the skill scopes it but tooling matters

**Pattern that works:** soft-launch the program to a segment first (your top NPS detractors, ironically, often refer well after a save), measure the coefficient, then open it broadly only if the math works.

## Source and attribution

Originally written by [Corey Haines](https://corey.co). The canonical SKILL.md and any supporting files live in the [`referral-program` folder](https://github.com/coreyhaines31/marketingskills/tree/main/skills/referral-program) of his [marketing-skills repository](https://github.com/coreyhaines31/marketingskills).

License: MIT. You can install, adapt, and redistribute the skill, with attribution preserved.

This page documents the skill from a practitioner's perspective. For the formal spec and any updates, defer to the source repo.