referral-viral-loops
Build referral mechanics with dual-sided rewards, unique tracking links, viral coefficient optimization, and anti-fraud controls for referral abuse
by finsilabs★ 69 GitHub stars
Install referral-viral-loops in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Referral Viral Loops
Overview
Word-of-mouth referral programs are one of the lowest-cost customer acquisition channels — referred customers have 37% higher retention rates and 25% higher LTV than non-referred customers. A dual-sided referral (reward both the referrer and the new customer) typically outperforms one-sided rewards by 2–3×. Dedicated referral apps (ReferralCandy, Friendbuy, Yotpo Loyalty) handle link generation, reward fulfillment, and fraud controls without custom code.
When to Use This Skill
- When CAC is high and word-of-mouth is underutilized
- When existing customers frequently refer friends informally but there is no structured program to track and reward it
- When needing to scale a referral program that has been running manually
- When wanting to calculate K-factor and optimize the program's viral coefficient
Core Instructions
Step 1: Choose the right referral platform
| Platform | Best For | Shopify | WooCommerce | BigCommerce | Price |
|---|---|---|---|---|---|
| ReferralCandy | Simple setup, all major platforms | App Store | Plugin | App Marketplace | $59+/mo |
| Friendbuy | Mid-market DTC, A/B testing rewards | App Store | Via JS | Via JS | $249+/mo |
| Yotpo Loyalty | Brands already using Yotpo | App Store | Limited | App Marketplace | $199+/mo |
| Smile.io Referrals | Already using Smile.io for loyalty | App Store | Plugin | App Marketplace | Included in $49/mo plan |
| Rewardful | SaaS + ecommerce via Stripe | Via Stripe | Via Stripe | Via Stripe | $49+/mo |
| AffiliateWP | WooCommerce-native | — | Plugin | — | $149/yr |
Recommendation: Use ReferralCandy for most stores — quick setup, dual-sided rewards built in, fraud detection included, and competitive pricing. If you are already using Smile.io for loyalty, add their referral module instead of a separate app.
Step 2: Design your referral program structure
Before installing anything, define the reward structure:
Dual-sided reward (recommended):
- Referrer reward: $10 store credit for every successful referral (paid after refund window)
- Referee reward (new customer): 15% off first order, no minimum
Single-sided reward (simpler but lower share rate):
- Referrer reward only: $15 store credit
Minimum order for referral to qualify: $30 (prevents micro-order gaming)
Refund window: Wait 7–14 days after the referee's order before granting the referrer reward — this prevents rewards on returned orders.
Step 3: Set up your referral program
Shopify with ReferralCandy
- Install ReferralCandy from the Shopify App Store
- Go to ReferralCandy → Program → Rewards and configure:
- Referrer reward: "$10 store credit" (or cash via PayPal)
- Referee reward: "15% off first order" (ReferralCandy creates a unique discount code per referral link)
- Minimum order: $30
- Go to ReferralCandy → Program → Fraud Settings and enable:
- Block self-referrals
- Flag same-IP conversions for review
- Set maximum referrals per customer per month (10)
- Go to ReferralCandy → Integrations and connect Klaviyo — this allows referral events to trigger Klaviyo flows
- ReferralCandy automatically:
- Generates a unique referral link per customer (e.g.,
yourstore.com/?via=sarah123) - Displays the referral widget on the post-purchase page
- Sends referral invitation emails to new customers after purchase
- Tracks clicks, signups, and conversions per referrer
- Generates a unique referral link per customer (e.g.,
- Go to ReferralCandy → Promote and add the referral widget to your account dashboard and post-purchase confirmation page
Shopify with Smile.io Referrals
- Go to Smile.io → Programs → Referrals
- Enable the referral program and configure:
- Referrer reward: points or store credit
- Referee reward: discount code sent automatically when they click the referral link
- Go to Smile.io → Rewards Panel to customize how the referral link appears in the loyalty widget
WooCommerce with AffiliateWP
- Install AffiliateWP ($149/yr) from the WooCommerce marketplace
- Go to AffiliateWP → Settings → General and configure:
- Commission rate: fixed amount ($10) or percentage
- Cookie expiration: 30 days (referral attribution window)
- Go to AffiliateWP → Affiliates → Add Affiliate to manually add customers, or enable self-registration so customers can join as affiliates
- AffiliateWP generates a unique affiliate link per referrer:
yourstore.com/?ref=AFFILIATE_ID - For referee discount: create a WooCommerce coupon code and link it to the referral program (AffiliateWP has a coupon integration add-on)
- For fraud controls: go to AffiliateWP → Settings → Advanced and enable IP address duplicate detection
Alternative: Install ReferralCandy for WooCommerce (plugin) for a simpler dual-sided setup.
BigCommerce with ReferralCandy
- Install ReferralCandy f
Allowed tools
Tools this skill is permitted to call.
- 01
claude-code - 02
cursor - 03
gemini-cli - 04
copilot - 05
codex-cli
Bundled files
- evals/fraud-detection-and-viral-coefficient-an/criteria.json
- evals/fraud-detection-and-viral-coefficient-an/task.md
- evals/referral-attribution-and-reward-fulfillm/criteria.json
- evals/referral-attribution-and-reward-fulfillm/task.md
- evals/referral-link-generation-and-data-model/criteria.json
- evals/referral-link-generation-and-data-model/task.md
- tile.json
FAQ
What does the referral-viral-loops skill do?
Build referral mechanics with dual-sided rewards, unique tracking links, viral coefficient optimization, and anti-fraud controls for referral abuse
How do I install the referral-viral-loops skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the referral-viral-loops skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
gtm-enterprise-account-planning
GitHubStrategic account planning and execution for enterprise deals. Use when planning complex sales cycles, managing multiple stakeholders, applying MEDDICC…
gtm-partnership-architecture
GitHubBuild and scale partner ecosystems that drive revenue and platform adoption. Use when building partner programs from scratch, tiering partnerships, managing…
landing-page-conversion-audit
GitHubAudit a landing page, sales page or checkout page for conversion leaks and return a fix list ordered by expected revenue impact. Use when asked to review…
power-platform-architect
GitHubUse this skill when the user needs to transform business requirements, use case descriptions, or meeting transcripts into a technical Power Platform solution…