/hypervibe:add-notification-centerfrom hypervibe
Adds an in-app notification center to a Next.js app with a bell icon, unread badge, dropdown panel, and read/unread state. Creates a notification table, server helper, tRPC router, and bell component.
Ships in hypervibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You add an in-app notification center: a bell with a badge showing the number of unread notifications, a panel that lists the notifications, and read/unread marking. This is different from system push: here the notifications live inside the app and remain available to consult.
/bootstrap carries no language signal by itself). If nothing in the conversation gives a signal, fall back to the OS locale (node -e "console.log(Intl.DateTimeFormat().resolvedOptions().locale)") before defaulting to English. ALWAYS reply in that language for every user-facing message: questions, progress, confirmations, summaries, errors - including any example text quoted in this skill, which is illustrative and must be translated, never sent verbatim.Marker hypervibe:notification-center at the top of <WEB_DIR>/src/server/notify.ts.
test -f "<WEB_DIR>/src/server/notify.ts" && grep -q "hypervibe:notification-center" "<WEB_DIR>/src/server/notify.ts" && echo present || echo absent
/add-push-notification has been added since. Handle it, then jump to the summary.Templates/scripts path: ${CLAUDE_SKILL_DIR}/../../templates/notif-center/.
_detect-project-root → WEB_DIR, IS_MONOREPO, IS_NEXTJS. Abort if not Next.js._check-deps db. If db_ok = false, suggest /add-db, then re-check.<WEB_DIR>/src/server/auth.ts, look for the // hypervibe:auth-modes marker. If it does not contain users, suggest /add-auth (users mode): notifications are attached to a logged-in user.(No dependency on /add-pwa or /add-push-notification: the in-app center is self-contained.)
templates/notif-center/schema-snippet.ts into the Drizzle schema (<WEB_DIR>/src/server/db/schema.ts, or packages/db/src/schema.ts in a monorepo), after the users table. Check the imports (boolean, index, text, timestamp, sql, createTable, users).cd "<WEB_DIR>" && pnpm db:push.notifyUser server helper (+ push wiring if present)templates/notif-center/notify.ts to <WEB_DIR>/src/server/notify.ts (keep the // hypervibe:notification-center marker at the top and // hypervibe:notify-push inside the function).test -f "<WEB_DIR>/src/server/push.ts" && grep -q "hypervibe:push" "<WEB_DIR>/src/server/push.ts" && echo push-present || echo push-absent
templates/notif-center/notify-push-block.ts: add the sendPushToUser import at the top of notify.ts and replace the marker line // hypervibe:notify-push with await sendPushToUser(db, userId, payload);. (Idempotent: do not re-inject if it is already there.) That way a notification rings the bell and pushes to the phone./add-push-notification is run: that skill is the one that will do the injection).templates/notif-center/notifications-router.ts to <WEB_DIR>/src/server/api/routers/notifications.ts.appRouter (<WEB_DIR>/src/server/api/root.ts):
import { notificationsRouter } from "~/server/api/routers/notifications";
// inside createTRPCRouter({ ... }):
notifications: notificationsRouter,
templates/notif-center/notification-bell.tsx to <WEB_DIR>/src/components/. Adapt the colors (the badge is bg-red-500 by default; tokens border-border/bg-background/text-muted-foreground to adjust to the palette if needed).<NotificationBell /> in the header / navigation bar of the logged-in areas. Locate the header component (src/components/layout/header.tsx, navbar.tsx, or similar) and place it near the user actions (avatar, menu). If the placement is not obvious, ask the user where they want the bell.Freshness model (do not "improve" it by shortening the interval): the badge updates through three channels — (a) real time, via the service-worker broadcast hv:new-notification that the bell listens to (fires when /add-push-notification is installed; a no-op otherwise), (b) refetchOnWindowFocus when the user comes back to the tab, (c) a 5-minute polling safety net. Never set refetchInterval below 300_000: a shorter poll keeps the Neon database awake around the clock for every active tab (it only autosuspends after 5 min without a query), which burns the free plan's 100 monthly compute hours. If the user asks for a snappier badge, the answer is installing /add-push-notification, not shortening the poll.
_update-claude-md:
stack: - **Notification center**: \notification` table, in-app bell (unread badge + list), `notifyUser` helper.`conventions: - Notify a user: \notifyUser(db, userId, { title, body, url })` from `~/server/notify` (persists for the bell, and sends a push if `/add-push-notification` is installed). `url` is an internal path (`/orders/12`): the bell and the system notification ignore anything else, so a click never leads to another site.`cd "<WEB_DIR>" && pnpm tsc --noEmit && pnpm lint.Summarize:
await notifyUser(db, userId, { title, body, url }), where url is an internal path (/orders/12).Suggest push (if absent): check test -f "<WEB_DIR>/src/server/push.ts". If absent, suggest via AskUserQuestion:
You now have the bell inside the app. You can also add system notifications (push): they arrive on the user's phone even when the app is closed, and appear in the OS notification center.
The difference: the bell is available inside your app (history, read/unread); push grabs attention outside the app. The two complement each other, and
notifyUserwill automatically send both.
/add-push-notification (which will detect the center and wire the push sending into notifyUser)./add-push-notification."What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub flavien-ia/hypervibe-craft --plugin hypervibe90 skills in this plugin
/accessibilityAccessibility audit of a Next.js app: reads the code (images, buttons, links, form fields, keyboard, focus, zoom, motion), measures the live pages with PageSpeed Insights, explains each problem plainly, then applies the fixes the user approves./add-2faAdd two-factor authentication (2FA TOTP) to an existing T3 project's login. Orchestrator - asks which authenticator app the user wants, detects whether the project uses admin auth (single fixed login) or user accounts, and delegates to the right setup. Admin mode - 2FA is mandatory for the single admin, secret + backup codes stored in the Bitwarden vault. User mode - 2FA is optional per user, each user enables it from their account page, secrets + backup codes stored per-user in the database. Requires the project to already have hypervibe auth (`/add-auth`)./add-agent-dashboardAdd a monitoring screen for AI agents in the project admin: cost, run history, turn-by-turn traces, and a button to launch a run by hand. Installed when an agent is created, safe to re-run./add-aiAdd AI to an existing Next.js project: chat assistant, content processing, or generation. Estimates the cost from live prices and provisions a spending-capped key before writing any code. Model-independent through OpenRouter./add-analyticsAdd Google Analytics (GA4) to an existing Next.js project. Includes RGPD cookie consent banner./add-authAdd NextAuth (Auth.js) authentication to an existing T3 project. One structured question decides the mode - admin (fixed login in env vars) or users (DB-backed email+password with signup, signin, account page, delete account, and optional forgot-password if email is configured). OAuth providers (Google, GitHub) are offered as optional add-ons AFTER the user-credentials baseline, never as a replacement. This skill is an orchestrator - it delegates the actual implementation to `_setup-auth-admin` or `_setup-auth-users` depending on the chosen mode.Other plugins' skills for the same job