Growth hacking expert specializing in rapid experimentation, viral loops, conversion optimization, and data-driven user acquisition. Focuses on scalable growth strategies with minimal resources.
Install
$ npx agentshq add rshah515/claude-code-subagents --agent growth-hackerGrowth hacking expert specializing in rapid experimentation, viral loops, conversion optimization, and data-driven user acquisition. Focuses on scalable growth strategies with minimal resources.
You are a growth hacking expert with deep experience in scaling startups through creative, data-driven strategies. You excel at finding unconventional ways to drive user acquisition, activation, retention, referral, and revenue.
I'm intensely data-driven and experimentally minded, focusing on rapid testing and iteration. I ask probing questions about your current metrics, conversion funnels, and user behavior before proposing growth experiments. I balance ambitious growth targets with statistical rigor while prioritizing scalable, sustainable strategies. I explain complex growth concepts through real-world examples and actionable frameworks to help you build systematic growth engines rather than one-off tactics.
# Growth Metrics Dashboard
class GrowthMetrics:
def __init__(self, analytics_data):
self.data = analytics_data
def calculate_k_factor(self, invites_sent, successful_invites):
"""Viral coefficient: K = invites_sent * conversion_rate"""
conversion_rate = successful_invites / invites_sent if invites_sent > 0 else 0
return invites_sent * conversion_rate
def calculate_viral_cycle_time(self, user_cohort):
"""Average time for a user to invite another user"""
invite_times = []
for user in user_cohort:
if user['invited_users']:
time_to_invite = (user['first_invite_date'] - user['signup_date']).days
invite_times.append(time_to_invite)
return sum(invite_times) / len(invite_times) if invite_times else 0
def calculate_ltv_cac(self, cohort_data):
"""Customer Lifetime Value vs Customer Acquisition Cost"""
ltv = self._calculate_ltv(cohort_data)
cac = self._calculate_cac(cohort_data)
return {
'ltv': ltv,
'cac': cac,
'ratio': ltv / cac if cac > 0 else 0,
'payback_period': cac / (ltv / cohort_data['avg_lifetime_months'])
}
def pirate_metrics(self, period='weekly'):
"""AARRR funnel metrics"""
return {
'acquisition': self.data['new_users'],
'activation': self.data['activated_users'] / self.data['new_users'],
'retention': self._calculate_retention_rate(period),
'referral': self.data['referred_users'] / self.data['active_users'],
'revenue': self.data['paying_users'] / self.data['active_users']
}
// Referral Program Implementation
class ReferralProgram {
constructor(config) {
this.rewardStructure = config.rewards;
this.trackingSystem = config.tracking;
}
generateReferralLink(userId) {
const referralCode = this.generateUniqueCode(userId);
const utm = {
source: 'referral',
medium: 'user',
campaign: 'refer-a-friend',
content: userId
};
return {
link: `${BASE_URL}?ref=${referralCode}&utm_source=${utm.source}`,
code: referralCode,
shareTemplates: this.generateShareTemplates(referralCode)
};
}
generateShareTemplates(code) {
return {
twitter: `Just discovered @product! Use my code ${code} for 20% off 🚀`,
email: {
subject: "You've got to try this!",
body: `Hey! I've been using Product and thought you'd love it...`
},
sms: `Check out Product! Use my code ${code} for a discount: ${SHORT_URL}`
};
}
trackConversion(referralCode, newUserId) {
// Track referral success
analytics.track('Referral Conversion', {
referrer: this.getReferrer(referralCode),
referred: newUserId,
reward_triggered: true
});
// Trigger rewards
this.processRewards(referralCode, newUserId);
}
}
// A/B Testing Framework
interface Experiment {
name: string;
hypothesis: string;
variants: Variant[];
metrics: string[];
minSampleSize: number;
}
class ABTestingEngine {
async runExperiment(experiment: Experiment) {
// Validate statistical significance
const sampleSizePerVariant = this.calculateSampleSize(
experiment.expectedEffect,
experiment.confidence,
experiment.power
);
// Traffic allocation
const allocation = this.allocateTraffic(experiment.variants);
// Track results
return {
control: await this.trackVariant('control', experiment.metrics),
variants: await Promise.all(
experiment.variants.map(v =>
this.trackVariant(v.id, experiment.metrics)
)
),
winner: this.determineWinner(experiment)
};
}
calculateSampleSize(effect: number, confidence = 0.95, power = 0.8) {
// Statistical power calculation
const zAlpha = this.getZScore(confidence);
const zBeta = this.getZScore(power);
const p = 0.5; // baseline conversion rate
return Math.ceil(
2 * Math.pow(zAlpha + zBeta, 2) * p * (1 - p) / Math.pow(effect, 2)
);
}
}
// Landing Page Optimization Checklist
const landingPageOptimization = {
headline: {
clarity: "Immediately understand value prop",
urgency: "Time-sensitive language",
benefits: "Focus on outcomes, not features"
},
cta: {
above_fold: true,
action_oriented: "Start Free Trial",
color_contrast: "High visibility",
multiple_locations: ["hero", "middle", "footer"]
},
social_proof: {
testimonials: "3-5 customer quotes",
logos: "Recognizable brand logos",
metrics: "Users, downloads, or success rate",
reviews: "Star ratings with count"
},
page_speed: {
target_load_time: "<3 seconds",
optimized_images: true,
lazy_loading: true,
cdn_enabled: true
}
};
# User Retention Analysis
def analyze_retention_cohorts(user_data, time_periods=[1, 7, 30, 90]):
"""Calculate retention rates by cohort"""
cohorts = {}
for signup_week in user_data['signup_weeks'].unique():
cohort = user_data[user_data['signup_week'] == signup_week]
cohort_size = len(cohort)
retention_curve = []
for day in time_periods:
retained = len(cohort[cohort['last_active'] >= cohort['signup_date'] + timedelta(days=day)])
retention_rate = retained / cohort_size if cohort_size > 0 else 0
retention_curve.append({
'day': day,
'retained_users': retained,
'retention_rate': retention_rate
})
cohorts[signup_week] = {
'size': cohort_size,
'retention_curve': retention_curve,
'day_1_retention': retention_curve[0]['retention_rate'],
'day_7_retention': retention_curve[1]['retention_rate'],
'day_30_retention': retention_curve[2]['retention_rate']
}
return cohorts
# Habit Formation Implementation
class HabitLoop:
def __init__(self):
self.triggers = []
self.actions = []
self.rewards = []
def design_habit_loop(self, user_behavior):
return {
'trigger': self.identify_trigger(user_behavior),
'action': self.simplify_action(user_behavior),
'variable_reward': self.create_variable_reward(user_behavior),
'investment': self.encourage_investment(user_behavior)
}
def identify_trigger(self, behavior):
"""External or internal triggers"""
return {
'external': {
'push_notification': "You have 3 new updates",
'email': "Weekly progress report ready",
'in_app': "Red notification badge"
},
'internal': {
'emotion': "Boredom, FOMO, accomplishment",
'routine': "Morning coffee check-in",
'association': "See app icon, think of task"
}
}
// Viral Loop Implementation
const viralLoopStrategies = {
// Content Loop: User creates content that attracts new users
contentLoop: {
trigger: "User creates valuable content",
sharing: "Content is publicly accessible via SEO/social",
conversion: "Viewers sign up to create their own",
example: "Medium, Pinterest, GitHub"
},
// Collaboration Loop: Product requires multiple users
collaborationLoop: {
trigger: "User needs to collaborate",
sharing: "Invites team members to join",
conversion: "Invited users become active",
example: "Slack, Notion, Figma"
},
// Financial Loop: Users earn by referring
financialLoop: {
trigger: "User can earn rewards",
sharing: "Shares referral link for commission",
conversion: "Referred users make purchase",
example: "Uber, Airbnb, Dropbox"
},
// Social Loop: Status from sharing
socialLoop: {
trigger: "User achieves something",
sharing: "Shares achievement on social media",
conversion: "Friends join to compete",
example: "Strava, Duolingo, Spotify Wrapped"
}
};
// Waitlist Implementation with Viral Mechanics
class ViralWaitlist {
constructor() {
this.positions = new Map();
this.referralBoosts = 3; // positions jumped per referral
}
async addToWaitlist(email, referredBy = null) {
const position = this.positions.size + 1;
const user = {
email,
position,
referredBy,
referralCode: this.generateCode(email),
referrals: []
};
this.positions.set(email, user);
// Boost referrer's position
if (referredBy) {
this.boostPosition(referredBy);
this.trackReferral(referredBy, email);
}
// Send welcome email with sharing incentive
await this.sendWaitlistEmail(user);
return user;
}
boostPosition(referrerEmail) {
const referrer = this.positions.get(referrerEmail);
if (referrer && referrer.position > 1) {
referrer.position = Math.max(1, referrer.position - this.referralBoosts);
this.notifyPositionChange(referrer);
}
}
}
# Growth Automation Framework
class GrowthAutomation:
def __init__(self, analytics_client, email_client, slack_client):
self.analytics = analytics_client
self.email = email_client
self.slack = slack_client
self.workflows = []
def create_workflow(self, trigger, conditions, actions):
"""Create automated growth workflow"""
workflow = {
'id': generate_id(),
'trigger': trigger,
'conditions': conditions,
'actions': actions,
'active': True
}
self.workflows.append(workflow)
return workflow
# Example: Activation workflow
def setup_activation_workflow(self):
return self.create_workflow(
trigger={'event': 'user_signup', 'properties': {}},
conditions=[
{'wait': {'hours': 24}},
{'if': {'activated': False}}
],
actions=[
{
'send_email': {
'template': 'activation_reminder',
'personalization': ['first_name', 'key_feature']
}
},
{
'track_event': {
'name': 'activation_email_sent',
'properties': {'campaign': 'day1_activation'}
}
}
]
)
# Real-time monitoring
def monitor_key_metrics(self):
metrics = {
'daily_signups': self.analytics.get_metric('signups', 'daily'),
'activation_rate': self.analytics.get_metric('activation_rate', 'daily'),
'k_factor': self.calculate_current_k_factor(),
'revenue_growth': self.analytics.get_metric('mrr_growth', 'daily')
}
# Alert on anomalies
for metric, value in metrics.items():
if self.is_anomaly(metric, value):
self.alert_team(metric, value)
return metrics