windsurf-webhooks-events
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".
Best use case
windsurf-webhooks-events is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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".
Teams using windsurf-webhooks-events should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/windsurf-webhooks-events/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How windsurf-webhooks-events Compares
| Feature / Agent | windsurf-webhooks-events | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# 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
```bash
# Install scaffolding tools
npm install -g yo generator-code
# Generate extension
yo code
# Select: New Extension (TypeScript)
# Name: my-windsurf-extension
```
### Step 2: Track Workspace Events
```typescript
// src/extension.ts
import * as vscode from "vscode";
export function activate(context: vscode.ExtensionContext) {
console.log("Extension active in Windsurf");
// Track file saves
const saveListener = vscode.workspace.onDidSaveTextDocument(
async (document) => {
const diagnostics = vscode.languages.getDiagnostics(document.uri);
const errors = diagnostics.filter(
(d) => d.severity === vscode.DiagnosticSeverity.Error
);
if (errors.length > 0) {
vscode.window.showWarningMessage(
`${document.fileName}: ${errors.length} error(s) after save`
);
}
}
);
// Track active editor changes
const editorListener = vscode.window.onDidChangeActiveTextEditor(
(editor) => {
if (editor) {
const lang = editor.document.languageId;
const lines = editor.document.lineCount;
console.log(`Opened: ${editor.document.fileName} (${lang}, ${lines} lines)`);
}
}
);
// Track terminal output
const terminalListener = vscode.window.onDidWriteTerminalData((event) => {
// Can monitor for specific patterns (errors, warnings)
if (event.data.includes("ERROR") || event.data.includes("FAIL")) {
vscode.window.showWarningMessage("Error detected in terminal output");
}
});
context.subscriptions.push(saveListener, editorListener, terminalListener);
}
```
### Step 3: Send Events to External System
```typescript
// src/webhook.ts
import * as vscode from "vscode";
interface WorkspaceEvent {
event: string;
file?: string;
language?: string;
timestamp: string;
metadata?: Record<string, unknown>;
}
async function sendEvent(event: WorkspaceEvent): Promise<void> {
const webhookUrl = vscode.workspace
.getConfiguration("windsurf-events")
.get<string>("webhookUrl");
if (!webhookUrl) return;
try {
await fetch(webhookUrl, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(event),
});
} catch (err) {
console.warn("Webhook delivery failed:", err);
}
}
// Debounce frequent events
const debounceMap = new Map<string, NodeJS.Timeout>();
function debouncedSend(event: WorkspaceEvent, delayMs = 2000): void {
const key = `${event.event}:${event.file}`;
clearTimeout(debounceMap.get(key));
debounceMap.set(
key,
setTimeout(() => {
sendEvent(event);
debounceMap.delete(key);
}, delayMs)
);
}
```
### Step 4: Extension package.json
```json
{
"name": "windsurf-events",
"displayName": "Windsurf Events",
"version": "1.0.0",
"engines": { "vscode": "^1.85.0" },
"activationEvents": ["onStartupFinished"],
"main": "./dist/extension.js",
"contributes": {
"configuration": {
"title": "Windsurf Events",
"properties": {
"windsurf-events.webhookUrl": {
"type": "string",
"description": "URL to send workspace events to"
},
"windsurf-events.trackSaves": {
"type": "boolean",
"default": true,
"description": "Track file save events"
},
"windsurf-events.trackErrors": {
"type": "boolean",
"default": true,
"description": "Track terminal error events"
}
}
},
"commands": [
{
"command": "windsurf-events.showStatus",
"title": "Windsurf Events: Show Status"
}
]
}
}
```
### Step 5: Build and Install
```bash
# Build
npm run compile
# or: npm run build
# Package as .vsix
npx vsce package
# Install in Windsurf
windsurf --install-extension windsurf-events-1.0.0.vsix
# Or publish to marketplace
npx vsce publish
```
### Step 6: Test in Windsurf
```
1. Open Extension Development Host: F5 in Windsurf
2. A new Windsurf window opens with extension loaded
3. Open a file, save it, trigger events
4. Check Output panel > "Windsurf Events" channel
5. Verify webhook delivery (use https://webhook.site for testing)
```
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Extension not activating | Wrong `activationEvents` | Use `onStartupFinished` for always-on |
| Webhook fails | Network/URL issue | Queue locally, retry with backoff |
| High CPU usage | Too many listeners | Debounce frequent events (saves, edits) |
| API incompatibility | Windsurf vs VS Code version | Pin `engines.vscode` version |
| `vsce package` fails | Missing fields | Add publisher, repository, license |
## Examples
### Team Analytics Extension
```typescript
// Track AI acceptance rate per developer
vscode.languages.registerInlineCompletionItemProvider(
{ pattern: "**" },
{
provideInlineCompletionItems(document, position) {
// Log completion requests (don't interfere with Supercomplete)
console.log(`Completion at ${document.fileName}:${position.line}`);
return []; // Return empty -- let Windsurf handle completions
}
}
);
```
### Quick Test Webhook
```bash
# Start a test webhook receiver
npx -y webhook-relay -p 3456
# Configure extension: windsurf-events.webhookUrl = "http://localhost:3456"
```
## Resources
- [VS Code Extension API](https://code.visualstudio.com/api)
- [VS Code Extension Publishing](https://code.visualstudio.com/api/working-with-extensions/publishing-extension)
- [Windsurf Marketplace](https://marketplace.windsurf.com)
## Next Steps
For multi-environment setup, see `windsurf-multi-env-setup`.Related Skills
workhuman-webhooks-events
Workhuman webhooks events for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman webhooks events".
wispr-webhooks-events
Wispr Flow webhooks events for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr webhooks events".
windsurf-upgrade-migration
Upgrade Windsurf IDE, migrate settings from VS Code or Cursor, and handle breaking changes. Use when upgrading Windsurf versions, migrating from another editor, or handling configuration changes after updates. Trigger with phrases like "upgrade windsurf", "windsurf update", "migrate to windsurf", "windsurf from cursor", "windsurf from vscode".
windsurf-security-basics
Apply Windsurf security best practices for workspace isolation, data privacy, and secret protection. Use when securing sensitive code from AI indexing, configuring telemetry, or auditing Windsurf security posture. Trigger with phrases like "windsurf security", "windsurf secrets", "windsurf privacy", "windsurf data protection", "codeiumignore".
windsurf-sdk-patterns
Apply production-ready Windsurf workspace configuration and Cascade interaction patterns. Use when configuring .windsurfrules, workspace rules, MCP servers, or establishing team coding standards for Windsurf AI. Trigger with phrases like "windsurf patterns", "windsurf best practices", "windsurf config patterns", "windsurfrules", "windsurf workspace".
windsurf-reliability-patterns
Implement reliable Cascade workflows with checkpoints, rollback, and incremental editing. Use when building fault-tolerant AI coding workflows, preventing Cascade from breaking builds, or establishing safe practices for multi-file AI edits. Trigger with phrases like "windsurf reliability", "cascade safety", "windsurf rollback", "cascade checkpoint", "safe cascade workflow".
windsurf-reference-architecture
Implement Windsurf reference architecture with optimal project structure and AI configuration. Use when designing workspace configuration for Windsurf, setting up team standards, or establishing architecture patterns that maximize Cascade effectiveness. Trigger with phrases like "windsurf architecture", "windsurf project structure", "windsurf best practices", "windsurf team setup", "optimize for cascade".
windsurf-rate-limits
Understand and manage Windsurf credit system, usage limits, and model selection. Use when running out of credits, optimizing AI usage costs, or understanding the credit-per-model pricing structure. Trigger with phrases like "windsurf credits", "windsurf rate limit", "windsurf usage", "windsurf out of credits", "windsurf model costs".
windsurf-prod-checklist
Execute Windsurf production readiness checklist for team and enterprise deployments. Use when rolling out Windsurf to a team, preparing for enterprise deployment, or auditing production configuration. Trigger with phrases like "windsurf production", "windsurf team rollout", "windsurf go-live", "windsurf enterprise deploy", "windsurf checklist".
windsurf-policy-guardrails
Implement team-wide Windsurf usage policies, code quality gates, and Cascade guardrails. Use when setting up code review policies for AI-generated code, configuring Turbo mode safety controls, or implementing CI gates for Cascade output. Trigger with phrases like "windsurf policy", "windsurf guardrails", "cascade safety rules", "windsurf team rules", "AI code policy".
windsurf-performance-tuning
Optimize Windsurf IDE performance: indexing speed, Cascade responsiveness, and memory usage. Use when Windsurf is slow, indexing takes too long, Cascade times out, or the IDE uses too much memory. Trigger with phrases like "windsurf slow", "windsurf performance", "optimize windsurf", "windsurf memory", "cascade slow", "indexing slow".
windsurf-observability
Monitor Windsurf AI adoption, feature usage, and team productivity metrics. Use when tracking AI feature usage, measuring ROI, setting up dashboards, or analyzing Cascade effectiveness across your team. Trigger with phrases like "windsurf monitoring", "windsurf metrics", "windsurf analytics", "windsurf usage", "windsurf adoption".