> ## Documentation Index
> Fetch the complete documentation index at: https://novu-c5de82d9-docs-homepage-redesign.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 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

* A Novu account
* Secret key from [dashboard.novu.co/settings/api-keys](https://dashboard.novu.co/settings/api-keys)

## Setup

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

```bash theme={null}
npx skills add novuhq/skills
```

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

***

## Available Skills

| Skill                                                                                   | Description                                                                |
| --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [trigger-notification](https://github.com/novuhq/skills/tree/main/trigger-notification) | Send single, bulk, broadcast, and topic-based notifications                |
| [manage-subscribers](https://github.com/novuhq/skills/tree/main/manage-subscribers)     | CRUD operations on subscribers and topics                                  |
| [inbox-integration](https://github.com/novuhq/skills/tree/main/inbox-integration)       | Integrate the in-app notification inbox into React, Next.js, or vanilla JS |
| [manage-preferences](https://github.com/novuhq/skills/tree/main/manage-preferences)     | Configure 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`

## Example prompts

Copy or open these prompts in Cursor after installing Novu skills with `npx skills add novuhq/skills`. Replace `YOUR_*` placeholders with values from your Novu dashboard.

### Core skills

<Prompt description="Send a welcome notification" icon="bot" actions={["copy", "cursor"]}>
  Send a welcome notification to subscriber-123 using the welcome-email workflow. Use @novu/api with NOVU\_SECRET\_KEY from environment variables.

  Example payload:

  ```json theme={null}
  {
    "userName": "Jane",
    "activationLink": "https://app.example.com/activate"
  }
  ```

  Follow the novu-trigger-notification skill. Do not create documentation files — implement the trigger in my existing codebase.
</Prompt>

<Prompt description="Create a subscriber" icon="bot" actions={["copy", "cursor"]}>
  Create a subscriber with subscriberId user-456, email [jane@example.com](mailto:jane@example.com), and firstName Jane in my Novu account using @novu/api.

  Follow the novu-manage-subscribers skill. Store NOVU\_SECRET\_KEY in environment variables.
</Prompt>

<Prompt description="Add a bell icon to my app" icon="bot" actions={["copy", "cursor"]}>
  Add a notification bell (Novu Inbox) to my Next.js app navbar. Install @novu/nextjs, use applicationIdentifier YOUR\_APPLICATION\_IDENTIFIER and subscriberId from my auth system.

  Follow the novu-inbox-integration skill. Place the Inbox inline in existing UI — no new pages or wrappers.

  Latest docs: [https://docs.novu.co/platform/quickstart/nextjs](https://docs.novu.co/platform/quickstart/nextjs)
</Prompt>

<Prompt description="Configure subscriber preferences" icon="bot" actions={["copy", "cursor"]}>
  Let subscriber-123 opt out of marketing email notifications while keeping transactional emails enabled.

  Follow the novu-manage-preferences skill using @novu/api with NOVU\_SECRET\_KEY from environment variables.
</Prompt>

### Additional skills

These skills are available in the [Novu documentation MCP](/platform/build-with-ai/mcp) and Mintlify-hosted skill packages:

<Prompt description="Set up a code-first workflow" icon="bot" actions={["copy", "cursor"]}>
  Set up a code-first Novu workflow using @novu/framework in my Next.js app. Create a welcome-email workflow with an email step and show me how to trigger it.

  Follow the novu-framework-integration skill. Use NOVU\_SECRET\_KEY from environment variables.

  Latest docs: [https://docs.novu.co/framework/quickstart/nextjs](https://docs.novu.co/framework/quickstart/nextjs)
</Prompt>

<Prompt description="Design a multi-channel workflow" icon="bot" actions={["copy", "cursor"]}>
  Help me design a multi-channel notification workflow for order-shipped events. Include in-app, email, and optional SMS steps with appropriate conditions.

  Follow the novu-design-workflow skill. Ask clarifying questions about my channels and subscriber preferences before proposing the workflow structure.
</Prompt>

<Prompt description="Configure workflow step content" icon="bot" actions={["copy", "cursor"]}>
  Configure the email step in my welcome-email workflow: set the subject to "Welcome, \[payload userName]!" and add a body with the activation link from the payload activationLink field.

  Follow the novu-dashboard-workflows skill. Use Liquid variables for personalization.
</Prompt>

## Common Combinations

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

## SDK Overview

| Package              | Side   | Purpose                                                             |
| -------------------- | ------ | ------------------------------------------------------------------- |
| `@novu/api`          | Server | Trigger notifications, manage subscribers/topics/workflows via REST |
| `@novu/react`        | Client | React Inbox component, Notifications, Preferences, Bell             |
| `@novu/nextjs`       | Client | Next.js-optimized Inbox integration                                 |
| `@novu/react-native` | Client | React Native hooks-based Inbox integration                          |
| `@novu/js`           | Client | Vanilla JavaScript client for non-React apps                        |

## Skill Reference

### Trigger Notification

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

<Tabs>
  <Tab title="Single">
    ```typescript theme={null}
    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",
      },
    });
    ```
  </Tab>

  <Tab title="Bulk">
    Send up to **100 events** in a single request:

    ```typescript theme={null}
    await novu.triggerBulk({
      events: [
        { workflowId: "welcome-email", to: "subscriber-1", payload: { userName: "Alice" } },
        { workflowId: "welcome-email", to: "subscriber-2", payload: { userName: "Bob" } },
      ],
    });
    ```
  </Tab>

  <Tab title="Broadcast">
    Send to **all subscribers** in the environment:

    ```typescript theme={null}
    await novu.triggerBroadcast({
      name: "system-announcement",
      payload: { message: "Scheduled maintenance at 2am UTC" },
    });
    ```
  </Tab>

  <Tab title="Topic">
    Send to all subscribers in a topic:

    ```typescript theme={null}
    await novu.trigger({
      workflowId: "project-update",
      to: [{ type: "Topic", topicKey: "project-alpha-watchers" }],
      payload: { update: "New release deployed" },
    });
    ```
  </Tab>
</Tabs>

**Key trigger parameters:**

| Parameter       | Required | Description                                                    |
| --------------- | -------- | -------------------------------------------------------------- |
| `workflowId`    | Yes      | The workflow identifier (not the display name)                 |
| `to`            | Yes      | Subscriber ID string, subscriber object, or topic target       |
| `payload`       | No       | Data passed to the workflow, validated against `payloadSchema` |
| `overrides`     | No       | Provider-specific overrides per channel                        |
| `transactionId` | No       | Unique ID for idempotency and cancellation                     |
| `actor`         | No       | Subscriber representing who triggered the action               |
| `context`       | No       | Key-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.

<Tabs>
  <Tab title="Create">
    ```typescript theme={null}
    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
    });
    ```
  </Tab>

  <Tab title="Retrieve">
    ```typescript theme={null}
    const subscriber = await novu.subscribers.retrieve("user-123");
    ```
  </Tab>

  <Tab title="Update">
    ```typescript theme={null}
    await novu.subscribers.patch(
      { firstName: "Jane", data: { plan: "enterprise" } },
      "user-123"
    );
    ```
  </Tab>

  <Tab title="Delete">
    ```typescript theme={null}
    await novu.subscribers.delete("user-123");
    ```
  </Tab>

  <Tab title="Bulk Create">
    Create up to **500 subscribers** in one request:

    ```typescript theme={null}
    await novu.subscribers.createBulk({
      subscribers: [
        { subscriberId: "user-1", email: "alice@example.com", firstName: "Alice" },
        { subscriberId: "user-2", email: "bob@example.com", firstName: "Bob" },
      ],
    });
    ```
  </Tab>
</Tabs>

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

```typescript theme={null}
// 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 Inbox to your web application. The Inbox provides a bell icon, notification feed, read/archive management, and real-time WebSocket updates.

<Tabs>
  <Tab title="React">
    ```bash theme={null}
    npm install @novu/react
    ```

    ```tsx theme={null}
    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
        />
      );
    }
    ```
  </Tab>

  <Tab title="Next.js">
    ```bash theme={null}
    npm install @novu/nextjs
    ```

    ```tsx theme={null}
    // components/NotificationInbox.tsx
    "use client"; // Required for App Router

    import { Inbox } from "@novu/nextjs";

    export function NotificationInbox() {
      return (
        <Inbox
          applicationIdentifier={process.env.NEXT_PUBLIC_NOVU_APP_ID!}
          subscriberId="subscriber-123"
          subscriberHash="HMAC_HASH"
        />
      );
    }
    ```
  </Tab>

  <Tab title="Vanilla JS">
    ```bash theme={null}
    npm install @novu/js
    ```

    ```typescript theme={null}
    import { Novu } from "@novu/js";

    const novu = new Novu({
      applicationIdentifier: "YOUR_NOVU_APP_ID",
      subscriberId: "subscriber-123",
    });
    ```
  </Tab>
</Tabs>

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

```typescript theme={null}
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**:

<Tabs>
  <Tab title="Workflow level">
    ```typescript theme={null}
    await novu.subscribers.preferences.update(
      {
        workflowId: "weekly-newsletter",
        channels: { email: false, inApp: true },
      },
      "subscriber-123"
    );
    ```
  </Tab>

  <Tab title="Global level">
    ```typescript theme={null}
    await novu.subscribers.preferences.update(
      {
        channels: { email: false, inApp: true },
      },
      "subscriber-123"
    );
    ```
  </Tab>
</Tabs>

**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](https://docs.novu.co) or contact us at [support@novu.co](mailto:support@novu.co).
