100xprism 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +196 -0
- package/VERSION +1 -0
- package/adapters/antigravity.sh +14 -0
- package/adapters/claude-code.sh +160 -0
- package/adapters/codex.sh +13 -0
- package/adapters/copilot.sh +13 -0
- package/adapters/cursor.sh +13 -0
- package/adapters/gemini.sh +13 -0
- package/adapters/lib/__pycache__/modules.cpython-312.pyc +0 -0
- package/adapters/lib/modules.py +592 -0
- package/adapters/lib/shared.sh +83 -0
- package/adapters/lib/sync_plugins.py +113 -0
- package/adapters/windsurf.sh +15 -0
- package/bin/100xprism.js +29 -0
- package/get.sh +24 -0
- package/install-project.sh +82 -0
- package/install.sh +281 -0
- package/lib/adapters/windows.js +429 -0
- package/lib/bootstrap.js +33 -0
- package/lib/init.js +19 -0
- package/lib/install.js +18 -0
- package/lib/migrate.js +52 -0
- package/lib/platform.js +22 -0
- package/lib/update.js +29 -0
- package/modules/_lib/reference.md +77 -0
- package/modules/a11y-auditor/SKILL.md +151 -0
- package/modules/ab-test-setup/SKILL.md +266 -0
- package/modules/ab-test-setup/evals/evals.json +105 -0
- package/modules/ab-test-setup/references/sample-size-guide.md +263 -0
- package/modules/ab-test-setup/references/test-templates.md +277 -0
- package/modules/ad-creative/SKILL.md +362 -0
- package/modules/ad-creative/evals/evals.json +90 -0
- package/modules/ad-creative/references/generative-tools.md +637 -0
- package/modules/ad-creative/references/platform-specs.md +213 -0
- package/modules/ai-seo/SKILL.md +398 -0
- package/modules/ai-seo/evals/evals.json +90 -0
- package/modules/ai-seo/references/content-patterns.md +285 -0
- package/modules/ai-seo/references/platform-ranking-factors.md +152 -0
- package/modules/analytics-tracking/SKILL.md +309 -0
- package/modules/analytics-tracking/evals/evals.json +90 -0
- package/modules/analytics-tracking/references/event-library.md +260 -0
- package/modules/analytics-tracking/references/ga4-implementation.md +300 -0
- package/modules/analytics-tracking/references/gtm-implementation.md +390 -0
- package/modules/architect/SKILL.md +282 -0
- package/modules/branch/SKILL.md +105 -0
- package/modules/churn-prevention/SKILL.md +424 -0
- package/modules/churn-prevention/evals/evals.json +93 -0
- package/modules/churn-prevention/references/cancel-flow-patterns.md +316 -0
- package/modules/churn-prevention/references/dunning-playbook.md +408 -0
- package/modules/cloud-security/SKILL.md +240 -0
- package/modules/cold-email/SKILL.md +178 -0
- package/modules/cold-email/evals/evals.json +94 -0
- package/modules/cold-email/references/benchmarks.md +83 -0
- package/modules/cold-email/references/follow-up-sequences.md +81 -0
- package/modules/cold-email/references/frameworks.md +90 -0
- package/modules/cold-email/references/personalization.md +79 -0
- package/modules/cold-email/references/subject-lines.md +53 -0
- package/modules/commit/SKILL.md +195 -0
- package/modules/competitor-alternatives/SKILL.md +256 -0
- package/modules/competitor-alternatives/evals/evals.json +93 -0
- package/modules/competitor-alternatives/references/content-architecture.md +271 -0
- package/modules/competitor-alternatives/references/templates.md +223 -0
- package/modules/connect/SKILL.md +894 -0
- package/modules/content-strategy/SKILL.md +359 -0
- package/modules/content-strategy/evals/evals.json +90 -0
- package/modules/context-dump/SKILL.md +67 -0
- package/modules/copy-editing/SKILL.md +447 -0
- package/modules/copy-editing/evals/evals.json +89 -0
- package/modules/copy-editing/references/plain-english-alternatives.md +394 -0
- package/modules/copywriting/SKILL.md +271 -0
- package/modules/copywriting/evals/evals.json +111 -0
- package/modules/copywriting/references/cold-email-benchmarks.md +83 -0
- package/modules/copywriting/references/cold-email-follow-ups.md +81 -0
- package/modules/copywriting/references/cold-email-frameworks.md +90 -0
- package/modules/copywriting/references/cold-email-personalization.md +79 -0
- package/modules/copywriting/references/cold-email-subject-lines.md +53 -0
- package/modules/copywriting/references/copy-frameworks.md +344 -0
- package/modules/copywriting/references/email-copy-guidelines.md +113 -0
- package/modules/copywriting/references/email-types.md +515 -0
- package/modules/copywriting/references/natural-transitions.md +272 -0
- package/modules/copywriting/references/sequence-templates.md +168 -0
- package/modules/data-query/SKILL.md +58 -0
- package/modules/data-viz/SKILL.md +225 -0
- package/modules/db/SKILL.md +205 -0
- package/modules/db/db-engines/_router.md +24 -0
- package/modules/db/db-engines/athena.md +16 -0
- package/modules/db/db-engines/cloud-sql.md +16 -0
- package/modules/db/db-engines/databricks.md +14 -0
- package/modules/db/db-engines/oracle.md +14 -0
- package/modules/db/db-engines/postgres.md +15 -0
- package/modules/db/db-engines/presto.md +14 -0
- package/modules/db/db-engines/snowflake.md +14 -0
- package/modules/docs/SKILL.md +100 -0
- package/modules/email-sequence/SKILL.md +309 -0
- package/modules/email-sequence/evals/evals.json +93 -0
- package/modules/email-sequence/references/copy-guidelines.md +113 -0
- package/modules/email-sequence/references/email-types.md +515 -0
- package/modules/email-sequence/references/sequence-templates.md +168 -0
- package/modules/enterprise-design/SKILL.md +75 -0
- package/modules/eval/SKILL.md +105 -0
- package/modules/figma-translator/SKILL.md +49 -0
- package/modules/fix-bugs/SKILL.md +104 -0
- package/modules/form-cro/SKILL.md +429 -0
- package/modules/form-cro/evals/evals.json +90 -0
- package/modules/free-tool-strategy/SKILL.md +178 -0
- package/modules/free-tool-strategy/evals/evals.json +90 -0
- package/modules/free-tool-strategy/references/tool-types.md +217 -0
- package/modules/gate/SKILL.md +232 -0
- package/modules/grill-me/SKILL.md +59 -0
- package/modules/interaction-engineer/SKILL.md +49 -0
- package/modules/issue/SKILL.md +272 -0
- package/modules/launch/SKILL.md +345 -0
- package/modules/launch-strategy/SKILL.md +353 -0
- package/modules/launch-strategy/evals/evals.json +91 -0
- package/modules/lint/SKILL.md +126 -0
- package/modules/marketing-ideas/SKILL.md +167 -0
- package/modules/marketing-ideas/evals/evals.json +90 -0
- package/modules/marketing-ideas/references/ideas-by-category.md +366 -0
- package/modules/marketing-psychology/SKILL.md +455 -0
- package/modules/marketing-psychology/evals/evals.json +88 -0
- package/modules/motion-designer/SKILL.md +214 -0
- package/modules/onboarding-cro/SKILL.md +220 -0
- package/modules/onboarding-cro/evals/evals.json +92 -0
- package/modules/onboarding-cro/references/experiments.md +258 -0
- package/modules/orchestrate/SKILL.md +77 -0
- package/modules/page-cro/SKILL.md +182 -0
- package/modules/page-cro/evals/evals.json +111 -0
- package/modules/page-cro/references/experiments.md +248 -0
- package/modules/page-cro/references/paywall-experiments.md +164 -0
- package/modules/paid-ads/SKILL.md +315 -0
- package/modules/paid-ads/evals/evals.json +90 -0
- package/modules/paid-ads/references/ad-copy-templates.md +207 -0
- package/modules/paid-ads/references/audience-targeting.md +243 -0
- package/modules/paid-ads/references/platform-setup-checklists.md +277 -0
- package/modules/paywall-upgrade-cro/SKILL.md +227 -0
- package/modules/paywall-upgrade-cro/evals/evals.json +93 -0
- package/modules/paywall-upgrade-cro/references/experiments.md +164 -0
- package/modules/popup-cro/SKILL.md +453 -0
- package/modules/popup-cro/evals/evals.json +94 -0
- package/modules/pr/SKILL.md +203 -0
- package/modules/pricing-strategy/SKILL.md +231 -0
- package/modules/pricing-strategy/evals/evals.json +90 -0
- package/modules/pricing-strategy/references/research-methods.md +152 -0
- package/modules/pricing-strategy/references/tier-structure.md +232 -0
- package/modules/product-marketing-context/SKILL.md +241 -0
- package/modules/product-marketing-context/evals/evals.json +85 -0
- package/modules/programmatic-seo/SKILL.md +238 -0
- package/modules/programmatic-seo/evals/evals.json +94 -0
- package/modules/programmatic-seo/references/playbooks.md +308 -0
- package/modules/push/SKILL.md +202 -0
- package/modules/referral-program/SKILL.md +255 -0
- package/modules/referral-program/evals/evals.json +89 -0
- package/modules/referral-program/references/affiliate-programs.md +164 -0
- package/modules/referral-program/references/program-examples.md +143 -0
- package/modules/release/SKILL.md +293 -0
- package/modules/revops/SKILL.md +343 -0
- package/modules/revops/evals/evals.json +91 -0
- package/modules/revops/references/automation-playbooks.md +290 -0
- package/modules/revops/references/lifecycle-definitions.md +278 -0
- package/modules/revops/references/routing-rules.md +203 -0
- package/modules/revops/references/scoring-models.md +247 -0
- package/modules/sales-enablement/SKILL.md +349 -0
- package/modules/sales-enablement/evals/evals.json +91 -0
- package/modules/sales-enablement/references/deck-frameworks.md +263 -0
- package/modules/sales-enablement/references/demo-scripts.md +355 -0
- package/modules/sales-enablement/references/objection-library.md +270 -0
- package/modules/sales-enablement/references/one-pager-templates.md +208 -0
- package/modules/schema-markup/SKILL.md +179 -0
- package/modules/schema-markup/evals/evals.json +87 -0
- package/modules/schema-markup/references/schema-examples.md +398 -0
- package/modules/security/SKILL.md +138 -0
- package/modules/seo-audit/SKILL.md +412 -0
- package/modules/seo-audit/evals/evals.json +136 -0
- package/modules/seo-audit/references/ai-writing-detection.md +200 -0
- package/modules/seo-audit/references/content-patterns.md +285 -0
- package/modules/seo-audit/references/platform-ranking-factors.md +152 -0
- package/modules/signup-flow-cro/SKILL.md +359 -0
- package/modules/signup-flow-cro/evals/evals.json +88 -0
- package/modules/site-architecture/SKILL.md +357 -0
- package/modules/site-architecture/evals/evals.json +88 -0
- package/modules/site-architecture/references/mermaid-templates.md +216 -0
- package/modules/site-architecture/references/navigation-patterns.md +305 -0
- package/modules/site-architecture/references/site-type-templates.md +293 -0
- package/modules/social-content/SKILL.md +278 -0
- package/modules/social-content/evals/evals.json +92 -0
- package/modules/social-content/references/platforms.md +170 -0
- package/modules/social-content/references/post-templates.md +177 -0
- package/modules/social-content/references/reverse-engineering.md +195 -0
- package/modules/spec/SKILL.md +81 -0
- package/modules/subagents/SKILL.md +123 -0
- package/modules/techdebt/SKILL.md +71 -0
- package/modules/terminal-setup/SKILL.md +49 -0
- package/modules/test/SKILL.md +493 -0
- package/modules/test/references/e2e-patterns.md +294 -0
- package/modules/update-claude-md/SKILL.md +52 -0
- package/modules/visual-system-architect/SKILL.md +53 -0
- package/package.json +44 -0
- package/plugins/plugins.json +43 -0
- package/shell/aliases.sh +24 -0
- package/shell/check-update.sh +212 -0
- package/templates/.env.example +199 -0
- package/templates/docker-compose.md +46 -0
- package/templates/node-frontend.md +56 -0
- package/templates/node-fullstack.md +59 -0
- package/templates/python-api.md +57 -0
- package/update.sh +231 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: push
|
|
3
|
+
description: Quality gate re-runs before pushing. **Do NOT push if any gate fails.**
|
|
4
|
+
category: lifecycle
|
|
5
|
+
tier: core
|
|
6
|
+
slash_command: /push
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Push — Gate → Push → Monitor CI/CD
|
|
10
|
+
|
|
11
|
+
Quality gate re-runs before pushing. **Do NOT push if any gate fails.**
|
|
12
|
+
|
|
13
|
+
## Do NOT ask for permission. Do NOT use `--no-verify` or `--force`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Phase 0 — Quality Gate (MANDATORY)
|
|
18
|
+
|
|
19
|
+
Check gate cache first — skip if it already passed for this exact tree state. The cache
|
|
20
|
+
is keyed on a tree token (HEAD + tracked diff + untracked files), not a bare HEAD, so a
|
|
21
|
+
dirty or rebased tree never reuses a stale pass — the same token `/commit` writes and the
|
|
22
|
+
`gate-on-commit` hook checks:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
TOKEN=$(python3 ~/100xprism/hooks/gate-pass.py --print 2>/dev/null)
|
|
26
|
+
CACHED=$(cat ~/.100xprism/gate-cache 2>/dev/null)
|
|
27
|
+
[ -n "$TOKEN" ] && [ "$CACHED" = "$TOKEN" ] && echo "Gate: skipped (already passed for this tree)" && GATE_DONE=true || GATE_DONE=false
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If `GATE_DONE=false`: run the **gate** workflow. On pass, record it:
|
|
31
|
+
```bash
|
|
32
|
+
python3 ~/100xprism/hooks/gate-pass.py
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Do NOT push until gate passes. If gate fails → STOP, fix, clear cache, new commit, re-run.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Phase 0b — Code Review (pre-push)
|
|
40
|
+
|
|
41
|
+
Check review cache — skip if HEAD already reviewed by a prior `/commit` run:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
HEAD=$(git rev-parse HEAD)
|
|
45
|
+
REVIEWED=$(cat ~/.100xprism/review-cache 2>/dev/null)
|
|
46
|
+
[ "$REVIEWED" = "$HEAD" ] && echo "Review: skipped (already done for $HEAD)" && REVIEW_DONE=true || REVIEW_DONE=false
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If `REVIEW_DONE=false`, review unpushed commits now:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
PR=$(gh pr list --head "$(git branch --show-current)" --json number -q '.[0].number' 2>/dev/null)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- **PR exists** → run the **code-review** skill: `/review $PR`
|
|
56
|
+
- **No PR** → spawn **one** review Agent on `git diff origin/main..HEAD` covering the five dimensions defined in the **commit** skill Phase 5 (bugs, security, architecture, design, CLAUDE.md). Single-pass — no separate agents per dimension.
|
|
57
|
+
|
|
58
|
+
On clean review:
|
|
59
|
+
```bash
|
|
60
|
+
echo "$HEAD" > ~/.100xprism/review-cache
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Critical or High issues** → fix, new commit, clear cache, re-run gate. Do NOT push.
|
|
64
|
+
**Minor issues** → logged, non-blocking.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Phase 1 — Push
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
PROJECT_ROOT=$(git rev-parse --show-toplevel)
|
|
72
|
+
cd "$PROJECT_ROOT"
|
|
73
|
+
git push origin main
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Let any pre-push hooks run. **Never bypass with `--no-verify`.**
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Phase 2 — Handle pre-push hook failures
|
|
81
|
+
|
|
82
|
+
If the hook fails:
|
|
83
|
+
1. Read the failure output carefully
|
|
84
|
+
2. Fix the root cause — never bypass
|
|
85
|
+
3. Create a **NEW commit** with the fix (never `--amend` over a pushed commit)
|
|
86
|
+
4. Re-run the **gate** workflow to confirm fixes pass
|
|
87
|
+
5. Push again
|
|
88
|
+
|
|
89
|
+
If push is rejected (non-fast-forward):
|
|
90
|
+
```bash
|
|
91
|
+
git pull --rebase origin main
|
|
92
|
+
git push origin main
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Phase 3 — Monitor GitHub Actions & Auto-Fix
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
gh run list --limit 3
|
|
101
|
+
RUN_ID=$(gh run list --limit 1 --json databaseId -q '.[0].databaseId')
|
|
102
|
+
gh run watch "$RUN_ID"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
No timeout — watch until CI completes or fails.
|
|
106
|
+
|
|
107
|
+
### If CI passes → continue to Phase 4.
|
|
108
|
+
|
|
109
|
+
### If CI fails → Auto-fix loop (max 3 attempts)
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
gh run view "$RUN_ID" --log | tail -100
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Read the failure logs and classify the error:
|
|
116
|
+
|
|
117
|
+
**Auto-fixable failures (language-agnostic):**
|
|
118
|
+
|
|
119
|
+
| Failure type | Detection signals | Fix strategy |
|
|
120
|
+
|:-------------|:------------------|:-------------|
|
|
121
|
+
| Lint/format | ESLint, Prettier, ruff, black, gofmt, rustfmt, checkstyle, rubocop, swiftlint, ktlint | Run the **lint** workflow, commit fixes |
|
|
122
|
+
| Type errors | TypeScript (`tsc`), mypy, pyright, Go compiler, Rust compiler (`rustc`), Java (`javac`), Kotlin | Read errors, fix types, commit |
|
|
123
|
+
| Test failures | Jest, Vitest, pytest, Go test, cargo test, JUnit, RSpec, PHPUnit, XCTest, ExUnit | Read failing test, fix test or code, commit |
|
|
124
|
+
| Dependency issues | npm/yarn/pnpm lockfile, pip requirements, go.mod, Cargo.lock, Maven/Gradle, Bundler, Composer | Install/update deps, commit lockfile |
|
|
125
|
+
| Build failures | webpack, vite, esbuild, Go build, cargo build, Maven/Gradle build, make, CMake, Swift build | Read build errors, fix, commit |
|
|
126
|
+
|
|
127
|
+
**Detection logic:**
|
|
128
|
+
1. Read CI log output
|
|
129
|
+
2. Identify the tool/framework from error signatures
|
|
130
|
+
3. Match to the fix strategy above
|
|
131
|
+
4. If no match → classify as unfamiliar → escalate
|
|
132
|
+
|
|
133
|
+
**For each auto-fix attempt:**
|
|
134
|
+
1. Apply the fix
|
|
135
|
+
2. Create a new commit (never amend)
|
|
136
|
+
3. Re-run the **gate** workflow
|
|
137
|
+
4. Push again
|
|
138
|
+
5. Monitor CI again
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
CI FAILED — Attempt N/3
|
|
142
|
+
Failure: [tool/framework] [error type]
|
|
143
|
+
Fix: [what was done]
|
|
144
|
+
Action: Committing fix, re-running gate, re-pushing...
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Unfamiliar failures (escalate to human after any attempt):**
|
|
148
|
+
- Infrastructure errors (Docker build fails in CI but not locally)
|
|
149
|
+
- Permission / secrets / environment variable errors
|
|
150
|
+
- Timeout / flaky test patterns (same test passes locally)
|
|
151
|
+
- Network connectivity issues
|
|
152
|
+
- Unknown error codes or tools
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
╔══════════════════════════════════════════════════════╗
|
|
156
|
+
║ CI FAILED — ESCALATING TO HUMAN ║
|
|
157
|
+
╠══════════════════════════════════════════════════════╣
|
|
158
|
+
║ Attempts: N/3 exhausted (or unfamiliar failure) ║
|
|
159
|
+
║ Last error: [error summary] ║
|
|
160
|
+
║ Diagnosis: [root cause analysis] ║
|
|
161
|
+
║ Suggestion: [recommended fix] ║
|
|
162
|
+
╠══════════════════════════════════════════════════════╣
|
|
163
|
+
║ This requires human judgment. Auto-fix not possible. ║
|
|
164
|
+
╚══════════════════════════════════════════════════════╝
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**After 3 failed auto-fix attempts → STOP. Report all attempted fixes and escalate.**
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Phase 4 — Production verification
|
|
172
|
+
|
|
173
|
+
After all CI/CD workflows succeed:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Detect project instruction file
|
|
177
|
+
INSTRUCTION_FILE=$(for f in CLAUDE.md AGENTS.md .cursorrules .windsurfrules .github/copilot-instructions.md GEMINI.md; do [ -f "$PROJECT_ROOT/$f" ] && echo "$PROJECT_ROOT/$f" && break; done)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
1. **Health checks** — read health endpoint URLs from the project instruction file or README. Hit each and confirm HTTP 200:
|
|
181
|
+
```bash
|
|
182
|
+
[ -n "$INSTRUCTION_FILE" ] && grep -E "https?://[^ ]*/health" "$INSTRUCTION_FILE" 2>/dev/null | head -3
|
|
183
|
+
# Also try common defaults:
|
|
184
|
+
# /health, /healthz, /api/health, /status
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Retry up to 5 times with 10-second intervals (deployment may still be rolling out).
|
|
188
|
+
|
|
189
|
+
2. **Confirm deployment** — verify the deployed version matches the pushed commit if a version endpoint exists.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Output
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
=== Push Complete ===
|
|
197
|
+
Gate: ✅ ALL GATES PASSED
|
|
198
|
+
Push: <branch> → origin/<branch> ✅
|
|
199
|
+
CI/CD: ✅ All workflows passed (N auto-fixes applied)
|
|
200
|
+
Health: ✅ All endpoints responding
|
|
201
|
+
Status: SHIPPED ✅
|
|
202
|
+
```
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: referral-program
|
|
3
|
+
description: "When the user wants to create, optimize, or analyze a referral program, affiliate program, or word-of-mouth strategy. Also use when the user mentions 'referral,' 'affiliate,' 'ambassador,' 'word of mouth,' 'viral loop,' 'refer a friend,' 'partner program,' 'referral incentive,' 'how to get referrals,' 'customers referring customers,' or 'affiliate payout.' Use this whenever someone wants existing users or partners to bring in new customers. For launch-specific virality, see launch-strategy."
|
|
4
|
+
category: marketing
|
|
5
|
+
tier: on-demand
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Referral & Affiliate Programs
|
|
9
|
+
|
|
10
|
+
You are an expert in viral growth and referral marketing. Your goal is to help design and optimize programs that turn customers into growth engines.
|
|
11
|
+
|
|
12
|
+
## Before Starting
|
|
13
|
+
|
|
14
|
+
**Check for product marketing context first:**
|
|
15
|
+
If `.agents/product-marketing-context.md` exists (or `.claude/product-marketing-context.md` in older setups), read it before asking questions. Use that context and only ask for information not already covered or specific to this task.
|
|
16
|
+
|
|
17
|
+
Gather this context (ask if not provided):
|
|
18
|
+
|
|
19
|
+
### 1. Program Type
|
|
20
|
+
- Customer referral program, affiliate program, or both?
|
|
21
|
+
- B2B or B2C?
|
|
22
|
+
- What's the average customer LTV?
|
|
23
|
+
- What's your current CAC from other channels?
|
|
24
|
+
|
|
25
|
+
### 2. Current State
|
|
26
|
+
- Existing referral/affiliate program?
|
|
27
|
+
- Current referral rate (% who refer)?
|
|
28
|
+
- What incentives have you tried?
|
|
29
|
+
|
|
30
|
+
### 3. Product Fit
|
|
31
|
+
- Is your product shareable?
|
|
32
|
+
- Does it have network effects?
|
|
33
|
+
- Do customers naturally talk about it?
|
|
34
|
+
|
|
35
|
+
### 4. Resources
|
|
36
|
+
- Tools/platforms you use or consider?
|
|
37
|
+
- Budget for referral incentives?
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Referral vs. Affiliate
|
|
42
|
+
|
|
43
|
+
### Customer Referral Programs
|
|
44
|
+
|
|
45
|
+
**Best for:**
|
|
46
|
+
- Existing customers recommending to their network
|
|
47
|
+
- Products with natural word-of-mouth
|
|
48
|
+
- Lower-ticket or self-serve products
|
|
49
|
+
|
|
50
|
+
**Characteristics:**
|
|
51
|
+
- Referrer is an existing customer
|
|
52
|
+
- One-time or limited rewards
|
|
53
|
+
- Higher trust, lower volume
|
|
54
|
+
|
|
55
|
+
### Affiliate Programs
|
|
56
|
+
|
|
57
|
+
**Best for:**
|
|
58
|
+
- Reaching audiences you don't have access to
|
|
59
|
+
- Content creators, influencers, bloggers
|
|
60
|
+
- Higher-ticket products that justify commissions
|
|
61
|
+
|
|
62
|
+
**Characteristics:**
|
|
63
|
+
- Affiliates may not be customers
|
|
64
|
+
- Ongoing commission relationship
|
|
65
|
+
- Higher volume, variable trust
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Referral Program Design
|
|
70
|
+
|
|
71
|
+
### The Referral Loop
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Trigger Moment → Share Action → Convert Referred → Reward → (Loop)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Step 1: Identify Trigger Moments
|
|
78
|
+
|
|
79
|
+
**High-intent moments:**
|
|
80
|
+
- Right after first "aha" moment
|
|
81
|
+
- After achieving a milestone
|
|
82
|
+
- After exceptional support
|
|
83
|
+
- After renewing or upgrading
|
|
84
|
+
|
|
85
|
+
### Step 2: Design Share Mechanism
|
|
86
|
+
|
|
87
|
+
**Ranked by effectiveness:**
|
|
88
|
+
1. In-product sharing (highest conversion)
|
|
89
|
+
2. Personalized link
|
|
90
|
+
3. Email invitation
|
|
91
|
+
4. Social sharing
|
|
92
|
+
5. Referral code (works offline)
|
|
93
|
+
|
|
94
|
+
### Step 3: Choose Incentive Structure
|
|
95
|
+
|
|
96
|
+
**Single-sided rewards** (referrer only): Simpler, works for high-value products
|
|
97
|
+
|
|
98
|
+
**Double-sided rewards** (both parties): Higher conversion, win-win framing
|
|
99
|
+
|
|
100
|
+
**Tiered rewards**: Gamifies referral process, increases engagement
|
|
101
|
+
|
|
102
|
+
**For examples and incentive sizing**: See [references/program-examples.md](references/program-examples.md)
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Program Optimization
|
|
107
|
+
|
|
108
|
+
### Improving Referral Rate
|
|
109
|
+
|
|
110
|
+
**If few customers are referring:**
|
|
111
|
+
- Ask at better moments
|
|
112
|
+
- Simplify sharing process
|
|
113
|
+
- Test different incentive types
|
|
114
|
+
- Make referral prominent in product
|
|
115
|
+
|
|
116
|
+
**If referrals aren't converting:**
|
|
117
|
+
- Improve landing experience for referred users
|
|
118
|
+
- Strengthen incentive for new users
|
|
119
|
+
- Ensure referrer's endorsement is visible
|
|
120
|
+
|
|
121
|
+
### A/B Tests to Run
|
|
122
|
+
|
|
123
|
+
**Incentive tests:** Amount, type, single vs. double-sided, timing
|
|
124
|
+
|
|
125
|
+
**Messaging tests:** Program description, CTA copy, landing page copy
|
|
126
|
+
|
|
127
|
+
**Placement tests:** Where and when the referral prompt appears
|
|
128
|
+
|
|
129
|
+
### Common Problems & Fixes
|
|
130
|
+
|
|
131
|
+
| Problem | Fix |
|
|
132
|
+
|---------|-----|
|
|
133
|
+
| Low awareness | Add prominent in-app prompts |
|
|
134
|
+
| Low share rate | Simplify to one click |
|
|
135
|
+
| Low conversion | Optimize referred user experience |
|
|
136
|
+
| Fraud/abuse | Add verification, limits |
|
|
137
|
+
| One-time referrers | Add tiered/gamified rewards |
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Measuring Success
|
|
142
|
+
|
|
143
|
+
### Key Metrics
|
|
144
|
+
|
|
145
|
+
**Program health:**
|
|
146
|
+
- Active referrers (referred someone in last 30 days)
|
|
147
|
+
- Referral conversion rate
|
|
148
|
+
- Rewards earned/paid
|
|
149
|
+
|
|
150
|
+
**Business impact:**
|
|
151
|
+
- % of new customers from referrals
|
|
152
|
+
- CAC via referral vs. other channels
|
|
153
|
+
- LTV of referred customers
|
|
154
|
+
- Referral program ROI
|
|
155
|
+
|
|
156
|
+
### Typical Findings
|
|
157
|
+
|
|
158
|
+
- Referred customers have 16-25% higher LTV
|
|
159
|
+
- Referred customers have 18-37% lower churn
|
|
160
|
+
- Referred customers refer others at 2-3x rate
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Launch Checklist
|
|
165
|
+
|
|
166
|
+
### Before Launch
|
|
167
|
+
- [ ] Define program goals and success metrics
|
|
168
|
+
- [ ] Design incentive structure
|
|
169
|
+
- [ ] Build or configure referral tool
|
|
170
|
+
- [ ] Create referral landing page
|
|
171
|
+
- [ ] Set up tracking and attribution
|
|
172
|
+
- [ ] Define fraud prevention rules
|
|
173
|
+
- [ ] Create terms and conditions
|
|
174
|
+
- [ ] Test complete referral flow
|
|
175
|
+
|
|
176
|
+
### Launch
|
|
177
|
+
- [ ] Announce to existing customers
|
|
178
|
+
- [ ] Add in-app referral prompts
|
|
179
|
+
- [ ] Update website with program details
|
|
180
|
+
- [ ] Brief support team
|
|
181
|
+
|
|
182
|
+
### Post-Launch (First 30 Days)
|
|
183
|
+
- [ ] Review conversion funnel
|
|
184
|
+
- [ ] Identify top referrers
|
|
185
|
+
- [ ] Gather feedback
|
|
186
|
+
- [ ] Fix friction points
|
|
187
|
+
- [ ] Send reminder emails to non-referrers
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Email Sequences
|
|
192
|
+
|
|
193
|
+
### Referral Program Launch
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
Subject: You can now earn [reward] for sharing [Product]
|
|
197
|
+
|
|
198
|
+
We just launched our referral program!
|
|
199
|
+
|
|
200
|
+
Share [Product] with friends and earn [reward] for each signup.
|
|
201
|
+
They get [their reward] too.
|
|
202
|
+
|
|
203
|
+
[Unique referral link]
|
|
204
|
+
|
|
205
|
+
1. Share your link
|
|
206
|
+
2. Friend signs up
|
|
207
|
+
3. You both get [reward]
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Referral Nurture Sequence
|
|
211
|
+
|
|
212
|
+
- Day 7: Remind about referral program
|
|
213
|
+
- Day 30: "Know anyone who'd benefit?"
|
|
214
|
+
- Day 60: Success story + referral prompt
|
|
215
|
+
- After milestone: "You achieved [X]—know others who'd want this?"
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Affiliate Programs
|
|
220
|
+
|
|
221
|
+
**For detailed affiliate program design, commission structures, recruitment, and tools**: See [references/affiliate-programs.md](references/affiliate-programs.md)
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Task-Specific Questions
|
|
226
|
+
|
|
227
|
+
1. What type of program (referral, affiliate, or both)?
|
|
228
|
+
2. What's your customer LTV and current CAC?
|
|
229
|
+
3. Existing program or starting from scratch?
|
|
230
|
+
4. What tools/platforms are you considering?
|
|
231
|
+
5. What's your budget for rewards/commissions?
|
|
232
|
+
6. Is your product naturally shareable?
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Tool Integrations
|
|
237
|
+
|
|
238
|
+
For implementation, see the [tools registry](../../tools/REGISTRY.md). Key tools for referral programs:
|
|
239
|
+
|
|
240
|
+
| Tool | Best For | Guide |
|
|
241
|
+
|------|----------|-------|
|
|
242
|
+
| **Rewardful** | Stripe-native affiliate programs | [rewardful.md](../../tools/integrations/rewardful.md) |
|
|
243
|
+
| **Tolt** | SaaS affiliate programs | [tolt.md](../../tools/integrations/tolt.md) |
|
|
244
|
+
| **Mention Me** | Enterprise referral programs | [mention-me.md](../../tools/integrations/mention-me.md) |
|
|
245
|
+
| **Dub.co** | Link tracking and attribution | [dub-co.md](../../tools/integrations/dub-co.md) |
|
|
246
|
+
| **Stripe** | Payment processing (for commission tracking) | [stripe.md](../../tools/integrations/stripe.md) |
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Related Skills
|
|
251
|
+
|
|
252
|
+
- **launch-strategy**: For launching referral program effectively
|
|
253
|
+
- **email-sequence**: For referral nurture campaigns
|
|
254
|
+
- **marketing-psychology**: For understanding referral motivation
|
|
255
|
+
- **analytics-tracking**: For tracking referral attribution
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill_name": "referral-program",
|
|
3
|
+
"evals": [
|
|
4
|
+
{
|
|
5
|
+
"id": 1,
|
|
6
|
+
"prompt": "Help me design a referral program for our SaaS product. We're a $49/month project management tool with about 1,000 customers. We want to encourage word-of-mouth growth.",
|
|
7
|
+
"expected_output": "Should check for product-marketing-context.md first. Should distinguish between referral and affiliate programs (this is referral — existing customers referring peers). Should design the referral loop: trigger point (when to ask for referral), share mechanism (unique link, email invite, social share), conversion flow (what the referred person experiences), and reward structure. Should recommend incentive type: double-sided recommended (both referrer and referred get value). Should suggest specific incentives appropriate for $49/month SaaS (e.g., free month for both). Should include the launch checklist. Should recommend tool integrations (Rewardful, Tolt, etc.).",
|
|
8
|
+
"assertions": [
|
|
9
|
+
"Checks for product-marketing-context.md",
|
|
10
|
+
"Distinguishes referral from affiliate",
|
|
11
|
+
"Designs the referral loop (trigger, share, convert, reward)",
|
|
12
|
+
"Recommends double-sided incentive structure",
|
|
13
|
+
"Suggests specific incentives for the price point",
|
|
14
|
+
"Includes launch checklist",
|
|
15
|
+
"Recommends tool integrations"
|
|
16
|
+
],
|
|
17
|
+
"files": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": 2,
|
|
21
|
+
"prompt": "We have a referral program but only 5% of customers have ever referred someone. How do we increase participation?",
|
|
22
|
+
"expected_output": "Should apply the program optimization guidance. Should diagnose low participation: are customers aware of the program? Is the trigger point well-timed? Is the incentive compelling enough? Is sharing easy? Should recommend optimization tactics: better placement/visibility, timing referral asks at peak satisfaction moments, improving the incentive, simplifying the share mechanism, adding referral reminders in email and in-app. Should provide specific experiment ideas to test improvements.",
|
|
23
|
+
"assertions": [
|
|
24
|
+
"Applies program optimization guidance",
|
|
25
|
+
"Diagnoses potential causes of low participation",
|
|
26
|
+
"Checks awareness, timing, incentive, and friction",
|
|
27
|
+
"Recommends optimization tactics",
|
|
28
|
+
"Suggests timing referral asks at satisfaction moments",
|
|
29
|
+
"Provides experiment ideas"
|
|
30
|
+
],
|
|
31
|
+
"files": []
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": 3,
|
|
35
|
+
"prompt": "should we do referral or affiliate? we sell online courses for $199-499 and want to get other creators and influencers to promote us.",
|
|
36
|
+
"expected_output": "Should trigger on casual phrasing. Should apply the referral vs affiliate distinction clearly. For this use case (getting creators/influencers to promote), should recommend an affiliate program (not referral — affiliates are third-party promoters, not existing customers). Should apply the affiliate program section guidance: commission structure for digital products (typically 20-40% for courses), cookie duration, payout terms, affiliate onboarding. Should recommend affiliate platforms/tools appropriate for course creators.",
|
|
37
|
+
"assertions": [
|
|
38
|
+
"Triggers on casual phrasing",
|
|
39
|
+
"Clearly distinguishes referral from affiliate",
|
|
40
|
+
"Recommends affiliate for this use case",
|
|
41
|
+
"Provides commission structure guidance for courses",
|
|
42
|
+
"Addresses cookie duration and payout terms",
|
|
43
|
+
"Recommends appropriate affiliate platforms"
|
|
44
|
+
],
|
|
45
|
+
"files": []
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": 4,
|
|
49
|
+
"prompt": "What incentive structure works best? We've been offering $10 off for referrers but it's not working. Our product is $29/month.",
|
|
50
|
+
"expected_output": "Should evaluate the current incentive: $10 off on a $29/month product is significant but only benefits the referrer (single-sided). Should recommend testing double-sided incentives (both parties get value). Should discuss incentive types: account credit, free months, feature upgrades, cash. Should apply the tiered incentive concept (increasing rewards for multiple referrals). Should provide specific alternative incentive structures to test. Should note that incentive alone may not be the problem — placement and timing matter too.",
|
|
51
|
+
"assertions": [
|
|
52
|
+
"Evaluates current incentive structure",
|
|
53
|
+
"Identifies as single-sided and recommends double-sided",
|
|
54
|
+
"Discusses multiple incentive types",
|
|
55
|
+
"Applies tiered incentive concept",
|
|
56
|
+
"Provides specific alternatives to test",
|
|
57
|
+
"Notes incentive may not be the only issue"
|
|
58
|
+
],
|
|
59
|
+
"files": []
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": 5,
|
|
63
|
+
"prompt": "How do we measure the success of our referral program? What metrics should we track?",
|
|
64
|
+
"expected_output": "Should apply the measuring success framework. Should define key metrics: participation rate (% of customers who refer), share rate (referrals sent per participant), conversion rate (referred visitors who become customers), viral coefficient (k-factor), customer acquisition cost via referral vs other channels, referred customer LTV vs organic customer LTV. Should recommend tracking tools and dashboards. Should provide benchmark ranges for each metric.",
|
|
65
|
+
"assertions": [
|
|
66
|
+
"Applies measuring success framework",
|
|
67
|
+
"Defines participation rate, share rate, conversion rate",
|
|
68
|
+
"Includes viral coefficient / k-factor",
|
|
69
|
+
"Compares referral CAC to other channels",
|
|
70
|
+
"Compares referred customer LTV to organic",
|
|
71
|
+
"Recommends tracking approach",
|
|
72
|
+
"Provides benchmark ranges"
|
|
73
|
+
],
|
|
74
|
+
"files": []
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"id": 6,
|
|
78
|
+
"prompt": "Can you write the referral invitation emails? I need the email that goes out when someone shares their referral link.",
|
|
79
|
+
"expected_output": "Should recognize this overlaps with email writing. Should apply the referral email sequence section from the skill for referral-specific emails. However, for detailed email sequence design (multi-email nurture for referred users), should cross-reference the email-sequence skill. Should provide the referral invitation email but note that broader email sequence work is handled by email-sequence.",
|
|
80
|
+
"assertions": [
|
|
81
|
+
"Applies referral email section from the skill",
|
|
82
|
+
"Provides referral invitation email guidance",
|
|
83
|
+
"Cross-references email-sequence for broader email work",
|
|
84
|
+
"Provides specific referral email copy or template"
|
|
85
|
+
],
|
|
86
|
+
"files": []
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|