notifications
Skill527 starsChanged 4 months agoMITView on GitHub
Reference for the notification system. Use when adding new notification types or modifying notification handling.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- soilmass/motion-design-agenttheir own version, first seen Nov 8, 2026
- Happy-Technologies-LLC/happy-platform-skillstheir own version, first seen Nov 1, 2026
- jars-demo/jars-skillstheir own version, first seen Oct 25, 2026
- latitude-dev/latitude-llmtheir own version, first seen Oct 8, 2026
- rlajous/claude-code-commandstheir own version, first seen Aug 28, 2026
- vellum-ai/vellum-assistanttheir own version, first seen Jul 8, 2026
Used with
Projects with it also use review and release.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillreview
Fixture review skill.
Also in 3 projects that use this
MicrosoftSkillrelease
Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).
Also in 3 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- latitude-dev/latitude-llm★ 4.7ksame name
- vellum-ai/vellum-assistant★ 1.5ksame name
- Happy-Technologies-LLC/happy-platform-skills★ 41same name
- rlajous/claude-code-commands★ 30same name
- soilmass/motion-design-agent★ 7same name
- moasq/ios-dev-agent★ 4same name
- montagao/skills★ 2same name
- hkarpinen/agent-skills★ 1same name
- jars-demo/jars-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- blueprint-generateSkill
- blueprintSkill
- domain-settingsSkill
- leaflet-ai-apiSkill
- lexiconsSkill
- mirror-editor-block-stylesSkill
- publication-settingsSkill
- specSkill
- tests-postsSkill
- tests-subscribeSkill
- update-default-themeSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Add your type to the NotificationData union:
- Very specific: line 33
Add to the HydratedNotification union:
- Very specific: line 74
Add to hydrateNotifications parallel array:
- Very specific: line 110
Create a new component (e.g., YourNotification.tsx):
- Distinctive: line 133
Import and render your notification type:
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Notification System
Overview
Notifications are stored in the database and hydrated with related data before being rendered. The system supports multiple notification types (comments, subscriptions, etc.) that are processed in parallel.
Key Files
src/notifications.ts- Core notification types and hydration logicapp/(home-pages)/notifications/NotificationList.tsx- Renders all notification typesapp/(home-pages)/notifications/Notification.tsx- Base notification component- Individual notification components (e.g.,
CommentNotification.tsx,FollowNotification.tsx)
Adding a New Notification Type
1. Update Notification Data Types (src/notifications.ts)
Add your type to the NotificationData union:
export type NotificationData =
| { type: "comment"; comment_uri: string; parent_uri?: string }
| { type: "subscribe"; subscription_uri: string }
| { type: "your_type"; your_field: string }; // Add hereAdd to the HydratedNotification union:
export type HydratedNotification =
| HydratedCommentNotification
| HydratedSubscribeNotification
| HydratedYourNotification; // Add here2. Create Hydration Function (src/notifications.ts)
export type HydratedYourNotification = Awaited<
ReturnType<typeof hydrateYourNotifications>
>[0];
async function hydrateYourNotifications(notifications: NotificationRow[]) {
const yourNotifications = notifications.filter(
(n): n is NotificationRow & { data: ExtractNotificationType<"your_type"> } =>
(n.data as NotificationData)?.type === "your_type",
);
if (yourNotifications.length === 0) return [];
// Fetch related data with joins
const { data } = await supabaseServerClient
.from("your_table")
.select("*, related_table(*)")
.in("uri", yourNotifications.map((n) => n.data.your_field));
return yourNotifications.map((notification) => ({
id: notification.id,
recipient: notification.recipient,
created_at: notification.created_at,
type: "your_type" as const,
your_field: notification.data.your_field,
yourData: data?.find((d) => d.uri === notification.data.your_field)!,
}));
}Add to hydrateNotifications parallel array:
const [commentNotifications, subscribeNotifications, yourNotifications] = await Promise.all([
hydrateCommentNotifications(notifications),
hydrateSubscribeNotifications(notifications),
hydrateYourNotifications(notifications), // Add here
]);
const allHydrated = [...commentNotifications, ...subscribeNotifications, ...yourNotifications];3. Trigger the Notification (in your action file)
import { Notification, pingIdentityToUpdateNotification } from "src/notifications";
import { v7 } from "uuid";
// When the event occurs:
const recipient = /* determine who should receive it */;
if (recipient !== currentUser) {
const notification: Notification = {
id: v7(),
recipient,
data: {
type: "your_type",
your_field: "value",
},
};
await supabaseServerClient.from("notifications").insert(notification);
await pingIdentityToUpdateNotification(recipient);
}4. Create Notification Component
Create a new component (e.g., YourNotification.tsx):
import { HydratedYourNotification } from "src/notifications";
import { Notification } from "./Notification";
export const YourNotification = (props: HydratedYourNotification) => {
// Extract data from props.yourData
return (
<Notification
timestamp={props.created_at}
href={/* link to relevant page */}
icon={/* icon or avatar */}
actionText={<>Message to display</>}
content={/* optional additional content */}
/>
);
};5. Update NotificationList (NotificationList.tsx)
Import and render your notification type:
import { YourNotification } from "./YourNotification";
// In the map function:
if (n.type === "your_type") {
return <YourNotification key={n.id} {...n} />;
}Example: Subscribe Notifications
See the implementation in:
src/notifications.ts:88-125- Hydration logicactions/publications/subscribeToPublication.ts:55-68- Triggerapp/(home-pages)/notifications/FollowNotification.tsx- Componentapp/(home-pages)/notifications/NotificationList.tsx:40-42- Rendering
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

