Durable Notification Queue: Webhook + FCM v1 Without an SDK

    1

    An application that raises alerts usually sends a notification inline: one HTTP call, no retry, no record.

    $39

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Durable Notification Queue: Webhook + FCM v1 Without an SDK

    Example session with this skill installed

    Configure the notification worker to read from alerts.json, send to my HTTPS endpoint with secret "dev-secret-123", and output the heartbeat to status.json.

    • Read your context and instructions
    • Compiled the durable notification queue

    The notification worker has been configured for the specified file-based pipeline. I have initialized the environment variables and verified the queue semantics via the internal test suite.

    Notification Pipeline Configuration

    ComponentPath / Value
    Alert Sourcealerts.json
    Notification Storenotifications.db.json
    Heartbeat Filestatus.json
    Webhook URLhttps://api.example.com/webhooks/alerts
    HMAC Secretdev-secret-123
    Max Retries8 (Exponential)
    Backoff Range30s to 1h
    // Example Verification at Receiver
    import { crypto } from 'node:crypto';
    
    function signatureMatches(secret, rawBody, incomingSignature) {
      const expected = crypto
        .createHmac('sha256', secret)
        .update(rawBody)
        .digest('hex');
      return expected === incomingSignature;
    }
    

    Next steps

    1. Run node --test scripts/notification.test.mjs to confirm the backoff and signature logic in your environment.
    2. Start the worker using node scripts/worker.mjs to begin polling the alert source.
    3. Monitor status.json to track pending, delivered, and failed counts.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    An application that raises alerts usually sends a notification inline: one HTTP call, no retry, no record. When the receiver is down the alert is gone; when notifications are first switched on, every historical alert fires at once. This worker owns delivery and proves it.

    notification-store.mjs: the alert id is the queue key, so an alert is never delivered twice, including across a restart; exponential backoff from 30 seconds doubling to a one-hour ceiling; after 8 attempts the record is kept as failed with its last error instead of disappearing; settled records age out after 30 days under a 5,000-record ceiling while pending records never age out; delivery history per alert; atomic temp-file-plus-rename writes with 0600 permissions.

    alert-source.mjs: read-only view of the producer's alert file (object or bare array), one stat per quiet cycle, malformed entries skipped. channels.mjs: an HTTPS webhook signed with HMAC-SHA256 (X-Notification-Signature) plus the receiver-side verifier; buildChannels fails closed on an http URL, a secret under 32 characters, a bad service account or a missing token store, so a typo stops the worker at startup instead of silencing alerts at runtime.

    fcm-channel.mjs: Firebase Cloud Messaging HTTP v1 with no admin SDK: a signed RS256 JWT exchanged for an access token that is cached and refreshed a minute early, one send per device token, data messages so the app's own permission check still runs in the background, per-device alert scopes that fail closed when malformed. Only UNREGISTERED marks a token stale (INVALID_ARGUMENT describes the message, not the registration); a partial success is a success, a total failure is retried.

    stale-token-sink.mjs: the worker records stale tokens; the producer, sole owner of the push-token file, prunes them with reconcileStaleTokens, which keeps a token the device registered again after the observation and keeps it on equal timestamps. worker.mjs: the cycle loop, history adoption on first enable, a 15-second delivery timeout per record, heartbeat file, --once mode.

    Reference: the single-writer table, delivery behaviour, the two Firebase credentials and their very different sensitivity, pruning rationale, systemd notes. 8 tests including a real webhook receiver and a faked FCM transport. Node 20+, no packages.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    File-based storage only. Swap the store class if using a database. Supports Webhook and FCM only; Web Push and other channels require manual extension of the delivery interface.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 18 days ago

    Software
    Node.js 20+

    Permissions

    Read Files
    Write Files
    Network Access
    Listed18 days ago

    What's inside

    Frequently Asked Questions

    This skill provides a production-ready Node.js worker that decouples alert generation from delivery using a file-based queue, ensuring messages are never lost during network timeouts or service restarts.

    The worker includes a custom HTTP v1 API implementation using signed JWTs, allowing you to send Android push notifications without the bloat or security overhead of the Firebase Admin SDK.

    Yes, it is designed for any Node 20+ environment and can be integrated into AI agent workflows that produce JSON-based alert files for automated monitoring or reporting.

    The delivery mechanism uses HMAC-signed webhooks with a shared secret, allowing your receiving endpoint to cryptographically verify that the notification originated from your trusted worker.

    The skill includes a flood prevention mechanism that automatically scans your alert history upon activation, ensuring it doesn't replay old events that were generated before the worker started.

    You will receive the complete Node.js source code for the worker, the internal test suite for validation, and documentation for configuring your environment variables and file paths.

    New in APIs & Backend