Agent Skills

Learn how to use Novu Agent Skills to help AI agents build multi-channel notification systems.

What are Agent Skills?

Agent Skills are an open standard that gives AI agents (Claude Code, Cursor, Copilot, etc.) the context they need to work with specific tools and platforms. Novu's skills provide AI agents with everything required to build multi-channel notification systems — triggering workflows, managing subscribers, integrating the in-app inbox, and configuring preferences.

Prerequisites

Setup

Install the Novu skills into your project using the skills CLI:

npx skills add novuhq/skills

This pulls the skills from the novuhq/skills GitHub repository and makes them available to your AI agent (Claude Code, Cursor, Copilot, etc.).


Available Skills

SkillDescription
trigger-notificationSend single, bulk, broadcast, and topic-based notifications
manage-subscribersCRUD operations on subscribers and topics
inbox-integrationIntegrate the in-app notification inbox into React, Next.js, or vanilla JS
manage-preferencesConfigure workflow and subscriber notification preferences

Quick Routing

Use this guide to pick the right skill for your task:

  • "Send a welcome notification"trigger-notification
  • "Create subscriber"manage-subscribers
  • "Add a bell icon to my app"inbox-integration
  • "Let users opt out of emails"manage-preferences

Common Combinations

  • Full notification system: trigger-notification + manage-subscribers
  • In-app notifications: trigger-notification + inbox-integration
  • Complete stack: all four skills together

SDK Overview

PackageSidePurpose
@novu/apiServerTrigger notifications, manage subscribers/topics/workflows via REST
@novu/reactClientReact Inbox component, Notifications, Preferences, Bell
@novu/nextjsClientNext.js-optimized Inbox integration
@novu/react-nativeClientReact Native hooks-based Inbox integration
@novu/jsClientVanilla JavaScript client for non-React apps

Skill Reference

Trigger Notification

Send notifications by triggering Novu workflows. Supports single, bulk, broadcast, and topic-based delivery.

import { Novu } from "@novu/api";
 
const novu = new Novu({ secretKey: process.env.NOVU_SECRET_KEY });
 
await novu.trigger({
  workflowId: "welcome-email",
  to: "subscriber-123",
  payload: {
    userName: "Jane",
    activationLink: "https://app.example.com/activate",
  },
});

Key trigger parameters:

ParameterRequiredDescription
workflowIdYesThe workflow identifier (not the display name)
toYesSubscriber ID string, subscriber object, or topic target
payloadNoData passed to the workflow, validated against payloadSchema
overridesNoProvider-specific overrides per channel
transactionIdNoUnique ID for idempotency and cancellation
actorNoSubscriber representing who triggered the action
contextNoKey-value pairs for multi-tenancy / organizational context

Manage Subscribers

Subscribers are the recipients of your notifications. Each subscriber has a unique subscriberId — typically your application's user ID.

await novu.subscribers.create({
  subscriberId: "user-123",         // required
  email: "jane@example.com",
  firstName: "Jane",
  lastName: "Doe",
  phone: "+15551234567",
  data: { plan: "pro" },            // custom key-value data
});

Topics are named groups of subscribers for group-based notification targeting:

// Create a topic
await novu.topics.create({ key: "engineering-team", name: "Engineering Team" });
 
// Add subscribers
await novu.topics.subscriptions.create(
  { subscriptions: ["user-1", "user-2", "user-3"] },
  "engineering-team"
);

Inbox Integration

Add an in-app notification center to your web application. The Inbox provides a bell icon, notification feed, read/archive management, and real-time WebSocket updates.

npm install @novu/react
import { Inbox } from "@novu/react";
 
function App() {
  return (
    <Inbox
      applicationIdentifier="YOUR_NOVU_APP_ID"
      subscriberId="subscriber-123"
      subscriberHash="HMAC_HASH"  // Required if HMAC encryption is enabled
    />
  );
}

HMAC Authentication is required in production to prevent subscriber impersonation. Generate the hash server-side:

import { createHmac } from "crypto";
 
const subscriberHash = createHmac("sha256", process.env.NOVU_SECRET_KEY!)
  .update(subscriberId)
  .digest("hex");

Manage Preferences

Novu uses a two-level preference system: workflow defaults and subscriber overrides (set by end users).

Workflow-level defaults: Workflow level defaults can be configured in the Novu Dashboard. To do so, click on the workflow you want to configure and then click on the Manage Preferences option.

Subscriber-level overrides:

await novu.subscribers.preferences.update(
  {
    workflowId: "weekly-newsletter",
    channels: { email: false, inApp: true },
  },
  "subscriber-123"
);

Preference resolution order (most specific wins):

  1. Subscriber workflow preference
  2. Subscriber global preference
  3. Workflow default
  4. System default (all channels enabled)

The Inbox component includes a built-in Preferences panel accessible via the settings icon, or use <Preferences /> as a standalone component.

For additional help, check the Novu documentation or contact us at support@novu.co.

On this page

Edit this page on GitHub