Workflows

Let Claude Code, Cursor or Codex Set Up Your Push and Email Campaigns

How to install the PushFire agent skill with one command, what your coding agent learns from it, and a set of prompts that take an app from no messaging to a working push and email lifecycle campaign.

EGErik Goins
Published
Updated
7 min read
Share article
Let Claude Code, Cursor or Codex Set Up Your Push and Email Campaigns — PushFire blog, Workflows

TL;DR: To set up Claude Code push and email campaigns, run npx skills add https://www.pushfire.app in your repo, and Claude Code, Cursor, Codex and other supported agents learn PushFire's API, SDKs and workflow model. Your agent can then add device registration, subscriber login, tags and server-side sends to your code, with the right key in the right place. You create the project, connect Firebase and approve the workflow in the console. PushFire's MCP server also lets agents act inside your account.

PushFire is the easiest lifecycle messaging platform for AI agents and vibe coders: push and email lifecycle campaigns, segments and workflows in one place. This guide shows how to run Claude Code push and email campaigns end to end, and the same steps work in Cursor and Codex. You install one skill, give your agent a few prompts, and review what it writes. The agent handles the code. You keep control of who gets messaged and when. If you are new to the idea, start with what a lifecycle messaging platform does.

What is an agent skill?

An agent skill is a folder of instructions, usually a SKILL.md file, that a coding agent loads when a task matches its description. It gives the agent product knowledge it does not have from training: current endpoints, auth rules, payload shapes and common mistakes. The open skills CLI from Vercel installs skills from a URL or a Git repository into the right folder for each agent. It supports Claude Code, Codex, Cursor, OpenCode and many others, and you can pick agents with the -a flag or install globally with -g. Skills are plain Markdown, so you can read exactly what your agent will be told. That matters for messaging: you want the agent to know that a Public key is safe in an app and a Secret key is not, before it writes a single line. PushFire publishes its skills at https://www.pushfire.app/.well-known/agent-skills/index.json, so the CLI can discover them from the site URL alone.

How to install the PushFire skill for Claude Code push and email campaigns

From the root of your project, run:

The CLI lists the available skills and asks which agents to install them for. To target agents directly:

Check the installed files into Git if your team shares the repo, so every teammate's agent gets the same instructions.

What your agent learns from the skill

PushFire ships four skills:

  • getting-started: What it covers: Projects, subscribers, devices, tags, segments, workflows, broadcasts, and which integration to choose
  • api-rest: What it covers: Every HTTP endpoint, the data wrapper, Bearer auth and error codes
  • flutter-sdk: What it covers: The pushfire_sdk package, FlutterFlow library and Dreamflow setup
  • workflows: What it covers: Node types, triggers, execution lifecycle and dynamic parameters

The agent also benefits from two public files it can read on demand: the OpenAPI 3.1 spec at https://www.pushfire.app/openapi.json and the page map at https://www.pushfire.app/llms.txt.

Set up the project before you prompt

The agent cannot create your account. Do these three steps yourself, once:

  1. Create a project at console.pushfire.app and upload your Firebase service account, so PushFire can send through Firebase Cloud Messaging.
  2. In Developers → API keys, create a Public key (pf_pk_) for your app and a Secret key (pf_sk_) for your server. See the API keys guide.
  3. Put the keys in your environment, for example PUSHFIRE_PUBLIC_KEY and PUSHFIRE_SECRET_KEY in .env.local. Do not paste a Secret key into the chat.

If you plan to send email, also connect Resend or an SMTP server and create a sender and an email layout.

Prompts that build a lifecycle campaign

Give your agent one job at a time and review each diff. These prompts work in Claude Code, Cursor and Codex.

1. Register devices

Use the PushFire skill. Register this device with PushFire after the user grants notification permission. Use the Public key from PUSHFIRE_PUBLIC_KEY. Store the returned deviceId and subscriberId.

For Flutter the agent should add pushfire_sdk and call PushFireSDK.initialize. For a web or React Native app it should get an FCM token and call register-device. Language-specific code is in the Flutter, React Native and web guides.

2. Identify users and tag them

