Agent skill

Add NodeBridge Handler

by neovateai in neovateai/neovate-code

Walks through adding a message handler to NodeBridge in Neovate Code, from the implementation and its types to an optional test entry and a run with Bun.

MITAuto-check passedDevelopment

Install Add NodeBridge Handler

skills CLI
$ npx skills add neovateai/neovate-code --skill add-nodebridge-handler -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install neovateai/neovate-code add-nodebridge-handler --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/neovateai/neovate-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-nodebridge-handler .claude/skills/add-nodebridge-handler && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-nodebridge-handler
GitHub stars
1.6k
Token cost
~1k tokens
SKILL.md length
206 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Walks through adding a message handler to NodeBridge in Neovate Code, from the implementation and its types to an optional test entry and a run with Bun.

  • Works in 4 steps: Add Handler Implementation in… → Add Type Definitions in… → (Optional) Add to Test Script → …
  • Adding a new handler to src/nodeBridge.ts
  • SKILL.md covers Overview, Steps, Example: Complete Handler… and Notes
  • Calls bun

What it does

NodeBridge carries messages between the UI layer and the Node.js backend, and this guide lays out how to add one more handler. You register it in the `registerHandlers()` method of `NodeHandlerRegistry` in `src/nodeBridge.ts` under a dotted name such as `git.status`, fetch the working context with `getContext(cwd)`, wrap the body in try/catch, and return an object with `success` plus either `data` or `error`.

Next you add input and output types in `src/nodeBridge.types.ts` and list the handler in the `HandlerMap` type. Optionally you add it to the `HANDLERS` object in `scripts/test-nodebridge.ts`, then try it by running that script with Bun and either `--cwd` and parameter flags or a `--data` JSON string. A full worked example closes the guide, and it is specific to the Neovate Code repository.

When your agent uses it

  • Adding a new handler to src/nodeBridge.ts
  • Typing a new handler's input and output in src/nodeBridge.types.ts
  • Trying a handler from the command line with scripts/test-nodebridge.ts

Example prompts

  • “Add a nodeBridge handler named project.getBranches that returns the local Git branches.”
  • “I added session.rename to nodeBridge.ts; now write its types and register it in HandlerMap.”
  • “Register my new utils.example handler in the test script and run it against ./sandbox.”

Requirements

  • A checkout of the Neovate Code repository
  • Bun, to run `scripts/test-nodebridge.ts`

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Add Handler Implementation in src/nodeBridge.ts
  2. Add Type Definitions in src/nodeBridge.types.ts
  3. (Optional) Add to Test Script
  4. Test the Handler

What it can do on your machine

Read from SKILL.md and the folder at commit 0a24b36. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bun

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add NodeBridge Handler loads about 1k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 206 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from neovateai/neovate-code at commit 0a24b36, republished under its MIT licence (© neovateai). 206 words, ~1,010 tokens.

Download SKILL.mdSave it as .claude/skills/add-nodebridge-handler/SKILL.md (or your agent's skills folder).
name
add-nodebridge-handler
description
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

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
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:

typescript
// ============================================================================
// 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:

typescript
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:

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

Run the test script:

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

Or with JSON data:

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

Example: Complete Handler Addition

nodeBridge.ts
typescript
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
typescript
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 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)

© neovateai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/add-nodebridge-handler of neovateai/neovate-code.

Open the folder on GitHubat commit 0a24b36

Compare with similar skills

Add NodeBridge Handler next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add NodeBridge Handler compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add NodeBridge Handler this skillneovateai/neovate-code1.6k—~1kAutomated safety check: PassMIT
Typescript Best PracticesTaoidle/plan-cascade133—~534Automated safety check: PassMIT
Neo4j Driver Javascript Skillneo4j-contrib/neo4j-skills114—~3.5kAutomated safety check: NotesMIT
Typescriptericrisco/rsc-harness156—~2.8kAutomated safety check: PassMIT
Spiceflowremorses/spiceflow167—~1.9kAutomated safety check: PassMIT
starknet.js SDK Referenceinternet-court/internet-court-skill6.4k1 repos~3.5kAutomated safety check: NotesApache-2.0

