Keitaro — Tracker Management for Affiliate Marketers
Full Keitaro tracker control via natural language. Manage campaigns, flows,
landings, reports, and optimization through the Admin API.
Quick Reference
| Command |
What it does |
/keitaro setup |
Connect to Keitaro API, verify access, save config |
/keitaro campaigns |
Create/list/update/delete campaigns |
/keitaro flows |
Manage traffic flows, weights, filters, A/B tests |
/keitaro reports |
Analytics: ROI, CR, EPC by campaign/flow/landing/geo/device |
/keitaro optimize |
Auto-optimize: kill losers, scale winners, rebalance weights |
/keitaro landing |
Generate landing/prelanding content for any vertical |
/keitaro audit |
Audit campaign setup: dead flows, broken postbacks, misconfig |
Context Intake (Required — Always Do This First)
Before any operation, ensure Keitaro API connection is configured.
Check for KEITARO_URL and KEITARO_API_KEY environment variables.
If not set, run /keitaro setup first.
Ask these questions upfront if not already known:
- Vertical — What are you running? Gambling, Crypto, Nutra, Dating, Finance,
Sweepstakes, E-commerce, Health/Medical, Insurance, Software, Other
- GEOs — Target countries
- Traffic source — Where traffic comes from (Facebook, Google, TikTok, Push, Pop, Native, SEO)
- Goal — What metric matters most? ROI, CR, EPC, Revenue, Volume
If the user provides context upfront (e.g. "create campaign for gambling DE"),
extract it and proceed without re-asking.
API Connection
All API calls go through the Keitaro Admin API:
Base URL: {KEITARO_URL}/admin_api/v1
Headers: Api-Key: {KEITARO_API_KEY}
Use the scripts/keitaro_api.py helper for all API operations.
Run via: python3 ~/.claude/skills/keitaro/scripts/keitaro_api.py <action> [args]
Orchestration Logic
When the user invokes /keitaro:
- Check API connection — verify KEITARO_URL and KEITARO_API_KEY are set
- Parse command — route to appropriate sub-skill
- Collect context — vertical, GEO, traffic source if needed
- Execute — call Keitaro API via helper script
- Report — show results in clean, readable format
For /keitaro audit, spawn subagents in parallel:
- campaign-analyzer — analyze campaign performance across all campaigns
- flow-optimizer — check flow health, dead landings, weight distribution
Reference Files
Load on-demand as needed — do NOT load all at startup.
Path resolution: All references are installed at ~/.claude/skills/keitaro/references/.
references/keitaro-api.md — Full Admin API reference (endpoints, methods, params)
references/verticals.md — Vertical-specific benchmarks (CR, EPC, ROI targets by vertical+GEO)
references/optimization-rules.md — Kill rules, scaling rules, weight distribution logic
references/landing-specs.md — Landing page specs and patterns by vertical
references/flow-patterns.md — Common flow patterns (white/offer, A/B, geo-split, device-split)
Safety System
The API helper has built-in safety at 3 levels:
Level 1: Dry Run Mode
Always use --dry-run first when unsure about an operation.
It shows exactly what API calls would be made without executing them.
python3 ~/.claude/skills/keitaro/scripts/keitaro_api.py --dry-run campaign disable --id 12
Level 2: Automatic Snapshots
Before any destructive operation (disable, delete, update stream), the script
automatically saves a JSON snapshot of the current state to ~/.claude/keitaro-snapshots/.
This allows manual rollback if something goes wrong.
Level 3: Live Traffic Detection
Before modifying a campaign or stream, the script checks for recent traffic.
If clicks were detected in the last 24h, it prints a warning:
[SAFETY] WARNING: Campaign #12 has LIVE TRAFFIC!
[SAFETY] Last 24h: 5,432 clicks, $271.60 spent
[SAFETY] Modifying this campaign may affect active traffic.
Level 4: Last-Flow Protection
Disabling the only active flow in a campaign is BLOCKED by default.
This prevents accidentally killing all traffic to a campaign.
Use --force to override (you must explicitly confirm).
Quality Gates
Hard rules — never violate these:
- ALWAYS use
--dry-run first for any destructive operation you're not 100% sure about
- Never delete a campaign without explicit user confirmation
- Never change flows on campaigns with active traffic without warning the user first
- Kill Rule: flag any flow/landing with ROI < -30% over 100+ clicks for pause
- Scale Rule: flows with ROI > 30% over 200+ clicks are candidates for weight increase
- Always verify postback URL is configured before marking campaign as ready
- Never expose API key in outputs or logs
- Always show estimated impact before bulk operations ("this will affect X campaigns")
- Never disable the last active flow in a campaign (blocks traffic completely)
- For bulk operations (more than 3 items), always run
--dry-run first, show output to user, then execute
Optimization Thresholds
Default thresholds (user can override):
| Metric |
Kill |
Warning |
Good |
Scale |
| ROI |
< -30% |
-30% to 0% |
0% to 30% |
> 30% |
| CR |
< 0.5% |
0.5% to 1% |
1% to 3% |
> 3% |
| EPC |
< $0.05 |
$0.05-0.15 |
$0.15-0.50 |
> $0.50 |
| Min clicks for decision |
100 |
— |
— |
200 |
These vary by vertical — load references/verticals.md for vertical-specific thresholds.
Sub-Skills
This skill orchestrates 7 specialized sub-skills:
- keitaro-setup — API connection and initial configuration
- keitaro-campaigns — Campaign CRUD operations
- keitaro-flows — Flow and traffic distribution management
- keitaro-reports — Analytics and reporting
- keitaro-optimize — Auto-optimization engine
- keitaro-landing — Landing page generation and management
- keitaro-audit — Campaign health audit
Output Format
All reports follow this structure:
## [Report Title]
**Period:** [date range]
**Campaigns analyzed:** [count]
### Summary
[Key findings in 2-3 bullets]
### Details
[Tables with metrics]
### Actions
- [Prioritized action items with expected impact]
1---
2name: keitaro
3description: "Keitaro tracker management for affiliate marketers and media buyers. Manage campaigns, flows, landings, reports, and optimization via natural language through Keitaro Admin API. Supports all verticals: gambling, crypto, nutra, dating, finance, sweepstakes, e-commerce. Triggers on: keitaro, tracker, campaigns, flows, landings, TDS, traffic distribution, affiliate tracking, media buying, postback, conversion tracking, ROI optimization, split test."
4argument-hint: "setup | campaigns | flows | reports | optimize | landing | audit"
5license: MIT
6metadata:
7 source: https://skillmd.com/skills/aibot88/keitaro
8---
9
10# Keitaro — Tracker Management for Affiliate Marketers
11
12Full Keitaro tracker control via natural language. Manage campaigns, flows,
13landings, reports, and optimization through the Admin API.
14
15## Quick Reference
16
17| Command | What it does |
18|---------|-------------|
19| `/keitaro setup` | Connect to Keitaro API, verify access, save config |
20| `/keitaro campaigns` | Create/list/update/delete campaigns |
21| `/keitaro flows` | Manage traffic flows, weights, filters, A/B tests |
22| `/keitaro reports` | Analytics: ROI, CR, EPC by campaign/flow/landing/geo/device |
23| `/keitaro optimize` | Auto-optimize: kill losers, scale winners, rebalance weights |
24| `/keitaro landing` | Generate landing/prelanding content for any vertical |
25| `/keitaro audit` | Audit campaign setup: dead flows, broken postbacks, misconfig |
26
27## Context Intake (Required — Always Do This First)
28
29Before any operation, ensure Keitaro API connection is configured.
30Check for `KEITARO_URL` and `KEITARO_API_KEY` environment variables.
31
32If not set, run `/keitaro setup` first.
33
34Ask these questions upfront if not already known:
35
361. **Vertical** — What are you running? Gambling, Crypto, Nutra, Dating, Finance,
37 Sweepstakes, E-commerce, Health/Medical, Insurance, Software, Other
382. **GEOs** — Target countries
393. **Traffic source** — Where traffic comes from (Facebook, Google, TikTok, Push, Pop, Native, SEO)
404. **Goal** — What metric matters most? ROI, CR, EPC, Revenue, Volume
41
42If the user provides context upfront (e.g. "create campaign for gambling DE"),
43extract it and proceed without re-asking.
44
45## API Connection
46
47All API calls go through the Keitaro Admin API:
48
49```
50Base URL: {KEITARO_URL}/admin_api/v1
51Headers: Api-Key: {KEITARO_API_KEY}
52```
53
54Use the `scripts/keitaro_api.py` helper for all API operations.
55Run via: `python3 ~/.claude/skills/keitaro/scripts/keitaro_api.py <action> [args]`
56
57## Orchestration Logic
58
59When the user invokes `/keitaro`:
60
611. **Check API connection** — verify KEITARO_URL and KEITARO_API_KEY are set
622. **Parse command** — route to appropriate sub-skill
633. **Collect context** — vertical, GEO, traffic source if needed
644. **Execute** — call Keitaro API via helper script
655. **Report** — show results in clean, readable format
66
67For `/keitaro audit`, spawn subagents in parallel:
68- **campaign-analyzer** — analyze campaign performance across all campaigns
69- **flow-optimizer** — check flow health, dead landings, weight distribution
70
71## Reference Files
72
73Load on-demand as needed — do NOT load all at startup.
74
75**Path resolution:** All references are installed at `~/.claude/skills/keitaro/references/`.
76
77- `references/keitaro-api.md` — Full Admin API reference (endpoints, methods, params)
78- `references/verticals.md` — Vertical-specific benchmarks (CR, EPC, ROI targets by vertical+GEO)
79- `references/optimization-rules.md` — Kill rules, scaling rules, weight distribution logic
80- `references/landing-specs.md` — Landing page specs and patterns by vertical
81- `references/flow-patterns.md` — Common flow patterns (white/offer, A/B, geo-split, device-split)
82
83## Safety System
84
85The API helper has built-in safety at 3 levels:
86
87### Level 1: Dry Run Mode
88**Always use `--dry-run` first** when unsure about an operation.
89It shows exactly what API calls would be made without executing them.
90```bash
91python3 ~/.claude/skills/keitaro/scripts/keitaro_api.py --dry-run campaign disable --id 12
92```
93
94### Level 2: Automatic Snapshots
95Before any destructive operation (disable, delete, update stream), the script
96automatically saves a JSON snapshot of the current state to `~/.claude/keitaro-snapshots/`.
97This allows manual rollback if something goes wrong.
98
99### Level 3: Live Traffic Detection
100Before modifying a campaign or stream, the script checks for recent traffic.
101If clicks were detected in the last 24h, it prints a warning:
102```
103[SAFETY] WARNING: Campaign #12 has LIVE TRAFFIC!
104[SAFETY] Last 24h: 5,432 clicks, $271.60 spent
105[SAFETY] Modifying this campaign may affect active traffic.
106```
107
108### Level 4: Last-Flow Protection
109Disabling the **only active flow** in a campaign is BLOCKED by default.
110This prevents accidentally killing all traffic to a campaign.
111Use `--force` to override (you must explicitly confirm).
112
113## Quality Gates
114
115Hard rules — never violate these:
116
117- **ALWAYS use `--dry-run` first** for any destructive operation you're not 100% sure about
118- Never delete a campaign without explicit user confirmation
119- Never change flows on campaigns with active traffic without warning the user first
120- Kill Rule: flag any flow/landing with ROI < -30% over 100+ clicks for pause
121- Scale Rule: flows with ROI > 30% over 200+ clicks are candidates for weight increase
122- Always verify postback URL is configured before marking campaign as ready
123- Never expose API key in outputs or logs
124- Always show estimated impact before bulk operations ("this will affect X campaigns")
125- **Never disable the last active flow** in a campaign (blocks traffic completely)
126- For bulk operations (more than 3 items), always run `--dry-run` first, show output to user, then execute
127
128## Optimization Thresholds
129
130Default thresholds (user can override):
131
132| Metric | Kill | Warning | Good | Scale |
133|--------|------|---------|------|-------|
134| ROI | < -30% | -30% to 0% | 0% to 30% | > 30% |
135| CR | < 0.5% | 0.5% to 1% | 1% to 3% | > 3% |
136| EPC | < $0.05 | $0.05-0.15 | $0.15-0.50 | > $0.50 |
137| Min clicks for decision | 100 | — | — | 200 |
138
139These vary by vertical — load `references/verticals.md` for vertical-specific thresholds.
140
141## Sub-Skills
142
143This skill orchestrates 7 specialized sub-skills:
144
1451. **keitaro-setup** — API connection and initial configuration
1462. **keitaro-campaigns** — Campaign CRUD operations
1473. **keitaro-flows** — Flow and traffic distribution management
1484. **keitaro-reports** — Analytics and reporting
1495. **keitaro-optimize** — Auto-optimization engine
1506. **keitaro-landing** — Landing page generation and management
1517. **keitaro-audit** — Campaign health audit
152
153## Output Format
154
155All reports follow this structure:
156
157```markdown
158## [Report Title]
159**Period:** [date range]
160**Campaigns analyzed:** [count]
161
162### Summary
163[Key findings in 2-3 bullets]
164
165### Details
166[Tables with metrics]
167
168### Actions
169- [Prioritized action items with expected impact]
170```