windsurf-multi-env-setup
Configure Windsurf across development, staging, and production environments. Use when setting up multi-environment deployments, configuring per-environment secrets, or implementing environment-specific Windsurf configurations. Trigger with phrases like "windsurf environments", "windsurf staging", "windsurf dev prod", "windsurf environment setup", "windsurf config by env".
Install
mkdir -p .claude/skills/windsurf-multi-env-setup && curl -L -o skill.zip "https://mcp.directory/api/skills/download/7854" && unzip -o skill.zip -d .claude/skills/windsurf-multi-env-setup && rm skill.zipInstalls to .claude/skills/windsurf-multi-env-setup
About this skill
Windsurf Multi-Environment Setup
Overview
Configure Windsurf consistently across team members, projects, and deployment contexts. Windsurf is an IDE, not a cloud API -- "multi-environment setup" means standardizing AI behavior, workspace configuration, and Cascade context across your team.
Prerequisites
- Windsurf IDE installed on developer machines
- Shared git repository
- Team agreement on coding standards per service
Instructions
Step 1: Per-Project Cascade Rules
<!-- .windsurfrules - committed to each service repo -->
# Project: PaymentService
## Stack
- Language: TypeScript (strict)
- Framework: Fastify v4
- Database: PostgreSQL with Drizzle
- Testing: Vitest
- Queue: BullMQ for async jobs
## Architecture Rules
- All handlers in src/routes/ — never business logic
- Business logic in src/services/ only
- Database queries in src/repositories/ only
- Use Result<T, E> pattern for errors, never throw in services
- PCI-sensitive data only in src/pci/ (encrypted at rest)
## Naming Conventions
- Route handlers: GET/POST/PUT/DELETE prefix
- Service methods: verb + noun (createPayment, findOrder)
- Repository methods: DB operations (findById, upsert)
Step 2: Team IDE Settings Template
// .windsurf/settings.json - committed to repo
{
"codeium.indexing.excludePatterns": [
"node_modules/**", "dist/**", ".next/**",
"coverage/**", "*.min.js", "**/*.map", "**/*.lock"
],
"codeium.autocomplete.enable": true,
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
"typescript.tsdk": "node_modules/typescript/lib"
}
Step 3: Monorepo Multi-Service Setup
monorepo/
services/
auth/
.windsurfrules # Auth context: JWT, OAuth, session management
.codeiumignore # Exclude auth secrets directory
payments/
.windsurfrules # Payments context: Stripe, PCI compliance
.codeiumignore # Exclude PCI data directories
notifications/
.windsurfrules # Notifications: queues, email templates
.codeiumignore
.windsurf/
settings.json # Shared IDE settings
rules/
shared-patterns.md # trigger: always_on
workflows/
deploy-service.md # /deploy-service workflow
Key practice: Each developer opens their service directory as the workspace, NOT the monorepo root. This gives Cascade focused context and fast indexing.
Step 4: Environment-Specific Workflow Rules
<!-- .windsurf/rules/deployment-context.md -->
---
trigger: glob
globs: deploy/**, scripts/deploy-*, .github/workflows/deploy-*
---
## Deployment Rules
- Target: AWS ECS on us-east-1
- Container registry: 123456789.dkr.ecr.us-east-1.amazonaws.com
- Secrets: AWS Secrets Manager (prefix: myapp/{environment}/)
- Never hardcode environment-specific values
- All environment config via ENV vars, not config files
- Staging deploys from develop branch, production from main
Step 5: Onboarding Script
#!/bin/bash
# scripts/setup-windsurf.sh
set -euo pipefail
echo "Setting up Windsurf for this project..."
# Verify Windsurf installation
windsurf --version || { echo "Install Windsurf: https://windsurf.com/download"; exit 1; }
# Install recommended extensions
windsurf --install-extension esbenp.prettier-vscode
windsurf --install-extension dbaeumer.vscode-eslint
# Disable conflicting extensions
windsurf --disable-extension github.copilot 2>/dev/null || true
windsurf --disable-extension tabnine.tabnine-vscode 2>/dev/null || true
# Verify configuration
[ -f ".windsurfrules" ] || echo "WARNING: .windsurfrules not found"
[ -f ".codeiumignore" ] || echo "WARNING: .codeiumignore not found"
echo ""
echo "Setup complete."
echo "IMPORTANT: Open your service directory (not monorepo root) for best Cascade performance."
echo "Example: windsurf services/payments/"
Step 6: Per-Environment MCP Configuration
// ~/.codeium/windsurf/mcp_config.json
// Developers can configure environment-specific MCP servers
{
"mcpServers": {
"staging-db": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"DATABASE_URL": "${STAGING_DATABASE_URL}"
}
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}
Error Handling
| Issue | Cause | Solution |
|---|---|---|
| Cascade lacks project context | .windsurfrules missing or empty | Add stack + patterns to rules file |
| Slow indexing | Monorepo root open with no ignore rules | Open service subdirectory |
| Inconsistent team suggestions | No shared settings | Commit .windsurf/settings.json |
| Cascade touches wrong files | Too broad workspace scope | Open specific service directory |
| New dev has no AI context | Skipped onboarding | Run setup-windsurf.sh script |
Examples
Quick Health Check
ls -la .windsurfrules .codeiumignore .windsurf/settings.json 2>/dev/null
Per-Environment Cascade Workflows
<!-- .windsurf/workflows/deploy-staging.md -->
---
name: deploy-staging
---
1. Run `npm test` — abort if failures
2. Run `npm run build`
3. Run `aws ecs update-service --cluster staging --service payments --force-new-deployment`
4. Wait 60 seconds, then check: `curl -sf https://staging-api.example.com/health | jq .`
Resources
Next Steps
For architecture best practices, see windsurf-reference-architecture.
More by jeremylongshore
View all skills by jeremylongshore →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversBoost productivity with Task Master: an AI-powered tool for project management and agile development workflows, integrat
Unlock seamless Figma to code: streamline Figma to HTML with Framelink MCP Server for fast, accurate design-to-code work
Desktop Commander MCP unifies code management with advanced source control, git, and svn support—streamlining developmen
Create modern React UI components instantly with Magic AI Agent. Integrates with top IDEs for fast, stunning design and
Foundry Toolkit: Deploy, test, and analyze smart contracts on EVM networks and local Anvil with powerful blockchain dev
Unlock AI-powered automation for Postman for API testing. Streamline workflows, code sync, and team collaboration with f
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.