notif-envelope

Produce canonical notification envelopes and enqueue them into Redis.

1|Updated Aug 22, 2025
One-click install
npx skills add https://github.com/interserver/teams-chat-bot --skill notif-envelope
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: notif-envelope
Source: https://github.com/interserver/teams-chat-bot/tree/main/.claude/skills/notif-envelope
Command: npx skills add https://github.com/interserver/teams-chat-bot --skill notif-envelope

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It standardizes how notification “envelopes” are produced and enqueued so downstream consumers can coalesce edits, route announces, and dead-letter failures reliably instead of sending inconsistent or malformed payloads.

Core Features & Use Cases

  • Canonical Redis Envelope Production: Builds { v, id, ts, expires_at, room, type, message|card, extra, fallback_webhook_url } in the exact shape expected by the notification consumer.
  • Correct Room Resolution & Safety Guardrails: Ensures room is validated through CHANNELS so thread IDs or unknown rooms are never written into envelopes.
  • Coalescing, Tracking, and GitHub Event Handling: Supports edit-window merging via extra.dedup_key, and lets the consumer derive GitHub dedup keys using extra.event_type, extra.repo, and raw webhook extra.data.
  • Dead-Letter and Observability Compatibility: Produces envelopes that fail into notif:dead with appropriate metadata when errors occur, and can be tested/verified against consumer expectations.

Quick Start

Use notif-envelope to enqueue a correctly shaped notification envelope to the InterServer Redis notif:queue by first resolving your target room through CHANNELS, then constructing the envelope with type: msg or type: card, and finally LPUSHing JSON.stringify(envelope) into k('queue').

Frequently Asked Questions about notif-envelope

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I queue Microsoft Teams notifications reliably using Redis?

Queue Teams notifications reliably by building a canonical envelope with room, type, and message fields, then LPUSHing the JSON string into the InterServer Redis notif:queue for the downstream consumer to process.

How does message coalescing work for Teams bot edit windows?

Message coalescing works by assigning an extra.dedup_key to your notification envelope, allowing the downstream consumer to merge multiple edits targeting the same message within the active delivery window.

How do I normalize GitHub webhooks for Teams delivery?

Normalize GitHub webhooks by placing raw webhook data into the extra.data field alongside extra.event_type and extra.repo, enabling the consumer to derive dedup keys and route the notification safely.

How do I handle dead-letter routing for failed Teams bot notifications?

Failed Teams bot notifications are routed to the notif:dead Redis list with appropriate metadata, allowing you to inspect, replay, or discard malformed or undeliverable envelopes safely.

How do I validate room resolution before enqueuing a Teams notification?

Validate room resolution by checking the target room against the CHANNELS registry before building the envelope, ensuring thread IDs or unknown rooms are never written into the notification payload.

What is the exact schema for a Redis notification envelope?

The exact Redis notification envelope schema includes v, id, ts, expires_at, room, type, message or card, extra, and fallback_webhook_url, serialized as a JSON string before being added to the queue.