| name | windsurf-webhooks-events |
| description | Build Windsurf extensions and integrate with VS Code extension API events.
Use when building custom Windsurf extensions, tracking editor events,
or integrating Windsurf with external tools via extension development.
Trigger with phrases like "windsurf extension", "windsurf events",
"windsurf plugin", "build windsurf extension", "windsurf API".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(npx:*) |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","windsurf","extensions","vscode-api","development"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Windsurf Extension Development & Events
Overview
Windsurf is built on VS Code and supports the full VS Code Extension API. Build custom extensions to track workspace events, integrate with external tools, and extend Cascade's capabilities. This skill covers extension development specific to the Windsurf environment.
Prerequisites
- Node.js 18+ and npm
- VS Code Extension API familiarity
yo and generator-code for scaffolding
- Windsurf IDE for testing
Instructions
Step 1: Scaffold Extension
npm install -g yo generator-code
yo code
Step 2: Track Workspace Events
import * as vscode from "vscode";
export function activate(context: vscode.ExtensionContext) {
console.log("Extension active in Windsurf");
const saveListener = vscode.workspace.onDidSaveTextDocument(
async (document) => {
const diagnostics = vscode.languages.getDiagnostics(document.uri);
const errors = diagnostics.filter(
(d) => d.severity === vscode..
);
(errors. > ) {
vscode..(
);
}
}
);
editorListener = vscode..(
{
(editor) {
lang = editor..;
lines = editor..;
.();
}
}
);
terminalListener = vscode..( {
(event..() || event..()) {
vscode..();
}
});
context..(saveListener, editorListener, terminalListener);
}