Implement Windsurf reference architecture with best-practice project layout. Use when designing new Windsurf integrations, reviewing project structure, or establishing architecture standards for Windsurf applications. Trigger with phrases like "windsurf architecture", "windsurf best practices", "windsurf project structure", "how to organize windsurf", "windsurf layout".
View on GitHubjeremylongshore/claude-code-plugins-plus-skills
windsurf-pack
plugins/saas-packs/windsurf-pack/skills/windsurf-reference-architecture/SKILL.md
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/main/plugins/saas-packs/windsurf-pack/skills/windsurf-reference-architecture/SKILL.md -a claude-code --skill windsurf-reference-architectureInstallation paths:
.claude/skills/windsurf-reference-architecture/# Windsurf Reference Architecture
## Overview
Production-ready architecture patterns for Windsurf integrations.
## Prerequisites
- Understanding of layered architecture
- Windsurf SDK knowledge
- TypeScript project setup
- Testing framework configured
## Project Structure
```
my-windsurf-project/
├── src/
│ ├── windsurf/
│ │ ├── client.ts # Singleton client wrapper
│ │ ├── config.ts # Environment configuration
│ │ ├── types.ts # TypeScript types
│ │ ├── errors.ts # Custom error classes
│ │ └── handlers/
│ │ ├── webhooks.ts # Webhook handlers
│ │ └── events.ts # Event processing
│ ├── services/
│ │ └── windsurf/
│ │ ├── index.ts # Service facade
│ │ ├── sync.ts # Data synchronization
│ │ └── cache.ts # Caching layer
│ ├── api/
│ │ └── windsurf/
│ │ └── webhook.ts # Webhook endpoint
│ └── jobs/
│ └── windsurf/
│ └── sync.ts # Background sync job
├── tests/
│ ├── unit/
│ │ └── windsurf/
│ └── integration/
│ └── windsurf/
├── config/
│ ├── windsurf.development.json
│ ├── windsurf.staging.json
│ └── windsurf.production.json
└── docs/
└── windsurf/
├── SETUP.md
└── RUNBOOK.md
```
## Layer Architecture
```
┌─────────────────────────────────────────┐
│ API Layer │
│ (Controllers, Routes, Webhooks) │
├─────────────────────────────────────────┤
│ Service Layer │
│ (Business Logic, Orchestration) │
├─────────────────────────────────────────┤
│ Windsurf Layer │
│ (Client, Types, Error Handling) │
├─────────────────────────────────────────┤
│ Infrastructure Layer │
│ (Cache, Queue, Monitoring) │
└─────────────────────────────────────────┘
```
## Key Components
### Step 1: Client Wrapper
```typescript
// src/windsurf/