Similar skills

  • Typescript Best Practices

    Taoidle/plan-cascade

    TypeScript/Node.js best practices. An agent skill from Taoidle/plan-cascade.

    133 GitHub stars~534 tokensUpdated 6 mo ago
    DevelopmentAuto-check passed
  • Neo4j Driver Javascript Skill

    neo4j-contrib/neo4j-skills

    Neo4j JavaScript/TypeScript Driver v6 — driver lifecycle, executeQuery, managed transactions (executeRead/executeWrite), session.run, Integer handling, JSON serialization, record access, async/await…

    114 GitHub stars~3.5k tokensUpdated today
    DevelopmentAuto-check: notes
  • Typescript

    ericrisco/rsc-harness

    A skill your agent uses when writing or fixing TypeScript type code (.ts/.tsx/.d.ts), modeling data with generics/unions/branded types, diagnosing narrowing failures, or configuring tsconfig and the…

    156 GitHub stars~2.8k tokensUpdated today
    DatabasesAuto-check passed
  • Spiceflow

    remorses/spiceflow

    Spiceflow is a super simple, fast, and type-safe API and React Server Components framework for TypeScript.

    167 GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • starknet.js SDK Reference

    internet-court/internet-court-skill

    Reference for building Starknet apps with starknet.js v9: providers, accounts, contract calls, fee estimation, wallet integration and paymaster flows.

    6.4k GitHub starsUsed in 1 repo~3.5k tokens
    Backend & APIsAuto-check: notes
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 24 repos~4.2k tokens
    DevelopmentAuto-check passed

More from neovateai/neovate-code

  • NodeBridge Handler Tester

    neovateai/neovate-code

    Runs Neovate Code's NodeBridge message handlers from the command line with bun scripts/test-nodebridge.ts, listing handlers and passing parameters.

    1.6k GitHub stars~711 tokensUpdated 6 mo ago
    Auto-check passed

Categories

Questions about Add NodeBridge Handler

What does Add NodeBridge Handler do?

Walks through adding a message handler to NodeBridge in Neovate Code, from the implementation and its types to an optional test entry and a run with Bun. js backend, and this guide lays out how to add one more handler.status`, fetch the working context with `getContext(cwd)`, wrap the body in try/catch, and return an object with `success` plus either `data` or `error`.

When should I use Add NodeBridge Handler?

Add NodeBridge Handler fits situations like: adding a new handler to src/nodeBridge.ts; typing a new handler's input and output in src/nodeBridge.types.ts; trying a handler from the command line with scripts/test-nodebridge.ts.

How do I install Add NodeBridge Handler in Claude Code?

Run `npx skills add neovateai/neovate-code --skill add-nodebridge-handler -a claude-code`. Or copy the skill folder (.claude/skills/add-nodebridge-handler in neovateai/neovate-code) into .claude/skills/add-nodebridge-handler in your project. Claude Code loads it when a task matches its description.

How do I install Add NodeBridge Handler in Codex?

Run `npx skills add neovateai/neovate-code --skill add-nodebridge-handler -a codex`. Or copy the skill folder (.claude/skills/add-nodebridge-handler in neovateai/neovate-code) into .agents/skills/add-nodebridge-handler in your project. Codex loads it when a task matches its description.

Can I use Add NodeBridge Handler in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add neovateai/neovate-code --skill add-nodebridge-handler -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-nodebridge-handler, .gemini/skills/add-nodebridge-handler, .github/skills/add-nodebridge-handler and .opencode/skills/add-nodebridge-handler in your project.

What does Add NodeBridge Handler need to run?

Going by SKILL.md and its folder, Add NodeBridge Handler needs the command-line tools its instructions call (bun). Our summary lists: A checkout of the Neovate Code repository; Bun, to run `scripts/test-nodebridge.ts`.

Does Add NodeBridge Handler access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Add NodeBridge Handler safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add NodeBridge Handler use?

Add NodeBridge Handler is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add NodeBridge Handler use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add NodeBridge Handler?

Skills that share tags, products or a category with Add NodeBridge Handler: Typescript Best Practices (Taoidle/plan-cascade, 133 stars), Neo4j Driver Javascript Skill (neo4j-contrib/neo4j-skills, 114 stars), Typescript (ericrisco/rsc-harness, 156 stars) and Spiceflow (remorses/spiceflow, 167 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add NodeBridge Handler?

neovateai (a GitHub organization) maintains it in neovateai/neovate-code, which has 1,558 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on March 24, 2026.

Source: neovateai/neovate-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.