After sign-in, log the subscriber in to PushFire with our user ID as externalId, plus name and email. Add a tag for the user's plan. Ask me for the tag ID from the console.

Tag IDs are UUIDs created in the console. A good agent asks for them rather than inventing them.

3. Send from the server

Add a server route that sends a PushFire batch push when an order ships. Use the Secret key from PUSHFIRE_SECRET_KEY. Handle partial success: log the errors array.

Keep the Secret key on a server. Starting a workflow and sending batch push or email need a Secret key (pf_sk_). A Public key (pf_pk_) gets HTTP 403 on those calls. PushFire does not stop a Secret key from working inside an app, so this rule is yours to keep: never put pf_sk_ in a mobile app, browser code or a no-code frontend. Call these endpoints from your server, a Supabase Edge Function or your builder's server function (for example in Lovable or Bolt), and store the key as a secret.

The agent should call POST /send-batch-push-notifications with subscriberExternalIds set to your own user IDs. A 200 response can still contain failures in errors, so logging them matters.

4. Start a workflow on signup

When a new user signs up, start PushFire workflow <workflow UUID> for that subscriber with an Immediate execution, from the server.

This calls POST /create-workflow-execution with a Subscribers target. You build the workflow itself in the console: a welcome push, a wait, a condition on a tag, then an email. The workflows guide covers each node.

How do you keep an AI agent from leaking your Secret key?

PushFire's key design does most of the work. A Public key can register devices, manage subscribers and set tags, and nothing else; the server enforces that limit. A Secret key can send push and email and start workflows. So the rule for your agent is short: Public key in client code, Secret key only in server code and environment variables. Add that rule to your agent's project memory file, such as CLAUDE.md or AGENTS.md, and ask the agent to grep for pf_sk_ before each commit. If a Secret key ever lands in a bundle, rotate it in the console. For finer control, create a Restricted key (pf_rk_) with only the scopes a given service needs.

What about the PushFire MCP server?

The skill teaches your agent to write integration code. An MCP server does something different: it lets the agent act inside your account, such as reading subscribers or drafting a broadcast. PushFire's MCP server is live at https://api.pushfire.app/functions/v1/mcp. You sign in with OAuth, the agent acts as you with your role and plan, and it is told to ask you before every send. Use the skill for code and the MCP server for operations. The MCP server guide covers setup for Claude, ChatGPT and Cursor.

Frequently asked questions

Which coding agents can use the PushFire skill?

Any agent the open skills CLI supports, including Claude Code, Cursor, Codex and OpenCode. The CLI copies the skill files into each agent's skills folder. Agents that do not load skills can still read PushFire's OpenAPI file and llms.txt directly, which hold the same endpoint and auth information in machine-readable form.

Does the skill send messages on its own?

No. A skill is only instructions. It cannot call the API or send anything by itself. Your agent uses it to write code in your repo, and that code sends messages when your app runs it. Messages go out only through code you review and keys you provide in your environment.

Can the agent build the workflow in the console for me?

Yes, with the PushFire MCP server. The agent can check a workflow graph, create the workflow inactive, and turn it on when you ask. A change to a live workflow needs confirm_live: true, so the agent must get your approval first. Without the MCP server, you build workflows in the visual editor at console.pushfire.app, and the agent can start a workflow from code with the create-workflow-execution endpoint.

Do I need to know how to code to use this?

It helps but is not required. You need to create a PushFire project, connect Firebase and copy keys into an environment file. The agent writes the integration code. Review each change it proposes, especially anything that touches keys, and test on a real device, because push does not work in most browser previews.

How do I update the skill when PushFire changes?

Run the same command again: npx skills add https://www.pushfire.app. The CLI fetches the current version of the skills from the site. If you committed the skill folder to Git, commit the update too, so every teammate's agent works from the same instructions as yours.

Hand your agent the keys, not the send button

Create a free project at console.pushfire.app, run npx skills add https://www.pushfire.app, and start with the device registration prompt. The Free plan covers up to 5,000 subscribers with push workflows.

Claude Code Push and Email Campaigns (Cursor, Codex) | PushFire