KS
Killer-Skills

add-nodebridge-handler — how to use add-nodebridge-handler how to use add-nodebridge-handler, add-nodebridge-handler setup guide, NodeBridge message handler, add-nodebridge-handler alternative, Node.js backend communication, add-nodebridge-handler install, what is add-nodebridge-handler, NodeBridge UI layer communication, add-nodebridge-handler vs other handlers

v1.0.0
GitHub

About this Skill

Perfect for Node.js Agents needing enhanced UI-backend communication through NodeBridge add-nodebridge-handler is a skill that guides the process of adding a new message handler to the NodeBridge system, enabling communication between the UI layer and the Node.js backend.

Features

Adds handler implementation in src/nodeBridge.ts
Registers handlers using the registerHandlers() method in NodeHandlerRegistry class
Supports message handling between UI layer and Node.js backend
Utilizes the messageBus.registerHandler() function for handler registration
Enables communication between UI and backend using NodeBridge

# Core Topics

neovateai neovateai
[0]
[0]
Updated: 3/7/2026

Quality Score

Top 5%
42
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add neovateai/neovate-code/add-nodebridge-handler

Agent Capability Analysis

The add-nodebridge-handler MCP Server by neovateai is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use add-nodebridge-handler, add-nodebridge-handler setup guide, NodeBridge message handler.

Ideal Agent Persona

Perfect for Node.js Agents needing enhanced UI-backend communication through NodeBridge

Core Value

Empowers agents to extend NodeBridge functionality by registering custom message handlers, facilitating seamless communication between the UI layer and Node.js backend using the messageBus and NodeHandlerRegistry

Capabilities Granted for add-nodebridge-handler MCP Server

Registering custom message handlers for NodeBridge
Enhancing UI-backend communication in Node.js applications
Implementing asynchronous data processing using NodeBridge handlers

! Prerequisites & Limits

  • Requires NodeBridge and Node.js setup
  • Limited to TypeScript implementation in src/nodeBridge.ts
Project
SKILL.md
3.7 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

Add NodeBridge Handler

Overview

This skill guides the process of adding a new message handler to the NodeBridge system, which enables communication between the UI layer and the Node.js backend.

Steps

1. Add Handler Implementation in src/nodeBridge.ts

Locate the registerHandlers() method in the NodeHandlerRegistry class and add your handler:

typescript
1this.messageBus.registerHandler('category.handlerName', async (data) => { 2 const { cwd, ...otherParams } = data; 3 const context = await this.getContext(cwd); 4 5 // Implementation logic here 6 7 return { 8 success: true, 9 data: { 10 // Return data 11 }, 12 }; 13});

Handler Naming Convention:

  • Use dot notation: category.action (e.g., git.status, session.send, utils.getPaths)
  • Categories: config, git, mcp, models, outputStyles, project, projects, providers, session, sessions, slashCommand, status, utils

Common Patterns:

  • Always get context via await this.getContext(cwd)
  • Return { success: true, data: {...} } for success
  • Return { success: false, error: 'message' } for errors
  • Wrap in try/catch for error handling

2. Add Type Definitions in src/nodeBridge.types.ts

Add input and output types near the relevant section:

typescript
1// ============================================================================ 2// Category Handlers 3// ============================================================================ 4 5type CategoryHandlerNameInput = { 6 cwd: string; 7 // other required params 8 optionalParam?: string; 9}; 10 11type CategoryHandlerNameOutput = { 12 success: boolean; 13 error?: string; 14 data?: { 15 // return data shape 16 }; 17};

Then add to the HandlerMap type:

typescript
1export type HandlerMap = { 2 // ... existing handlers 3 4 // Category handlers 5 'category.handlerName': { 6 input: CategoryHandlerNameInput; 7 output: CategoryHandlerNameOutput; 8 }; 9};

3. (Optional) Add to Test Script

Update scripts/test-nodebridge.ts HANDLERS object if the handler should be easily testable:

typescript
1const HANDLERS: Record<string, string> = { 2 // ... existing handlers 3 'category.handlerName': 'Description of what this handler does', 4};

4. Test the Handler

Run the test script:

bash
1bun scripts/test-nodebridge.ts category.handlerName --cwd=/path/to/dir --param=value

Or with JSON data:

bash
1bun scripts/test-nodebridge.ts category.handlerName --data='{"cwd":"/path","param":"value"}'

Example: Complete Handler Addition

nodeBridge.ts

typescript
1this.messageBus.registerHandler('utils.example', async (data) => { 2 const { cwd, name } = data; 3 try { 4 const context = await this.getContext(cwd); 5 6 // Do something with context and params 7 const result = await someOperation(name); 8 9 return { 10 success: true, 11 data: { 12 result, 13 }, 14 }; 15 } catch (error: any) { 16 return { 17 success: false, 18 error: error.message || 'Failed to execute example', 19 }; 20 } 21});

nodeBridge.types.ts

typescript
1type UtilsExampleInput = { 2 cwd: string; 3 name: string; 4}; 5 6type UtilsExampleOutput = { 7 success: boolean; 8 error?: string; 9 data?: { 10 result: string; 11 }; 12}; 13 14// In HandlerMap: 15'utils.example': { 16 input: UtilsExampleInput; 17 output: UtilsExampleOutput; 18};

Notes

  • Handlers are async functions that receive data parameter
  • Use this.getContext(cwd) to get the Context instance (cached per cwd)
  • Context provides access to: config, paths, mcpManager, productName, version, etc.
  • For long-running operations, consider using abort controllers (see git.clone pattern)
  • For operations that emit progress, use this.messageBus.emitEvent() (see git.commit.output pattern)

Related Skills

Looking for an alternative to add-nodebridge-handler or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

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
Communication

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
Communication