clone-campaign
Skill8 starsChanged 6 months agoMITView on GitHub
Clone a Smartlead campaign by running the 6-step API recipe (Smartlead has no native clone endpoint). Creates a new campaign and copies schedule, settings, sequences, sender mailboxes, and optionally leads from the source. Use when the user wants to duplicate a campaign, run a V2/V3 of a winning campaign, or copy a campaign template to a new audience.
In this repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- audit-mailbox-configSkill
- check-deliverabilitySkill
- compare-campaignsSkill
- create-campaignSkill
- launch-campaignSkill
- smartlead-onboardingSkill
- spam-testSkill
- upload-leadsSkill
- warmup-mailboxesSkill
- weekly-reportSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 78
Only if user asked for --with-leads.
- Very specific: line 89
The clone is NOT atomic: If step 4 fails you have an orphan campaign with schedule+settings but no sequences.
- Very specific: line 91
Lead records are shared across campaigns by email: If you copy leads, custom_fields from the source propagate to the new campaign too — see …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/clone-campaign
Before running: verify exact flag names with
smartlead campaigns <subcommand> --help. Flag shapes shown below are illustrative — confirm against the actual CLI.
You're cloning an existing campaign. Smartlead has no clone endpoint. Cloning is a 6-step sequence of real API calls. The CLI exposes each step as its own subcommand — chain them.
What you need from the user
- Source campaign ID to copy from
- New campaign name
- Whether to also copy leads (default: NO — V2 usually wants a fresh audience)
The 6 steps
Step 1 — Create the new campaign shell
smartlead campaigns create --name "<new name>"Capture the returned id as $NEW_ID. Subsequent steps need it.
Step 2 — Copy the schedule
Pull source:
smartlead campaigns get $SRC_ID --output json | jq '.scheduler'Apply to new:
smartlead campaigns schedule $NEW_ID \
--timezone "..." --days "..." \
--start-hour "..." --end-hour "..." \
--min-time-between-emails N --max-new-leads-per-day NStep 3 — Copy the settings
Pull source settings, then POST to the new campaign:
smartlead campaigns settings $NEW_ID [flags from source]⚠️ Translate field names before posting — see docs/learnings/settings-api-quirks.md:
DONT_EMAIL_OPEN→DONT_TRACK_EMAIL_OPENai_categorisation_optionslabels → numeric IDs (1-7)seq_delay_details.delayInDays→delay_in_days
Step 4 — Copy the sequences
Pull source sequences:
smartlead campaigns sequences $SRC_ID --output jsonFor each step, POST to the new campaign. The delayInDays → delay_in_days translation applies here too.
Step 5 — Assign sender mailboxes
Pull source assignments:
smartlead campaigns email-accounts $SRC_ID --output jsonThen re-assign to new:
smartlead campaigns email-accounts $NEW_ID --add [ids from source]Step 6 — Upload leads (optional)
Only if user asked for --with-leads. Usually skip — V2 wants a fresh audience.
If yes:
smartlead leads list $SRC_ID --output json > leads.json
# Convert to upload format, then:
smartlead leads add $NEW_ID --csv leads.csvImportant caveats
- The clone is NOT atomic. If step 4 fails you have an orphan campaign with schedule+settings but no sequences. Decide whether to delete (
smartlead campaigns delete $NEW_ID) or fix-forward. - Webhook configurations don't clone. Reattach manually with
smartlead webhooks ...if the source has webhooks. - Lead records are shared across campaigns by email. If you copy leads,
custom_fieldsfrom the source propagate to the new campaign too — seedocs/learnings/campaign-cloning-runbook.md. - Always run
smartlead campaigns get $NEW_IDafter each step to verify state before moving on.
Reference
Full recipe with field translation details: docs/learnings/campaign-cloning-runbook.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

