Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
Contributors/Corey Haines/Marketing loops
Agentic workflows

Marketing loops

When the user wants a recurring marketing job an AI agent runs on a cadence or trigger, or asks what a weekly or daily automated check should do, remember, and when it should stop: SEO and ads checks, churn watches, outbound triage. For one-off ideas, see marketing-ideas. For the test loop, see ab-testing.

ByCorey HainesCorey HainesMarketer turned developer and founder @ Conversion Factory
name:
marketing-loops
description:
When the user wants a recurring marketing job an AI agent runs on a cadence or trigger, or asks what a weekly or daily automated check should do, remember, and when it should stop: SEO and ads checks, churn watches, outbound triage. For one-off ideas, see marketing-ideas. For the test loop, see ab-testing.

Marketing Loops

You help set up marketing loops — repeatable marketing workflows an AI agent runs on a cadence, each with a defined trigger, a bounded set of steps, a self-check, and an explicit stopping condition. A loop turns a marketing task you'd otherwise do manually (and forget) into an always-on system: the weekly SEO opportunity scan, the ad-fatigue refresh, the churn-signal watch.

This is the operational cousin of marketing-ideas. Ideas tell you what to try once. Loops tell you what to keep doing on a schedule — and wire the other marketing skills together to do it.

How to Use This Skill

Check for product marketing context first: if .agents/product-marketing.md exists (or .claude/product-marketing.md, or the legacy product-marketing-context.md), read it before asking questions. Use that context and only ask for what's missing.

Then:

  1. Clarify the job. What outcome should this loop protect or grow? (rankings, ad efficiency, activation, retention, revenue, referrals)
  2. Pick a loop from the catalog in references/loop-catalog.md — or adapt the closest one.
  3. Tune the cadence to how fast the underlying signal actually changes (see the cadence rule below).
  4. Confirm the human checkpoint. Decide what the loop does autonomously vs. what it stages for human approval before publishing or spending — see references/loop-guardrails.md.
  5. Schedule it (see "Scheduling a loop" below).

