custom-global-events — community custom-global-events, experiment--t3-chat, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Frontend Agents needing efficient cross-component communication without React context dependencies Slowly cloning t3 chat for fun

raythurnvoid raythurnvoid
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The custom-global-events skill by raythurnvoid is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Perfect for Frontend Agents needing efficient cross-component communication without React context dependencies

Core Value

Empowers agents to trigger events across different parts of the application using simple function calls, leveraging global events and React context-free communication, with implementations in TypeScript files like global-event.tsx

Capabilities Granted for custom-global-events

Triggering events across components
Implementing cross-component communication without React context
Debugging global event triggers in TypeScript applications

! Prerequisites & Limits

  • Requires knowledge of React and TypeScript
  • Limited to applications using global events for cross-component communication
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

custom-global-events

Install custom-global-events, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

Overview

Global events are used for cross-component communication without React context dependencies, allowing for simple function calls to trigger events across different parts of the application.

Global Events Guidelines

Global events are used for cross-component communication without React context dependencies, allowing for simple function calls to trigger events across different parts of the application.

Overview

The global events system lives at global-event.tsx and is built on a typed Event subclass (XCustomEvent).

It exposes:

  • global_event_Event: the canonical type map of event keys → detail payload types
  • global_event_dispatch(event, payload): dispatch a typed event (works outside React)
  • global_event_listen(event, handler, options?): listen with typed handler (works outside React)
  • useGlobalEvent(event, handler): React hook for subscriptions with stale-closure protection

Event key naming

Event keys are string literals using the pattern:

(module::event_name), for example ai_chat::open_canvas.

How to add or modify an event

When the user requests a new global event, you must:

Update the event map

Add the new event key to the global_event_Event map in global-event.tsx.

Example:

ts
1export class global_event_Event extends XCustomEvent<{ 2 "ai_chat::open_canvas": { 3 pageId: app_convex_Id<"pages">; 4 mode: "diff" | "editor"; 5 modifiedContent?: string; 6 threadId: string; 7 }; 8 "ai_chat::open_canvas_by_path": { 9 path: string; 10 }; 11 "docs::focus_path": { 12 path: string; 13 }; 14}> {}

Keep all event keys centralized

All supported global event keys must be declared in that global_event_Event type map. Do not introduce ad-hoc stringly-typed events elsewhere.

Use the exported helpers

Prefer global_event_dispatch / global_event_listen / useGlobalEvent rather than calling window.dispatchEvent(new CustomEvent(...)) directly.

Usage patterns

React components

Use useGlobalEvent(eventName, handler) to subscribe. The handler receives a typed event object, and the payload is on event.detail.

Example (from canvas.tsx):

ts
1useGlobalEvent("ai_chat::open_canvas", (e) => { 2 const payload = e.detail; 3 // payload.pageId, payload.mode, payload.modifiedContent, payload.threadId 4});

Non-React code (or manual lifecycle control)

Use global_event_listen directly when you need to wire AbortController, or you are outside React.

ts
1const controller = new AbortController(); 2 3const cleanup = global_event_listen( 4 "ai_chat::open_canvas_by_path", 5 (e) => { 6 console.info("path:", e.detail.path); 7 }, 8 { signal: controller.signal }, 9); 10 11// later: 12controller.abort(); 13cleanup();

Dispatching

Use global_event_dispatch(eventName, payload) from anywhere client-side.

Example (from app-ai-chat.tsx):

ts
1global_event_dispatch("ai_chat::open_canvas_by_path", { path: args.path });

Handler typing and payload access

Handlers receive the typed event object, not the payload directly:

ts
1useGlobalEvent("ai_chat::open_canvas", (e) => { 2 const payload = e.detail; 3});

Files and references

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is custom-global-events?

Perfect for Frontend Agents needing efficient cross-component communication without React context dependencies Slowly cloning t3 chat for fun

How do I install custom-global-events?

Run the command: npx killer-skills add raythurnvoid/experiment--t3-chat/custom-global-events. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for custom-global-events?

Key use cases include: Triggering events across components, Implementing cross-component communication without React context, Debugging global event triggers in TypeScript applications.

Which IDEs are compatible with custom-global-events?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for custom-global-events?

Requires knowledge of React and TypeScript. Limited to applications using global events for cross-component communication.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add raythurnvoid/experiment--t3-chat/custom-global-events. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use custom-global-events immediately in the current project.

Related Skills

Looking for an alternative to custom-global-events or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI