sending-notifications
Skill by PostHog
Explains how to send real-time in-app notifications from PostHog backend code. It covers the create_notification facade, notification types, priorities and target types. It is written for engineers building PostHog features.
Install sending-notifications
Built from the published package, never by AI.
git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.claude/skills && cp -r /tmp/posthog/.agents/skills/sending-notifications ~/.claude/skills/sending-notificationsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/posthog/.agents/skills/sending-notifications ~/.gemini/antigravity-cli/skills/sending-notificationsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install sending-notifications in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
The sending-notifications skill is a developer guide for adding in-app notifications to PostHog backend features. It explains how to build a NotificationData object and call create_notification from the notifications facade. It documents the required and optional fields, the notification types, the normal and critical priorities, and the user, team, organization and role target types.
The guide also describes the delivery path from Django through Postgres, Kafka, a Go livestream service, Redis and server-sent events to the browser. Resource access control filters out recipients without viewer access for certain resource types. It includes steps for adding a new notification type across backend and frontend files, and a test example that mocks the real-time-notifications feature flag. It is aimed at engineers working on PostHog features that need notifications.
Written from the project's SKILL.md and checked against it.
What it can do
- create_notificationCreates a notification through the notifications facade and returns a NotificationEvent or None.
- Notification typesLists six types, including alert_firing, comment_mention and pipeline_failure, with guidance on when to use each.
- Priority selectionExplains normal popover notifications and critical notifications that add a persistent toast.
- Target typesCovers sending to a user, team, organization or RBAC role.
- Resource access controlFilters out recipients without viewer access when a resource type is access-controlled.
- New notification type stepsLists the enum, frontend icon, label and migration steps for adding a type.
- Feature flag mockingShows how to patch the real-time-notifications flag in tests.
What you need
- Access to the PostHog codebase
- Python and Django backend
- Feature flag real-time-notifications for testing
Try asking
- Send a critical alert notification to the user who owns dashboard 42
- Which notification type should I use when a batch export fails?
- Show me how to mock the real-time-notifications flag in my tests
Good to know
- Critical priority shows a persistent toast that must be dismissed manually.
- Kafka publish runs on transaction commit, so rolled back transactions send no notification.
- create_notification returns None if the flag is off, no recipients resolve, or the team does not exist.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/sending-notifications/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB
Alternatives to sending-notifications
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
sending-notifications: common questions
Does create_notification always return an event?
No. It returns a NotificationEvent on success and None if the feature flag is disabled, no recipients were resolved, or the team does not exist.
When should I use critical priority?
The source reserves critical for genuine emergencies such as outages, security alerts or SLA breaches. When in doubt, use normal.
How are recipients without access handled?
When resource_type matches an access-controlled resource such as a dashboard, recipients without viewer access are excluded automatically.
How do I install sending-notifications?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is sending-notifications free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is sending-notifications safe to use?
It scores 83 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to sending-notifications?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