Building more than one loop, or a whole marketing operating system? See references/loop-orchestration.md for how loops compose and the order to adopt them (start with tracking + a weekly review; don't build them all at once).

Anatomy of a Marketing Loop

Every loop in the catalog has these nine parts. When you author or adapt one, fill all of them — a loop missing a stop condition, a self-check, or its state handling is a liability, not an asset.

Part What it defines
Check cadence How often the loop looks (weekly / daily / on-trigger). Match it to signal speed.
Acts when The action condition — what must be true to actually do something, vs. just check and skip. Most runs of a good loop are "checked, nothing to do."
Purpose The one outcome this loop exists to move.
Skills used Which marketing skills the loop orchestrates each iteration.
Loop body The ordered steps run each iteration.
Self-check The verification done before acting — so the loop doesn't act on noise, seasonality, or a tracking bug.
State / idempotency What the loop remembers between runs: last-run marker, dedupe key, cooldown window, "already handled" set. Without this, loops double-act, re-nag the same people, or re-alert the same thing. Non-negotiable for anything scheduled — see references/loop-state.md for where state lives and the idempotency patterns.
Stop / bail-out When the loop skips, halts, escalates to a human, or disables itself — plus what it does on error. Every loop needs one, including heartbeat loops (their stop is "manual disable + error-halt," never "n/a").
Output Where results go: a file, a PR, a staged draft, a notification, a report.

The Check cadence / Acts when split matters: a churn-signal loop might check daily but only act when an account crosses a risk threshold it hasn't been contacted about inside the cooldown window. Conflating the two produces loops that either miss the window or spam.

The cadence rule

Match cadence to how fast the signal actually changes — not to how often you'd like an update.

Signal Realistic cadence Why
Rankings, backlinks, domain authority Weekly Move slowly; daily checks are noise
Ad creative fatigue, CPA drift Every 2–3 days Meta/Google feedback loops are days, not hours
Activation / onboarding funnel Weekly Needs enough signups to be significant
Churn signals Daily or on-trigger Early intervention window is short
Content / copy decay Monthly Traffic erosion is gradual
Competitor changes Weekly Pricing/positioning shifts are infrequent but matter
Social listening / mentions Daily Engagement windows close fast

Over-frequent loops are the most common failure mode: they generate busywork, burn budget, and train you to ignore the output.

When NOT to loop

Not everything should be automated on a cadence. Skip a loop — or add a mandatory human checkpoint — when:

  • Strategy or creative direction is the real work. Loops maintain and optimize; they don't set positioning, invent campaigns, or make brand calls.
  • The action publishes or spends without review. Auto-drafting an ad, email, or post is fine. Auto-publishing or auto-shifting budget needs a human checkpoint unless the user has explicitly authorized autonomous action and set guardrails (caps, allowlists).
  • The signal is too sparse to be significant. A weekly conversion-rate loop on 40 visitors/week is measuring noise.
  • It's a vanity loop. If nobody acts on the output, delete the loop. A loop that emails a dashboard nobody reads is worse than nothing.

For any loop that sends, spends, publishes, or touches personal data, apply references/loop-guardrails.md — the two-tier action model (autonomous-safe vs. gated), spend/send caps, CAN-SPAM/GDPR/FTC/ToS rules, the always-escalate list, and a required kill switch.

Scheduling a loop

These loops are agent-agnostic — the body works in any agent. The scheduling depends on your environment:

  • Claude Code — native options: /loop (self-paced, until a condition), ScheduleWakeup (dynamic pacing that reacts to state), and CronCreate (fixed cron schedule). If you have a loop-mechanics skill such as loopify installed, use it to choose between them and tune delays; otherwise the guidance below is enough.
  • Any agent + cron — wrap the loop body as a scheduled prompt/script (0 9 * * 1 for Mondays 9am, etc.).
  • Manual cadence — for high-judgment loops, "run this skill every Monday" is a perfectly good loop. The value is the repeatable body, not the automation.

Default to time-of-day cron for review-style loops (weekly review, ranking watch) and dynamic pacing for monitor-until-threshold loops (churn watch, launch-day tracking).

The Catalog

references/loop-catalog.md holds the full library — 61 marketing loops with thorough funnel coverage: SEO & Content, Paid, Earned/Social/Partnerships, Outbound, Activation, Retention, Revenue, Referral & Advocacy, and Ongoing Ops. Each is a complete, adaptable spec. Start there, pick the closest match, and tune it to the user's product, stage, and tooling.

Running a whole channel: the SEO operator

When the user wants an agent to own SEO for a site rather than run one loop, use references/seo-operator.md. It bundles the SEO loops (site health, claim drift, striking-distance push, AI-answer check, keyword gap, content decay, competitor watch, and more) into one schedule with shared memory in .agents/seo/, a first-run checklist, operating rules, a writing gate, and a one-screen weekly report.

Running outbound: the outbound operator

For an agent running day-to-day outbound (signal sweeps, staged outreach, reply triage, sending-domain health, weekly sequence retros), use references/outbound-operator.md. It sets the brief, approved claims, approval rules by tier, shared memory in .agents/outbound/, and a weekly report.

Authoring a new loop

When nothing in the catalog fits, author a new loop from references/loop-template.md — a copy-paste template with fill-in prompts, a worked before/after example, and a ship checklist. Fill all nine anatomy parts; if you can't answer the self-check, state/idempotency, and stop/bail-out concretely, the loop isn't ready to run.

Anti-patterns

  • Looping without a stop condition → runaway spend or infinite churn.
  • Same cadence for every loop → most run too often and get ignored.
  • No self-check → the loop acts on noise, seasonality, or a tracking bug.
  • No human checkpoint on spend/publish actions.
  • Building 10 loops at once → start with one, prove it earns its keep, then add the next.

Banned vocabulary

Avoid: "set it and forget it," "fully autonomous marketing," "AI does everything," "10x on autopilot," "growth hacking machine." Loops are disciplined systems with checkpoints, not magic. Describe them honestly.

Related Skills

  • marketing-ideas — one-off tactics and inspiration (what to try). Loops operationalize the ones worth repeating.
  • ab-testing — the experimentation loop specifically (hypothesis → test → promote winner → repeat).
  • analytics — most loops read from analytics to decide whether to act.
  • reverse-engineer-marketing — the growth-move watch loop keeps a competitor teardown current, and teardown plays name the loop that sustains each one.
  • Individual channel skills (ads, seo-audit, emails, social, churn-prevention, pricing, referrals) — the loop bodies orchestrate these.

More in this playbook

Agentic workflowsMIT Jag ValaiyapathyJag ValaiyapathyDirector @ Salesforce

Sf ai agentforce

Agentforce Builder metadata path for Builder-managed topics/actions, Prompt Builder templates, GenAiFunction/GenAiPlugin, Models API, and custom Lightning types. TRIGGER when: user maintains or configures Builder metadata agents, creates topics/actions, works with Prompt Builder templates, or touches .genAiFunction, .genAiPlugin, or .genAiPromptTemplate metadata XML files. DO NOT TRIGGER when: Agent Script DSL .agent files (use sf-ai-agentscript), agent testing (use sf-ai-agentforce-testing), or persona design (use sf-ai-agentforce-persona).

Agentic workflowsMIT Jag ValaiyapathyJag ValaiyapathyDirector @ Salesforce

Sf ai agentforce grid

Use this skill whenever users want to build, inspect, debug, automate, or publish workflows in Agentforce Grid (AI Workbench) using Salesforce plus the Grid MCP or direct Grid REST calls. Trigger it for Grid workbook creation, worksheet setup, Object/Reference/AI/Agent/AgentTest/Evaluation/PromptTemplate/InvocableAction column design, prompt drafting inside Grid, worksheet execution troubleshooting, Grid YAML `apply_grid` specs, and Windows-specific Grid setup issues. Also use it when users mention AI Workbench, Grid Studio, workbook IDs, worksheet IDs, Grid Connect, or ask for recipes like "top opportunities with AI email drafts", "agent test suite in Grid", or "build this worksheet from YAML". Do not use it for generic Salesforce work unrelated to Agentforce Grid.

Agentic workflowsMIT Jag ValaiyapathyJag ValaiyapathyDirector @ Salesforce

Sf ai agentforce observability

Agentforce session tracing extraction and analysis. TRIGGER when: user extracts STDM data from Data Cloud, analyzes agent session traces, debugs agent conversations via telemetry, or works with .parquet files from Agentforce. DO NOT TRIGGER when: testing agents (use sf-ai-agentforce-testing), Apex debug logs (use sf-debug), or building agents (use sf-ai-agentforce).

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.