Identify and avoid Windsurf anti-patterns and common integration mistakes. Use when reviewing Windsurf code for issues, onboarding new developers, or auditing existing Windsurf integrations for best practices violations. Trigger with phrases like "windsurf mistakes", "windsurf anti-patterns", "windsurf pitfalls", "windsurf what not to do", "windsurf code review".
View on GitHubjeremylongshore/claude-code-plugins-plus-skills
windsurf-pack
plugins/saas-packs/windsurf-pack/skills/windsurf-known-pitfalls/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-known-pitfalls/SKILL.md -a claude-code --skill windsurf-known-pitfallsInstallation paths:
.claude/skills/windsurf-known-pitfalls/# Windsurf Known Pitfalls
## Overview
Common mistakes and anti-patterns when integrating with Windsurf.
## Prerequisites
- Access to Windsurf codebase for review
- Understanding of async/await patterns
- Knowledge of security best practices
- Familiarity with rate limiting concepts
## Pitfall #1: Synchronous API Calls in Request Path
### ❌ Anti-Pattern
```typescript
// User waits for Windsurf API call
app.post('/checkout', async (req, res) => {
const payment = await windsurfClient.processPayment(req.body); // 2-5s latency
const notification = await windsurfClient.sendEmail(payment); // Another 1-2s
res.json({ success: true }); // User waited 3-7s
});
```
### ✅ Better Approach
```typescript
// Return immediately, process async
app.post('/checkout', async (req, res) => {
const jobId = await queue.enqueue('process-checkout', req.body);
res.json({ jobId, status: 'processing' }); // 50ms response
});
// Background job
async function processCheckout(data) {
const payment = await windsurfClient.processPayment(data);
await windsurfClient.sendEmail(payment);
}
```
---
## Pitfall #2: Not Handling Rate Limits
### ❌ Anti-Pattern
```typescript
// Blast requests, crash on 429
for (const item of items) {
await windsurfClient.process(item); // Will hit rate limit
}
```
### ✅ Better Approach
```typescript
import pLimit from 'p-limit';
const limit = pLimit(5); // Max 5 concurrent
const rateLimiter = new RateLimiter({ tokensPerSecond: 10 });
for (const item of items) {
await rateLimiter.acquire();
await limit(() => windsurfClient.process(item));
}
```
---
## Pitfall #3: Leaking API Keys
### ❌ Anti-Pattern
```typescript
// In frontend code (visible to users!)
const client = new WindsurfClient({
apiKey: 'sk_live_ACTUAL_KEY_HERE', // Anyone can see this
});
// In git history
git commit -m "add API key" // Exposed forever
```
### ✅ Better Approach
```typescript
// Backend only, environment variable
const client = new WindsurfClient({
apiKe