Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Windsurf Webhooks Events

ASecurity

'Build Devin Desktop (formerly Windsurf) extensions and integrate with VS Code extension API events.

2,785 stars
0 votes
0 copies
0 views
Added 9/24/2026
ai-agentstypescriptbashnodenodejstestingapi

Works with

claude codevscodeterminalapi

Security Analysis

A96/100
mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned 9/24/2026

$npx -y skills add jeremylongshore/claude-code-plugins-plus --skill windsurf-webhooks-events --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Windsurf Webhooks Events?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Windsurf Webhooks Events
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jeremylongshore-windsurf-webhooks-events-5a5eeb07/badge)](https://www.skillsdirectory.com/skills/jeremylongshore-windsurf-webhooks-events-5a5eeb07)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: windsurf-webhooks-events
description: 'Build Devin Desktop (formerly 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:*)
argument-hint: "[scope or requirements]"
version: 1.12.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
tags:
- saas
- windsurf
- extensions
- vscode-api
- development
compatibility: Designed for Claude Code
---
# Windsurf Extension Development & Events

## Overview

Build compatible extensions on Devin Desktop's VS Code foundation to observe workspace events and integrate external tools. Keep telemetry, credential, network, and user-consent boundaries explicit instead of assuming every VS Code behavior is product-guaranteed.

## Prerequisites

- Node.js 18+ and npm
- VS Code Extension API familiarity
- `yo` and `generator-code` for scaffolding
- Windsurf IDE for testing

## Tool Use

- Use `Read` to inspect only the repository files and configuration needed for the request.
- Use `Write` only for a new artifact the user requested; never write credentials or unreviewed production configuration.
- Use `Edit` for bounded, reviewable changes and preserve unrelated user work.
- Use only the command-scoped `Bash` entries declared in frontmatter, with non-destructive checks before mutations.

## 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)
```

## Output

Produce a reviewed VS Code-compatible extension change with event subscriptions, disposal lifecycle, authentication and secret storage, payload schema, retry behavior, local test evidence, package metadata, and marketplace compatibility notes. Do not log raw credentials or proprietary source.

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

- [Focused first-party references](references/official-docs.md)
- [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)

## Related Skill

Continue with `windsurf-multi-env-setup` to package extension settings, event destinations, and environment-specific policies for repeatable team rollout.

Attribution

jeremylongshorejeremylongshore
View sourceSee grades on GitHubMore from jeremylongshore →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698431 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →