Agent skill · Audited from source
Add Rpc
skill · wavetermdev/wavetermApache-2.0 licenceAudited 3 Oct 2026 · source 63907843412f
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 63907843412f and found no filesystem, network or shell access and no hard-coded secrets. What it does: Guide for adding new RPC calls to Wave Terminal. Use when implementing new RPC commands, adding server-client communication methods, or extending the RPC interface with new functionality.
Cite
Cite this page
ModelsAtlas. “Add Rpc (wavetermdev/waveterm)”. Retrieved 3 Oct 2026. https://modelsatlas.com/skills/wavetermdev/add-rpc
Trust audit
Audit 0.4.1 · source read 3 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha 63907843412f · 3 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisherwavetermdev GitHub organizationOwner of the repository this skill is read from
- Source folderwavetermdev/waveterm/.kilocode/skills/add-rpcThe exact folder we audited
- LicenceApache-2.0As the repository states it
- Commit pinned for this verdict63907843412fA new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Guide for adding new RPC calls to Wave Terminal. Use when implementing new RPC commands, adding server-client communication methods, or extending the RPC interface with new functionality.
---
name: add-rpc
description: Guide for adding new RPC calls to Wave Terminal. Use when implementing new RPC commands, adding server-client communication methods, or extending the RPC interface with new functionality.
---
# Adding RPC Calls Guide
## Overview
Wave Terminal uses a WebSocket-based RPC (Remote Procedure Call) system for communication between different components. The RPC system allows the frontend, backend, electron main process, remote servers, and terminal blocks to communicate with each other through well-defined commands.
This guide covers how to add a new RPC command to the system.
## Key Files
- `pkg/wshrpc/wshrpctypes.go` - RPC interface and type definitions
- `pkg/wshrpc/wshserver/wshserver.go` - Main server implementation (most common)
- `emain/emain-wsh.ts` - Electron main process implementation
- `frontend/app/store/tabrpcclient.ts` - Frontend tab implementation
- `pkg/wshrpc/wshremote/wshremote.go` - Remote server implementation
- `frontend/app/view/term/term-wsh.tsx` - Terminal block implementation
## RPC Command Structure
RPC commands in Wave Terminal follow these conventions:
- **Method names** must end with `Command`
- **First parameter** must be `context.Context`
- **Remaining parameters** are a regular Go parameter list (zero or more typed args)
- **Return values** can be either just an error, or one return value plus an error
- **Streaming commands** return a channel instead of a direct value
## Adding a New RPC Call
### Step 1: Define the Command in the Interface
Add your command to the `WshRpcInterface` in `pkg/wshrpc/wshrpctypes.go`:
```go
type WshRpcInterface interface {
// ... existing commands ...
// Add your new command
YourNewCommand(ctx context.Context, data CommandYourNewData) (*YourNewResponse, error)
}
```
**Method Signature Rules:**
- Method name must end with `Command`
- First parameter must be `ctx context.Context`
- Remaining parameters are a regular Go parameter list (zero or more)
- Return either `error` or `(ReturnType, error)`
- For streaming, return `chan RespOrErrorUnion[T]`
### Step 2: Define Request and Response Types
If your command needs structured input or output, define types in the same file:
```go
type CommandYourNewData struct {
FieldOne string `json:"fieldone"`
FieldTwo int `json:"fieldtwo"`
SomeId string `json:"someid"`
}
type YourNewResponse struct {
ResultField string `json:"resultfield"`
Success bool `json:"success"`
}
```
**Type Naming Conventions:**
- Request types: `Command[Name]Data` (e.g., `CommandGetMetaData`)
- Response types: `[Name]Response` or `Command[Name]RtnData` (e.g., `CommandResolveIdsRtnData`)
- Use `json` struct tags with lowercase field names
- Follow existing patterns in the file for consistency
### Step 3: Generate Bindings
After modifying `pkg/wshrpc/wshrpctypes.go`, run code generation to create TypeScript bindings and Go helper code:
```bash
task generate
```
This command will:
- Generate TypeScript type definitions in `frontend/types/gotypes.d.ts`
- Create RPC client bindings
- Update routing code
**Note:** If generation fails, check that your method signature follows all the rules above.
### Step 4: Implement the Command
Choose where to implement your command based on what it needs to do:
#### A. Main Server Implementation (Most Common)
Implement in `pkg/wshrpc/wshserver/wshserver.go`:
```go
func (ws *WshServer) YourNewCommand(ctx context.Context, data wshrpc.CommandYourNewData) (*wshrpc.YourNewResponse, error) {
// Validate input
if data.SomeId == "" {
return nil, fmt.Errorf("someid is required")
}
// Implement your logic
result := doSomething(data)
// Return response
return &wshrpc.YourNewResponse{
ResultField: result,
Success: true,
}, nil
}
```
**Use main server when:**
- Accessing the database
- Managing blocks, tabs, or workspaces
- Coordinating between components
- Handling file operations on the main filesystem
#### B. Electron Implementation
Implement in `emain/emain-wsh.ts`:
```typescript
async handle_yournew(rh: RpcResponseHelper, data: CommandYourNewData): Promise<YourNewResponse> {
// Electron-specific logic
const result = await electronAPI.doSomething(data);
return {
resultfield: result,
success: true,
};
}
```
**Use Electron when:**
- Accessing native OS features
- Managing application windows
- Using Electron APIs (notifications, system tray, etc.)
- Handling encryption/decryption with safeStorage
#### C. Frontend Tab Implementation
Implement in `frontend/app/store/tabrpcclient.ts`:
```typescript
async handle_yournew(rh: RpcResponseHelper, data: CommandYourNewData): Promise<YourNewResponse> {
// Access frontend state/models
const layoutModel = getLayoutModelForStaticTab();
// Implement tab-specific logic
const result = layoutModel.doSomething(data);
return {
resultfield: result,
success: true,
};
}
```
**Use tab client when:**
- Accessing React state or Jotai atoms
- Manipulating UI layout
- Capturing screenshots
- Reading frontend-only data
#### D. Remote Server Implementation
Implement in `pkg/wshrpc/wshremote/wshremote.go`:
```go
func (impl *ServerImpl) RemoteYourNewCommand(ctx context.Context, data wshrpc.CommandRemoteYourNewData) (*wshrpc.YourNewResponse, error) {
// Remote filesystem or process operations
result, err := performRemoteOperation(data)
if err != nil {
return nil, fmt.Errorf("remote operation failed: %w", err)
}
return &wshrpc.YourNewResponse{
ResultField: result,
Success: true,
}, nil
}
```
**Use remote server when:**
- Operating on remote filesystems
- Executing commands on remote hosts
- Managing remote processes
- Convention: prefix command name with `Remote` (e.g., `RemoteGetInfoCommand`)
#### E. Terminal Block Implementation
Implement in `frontendExcerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 6390784
git clone https://github.com/wavetermdev/waveterm git -C waveterm checkout 63907843412f
The author documents no install command, so this uses the repository directly. Our verdict covers commit 63907843412f only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
63907843412f
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/wavetermdev/add-rpc/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
All coding & review skills →wavetermdev/waveterm
Guide for adding new Electron APIs to Wave Terminal. Use when implementing new frontend-to-electron communications via preload/IPC.
wavetermdev/waveterm
Guide for creating WaveEnv narrowings in Wave Terminal. Use when writing a named subset type of WaveEnv for a component tree, documenting environmental dependencies, or enabling mock environments for preview/test server…
wavetermdev/waveterm
Guide for working with Wave Terminal's WPS (Wave PubSub) event system. Use when implementing new event types, publishing events, subscribing to events, or adding asynchronous communication between components.
wavetermdev/waveterm
Guide for adding new configuration settings to Wave Terminal. Use when adding a new setting to the configuration system, implementing a new config key, or adding user-customizable settings.
wavetermdev/waveterm
Guide for adding new wsh commands to Wave Terminal. Use when implementing new CLI commands, adding command-line functionality, or extending the wsh command interface.
wavetermdev/waveterm
Guide for creating and displaying context menus in Wave Terminal. Use when implementing right-click menus, adding context menu items, creating submenus, or handling menu interactions with checkboxes and separators.
Add this badge to your README
[](https://modelsatlas.com/skills/wavetermdev/add-rpc/)
<a href="https://modelsatlas.com/skills/wavetermdev/add-rpc/"><img src="https://modelsatlas.com/skills/wavetermdev/add-rpc/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about Add Rpc
What does the Add Rpc skill do?
Is Add Rpc safe to install?
What can Add Rpc access on my machine?
How current is this page?
Sources
- github.com/wavetermdev/waveterm/tree/main/.kilocode/skills/add-r — the audited source at commit 63907843412f and every finding aboveObserved · 3 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Add Rpc skill do?
- Is Add Rpc safe to install?
- What can Add Rpc access on my machine?