add-nodebridge-handler
Use this skill when adding a new NodeBridge handler to src/nodeBridge.ts, including updating types in src/nodeBridge.types.ts and optionally testing with scripts/test-nodebridge.ts
Install
mkdir -p .claude/skills/add-nodebridge-handler && curl -L -o skill.zip "https://mcp.directory/api/skills/download/3052" && unzip -o skill.zip -d .claude/skills/add-nodebridge-handler && rm skill.zipInstalls to .claude/skills/add-nodebridge-handler
About this skill
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:
this.messageBus.registerHandler('category.handlerName', async (data) => {
const { cwd, ...otherParams } = data;
const context = await this.getContext(cwd);
// Implementation logic here
return {
success: true,
data: {
// Return data
},
};
});
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:
// ============================================================================
// Category Handlers
// ============================================================================
type CategoryHandlerNameInput = {
cwd: string;
// other required params
optionalParam?: string;
};
type CategoryHandlerNameOutput = {
success: boolean;
error?: string;
data?: {
// return data shape
};
};
Then add to the HandlerMap type:
export type HandlerMap = {
// ... existing handlers
// Category handlers
'category.handlerName': {
input: CategoryHandlerNameInput;
output: CategoryHandlerNameOutput;
};
};
3. (Optional) Add to Test Script
Update scripts/test-nodebridge.ts HANDLERS object if the handler should be easily testable:
const HANDLERS: Record<string, string> = {
// ... existing handlers
'category.handlerName': 'Description of what this handler does',
};
4. Test the Handler
Run the test script:
bun scripts/test-nodebridge.ts category.handlerName --cwd=/path/to/dir --param=value
Or with JSON data:
bun scripts/test-nodebridge.ts category.handlerName --data='{"cwd":"/path","param":"value"}'
Example: Complete Handler Addition
nodeBridge.ts
this.messageBus.registerHandler('utils.example', async (data) => {
const { cwd, name } = data;
try {
const context = await this.getContext(cwd);
// Do something with context and params
const result = await someOperation(name);
return {
success: true,
data: {
result,
},
};
} catch (error: any) {
return {
success: false,
error: error.message || 'Failed to execute example',
};
}
});
nodeBridge.types.ts
type UtilsExampleInput = {
cwd: string;
name: string;
};
type UtilsExampleOutput = {
success: boolean;
error?: string;
data?: {
result: string;
};
};
// In HandlerMap:
'utils.example': {
input: UtilsExampleInput;
output: UtilsExampleOutput;
};
Notes
- Handlers are async functions that receive
dataparameter - 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.clonepattern) - For operations that emit progress, use
this.messageBus.emitEvent()(seegit.commit.outputpattern)
More by neovateai
View all skills by neovateai →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversBoost your AI code assistant with Context7: inject real-time API documentation from OpenAPI specification sources into y
Create and edit PowerPoint presentations in Python with Office PowerPoint. Use python pptx or pptx python tools to add s
Empower your Unity projects with Unity-MCP: AI-driven control, seamless integration, and advanced workflows within the U
Excalidraw MCP Server: let AI agents generate, edit, and view Excalidraw diagrams via natural-language commands with rea
Rtfmbro is an MCP server for config management tools—get real-time, version-specific docs from GitHub for Python, Node.j
Use our meme generator to quickly create your memes with ImgFlip API. Make your meme easily by adding text and templates
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.