Skip to content
windsurf-core-workflow-b logo

Windsurf Core Workflow B — Workflows & Memories

windsurf-core-workflow-b

Execute Windsurf''s secondary workflow: Workflows, Memories, and reusable

SKILL.md

Full skill instructions

Windsurf Core Workflow B — Workflows & Memories

Overview

Windsurf Workflows are reusable, multi-step automation sequences saved as markdown files and invoked via slash commands in Cascade. Memories are persistent facts that survive across sessions. Together they eliminate repetitive prompting and maintain project context.

Prerequisites

  • Windsurf with Cascade enabled
  • Understanding of windsurf-core-workflow-a (Write mode)
  • .windsurfrules configured

Instructions

Step 1: Create a Workflow File

Workflows live in .windsurf/​workflows/ as markdown files. Each becomes a slash command.

<!-- .windsurf/​workflows/​new-feature.md -->
---
name: new-feature
description: Scaffold a new feature with service, route, and tests
---

## Steps

1. Ask the user for: feature name, description, and which database tables are involved
2. Create `src/​services/​${feature-name}.ts` with:
   - CRUD methods using Result<T,E> pattern
   - Input validation with zod schemas
   - JSDoc comments on all public methods
3. Create `src/​routes/​${feature-name}.ts` with:
   - GET, POST, PUT, DELETE route handlers
   - Request validation middleware
   - Consistent error response format
4. Create `tests/​services/​${feature-name}.test.ts` with:
   - Unit tests for all service methods
   - Both success and error paths
5. Run `npx vitest run tests/​services/​${feature-name}.test.ts`
6. If tests pass, report success. If not, fix and re-run.

Invoke in Cascade: /​new-feature

Step 2: Build a Deployment Workflow

<!-- .windsurf/​workflows/​deploy.md -->
---
name: deploy
description: Deploy to staging with pre-flight checks
---

## Pre-Flight Checks
1. Run `npm run typecheck` — stop if errors
2. Run `npm test` — stop if failures
3. Run `npm run lint` — stop if errors
4. Check `git status` — stop if uncommitted changes

## Deploy
5. Run `git push origin HEAD`
6. Run `npm run build`
7. Run `npm run deploy:staging`

## Post-Deploy
8. Run `curl -sf https://staging.example.com/​health | jq .`
9. Report deploy status with health check result

Step 3: Enable Turbo Annotations in Workflows

Add turbo annotations to auto-execute specific commands:

<!-- In any workflow step -->
Run the following command:
```bash
// turbo
npm run typecheck

Or auto-run all commands in the workflow:

// turbo-all

Turbo annotations respect allow/​deny lists configured in settings.

Step 4: Manage Cascade Memories

Memories persist facts across sessions. They are auto-generated or manually created.

Create a memory manually:

Cascade prompt: "Remember that our API uses snake_case for JSON
field names but camelCase for TypeScript interfaces. We transform
with a middleware layer in src/​middleware/​transform.ts."

View and manage memories:

  • Click Customizations icon (top-right of Cascade panel)
  • Navigate to Memories tab
  • Delete outdated memories
  • Memories are stored at ~/​.codeium/​windsurf/​memories/

Key difference: Rules vs Memories:

AspectRulesMemories
Created byDeveloperCascade (auto) or developer
Stored in.windsurfrules or .windsurf/​rules/~/​.codeium/​windsurf/​memories/
ScopeWorkspace or globalWorkspace-specific
Version controlledYes (committed to git)No (local only)
ReliabilityHigh (always applied)Medium (model decides relevance)
Best forStandards, patternsDecisions, discoveries

Step 5: Chain Workflows Together

Reference other workflows within a workflow:

<!-- .windsurf/​workflows/​release.md -->
---
name: release
description: Full release workflow
---

1. Run /​deploy workflow first
2. After staging deploy succeeds, ask user to confirm production deploy
3. Run `npm run deploy:production`
4. Create GitHub release: `gh release create v$(node -p "require('./​package.json').version")`
5. Post to #releases channel via webhook

Error Handling

IssueCauseSolution
Slash command not foundFile not in .windsurf/​workflows/Check file location and name
Workflow skips stepsAmbiguous instructionsUse numbered steps with clear conditions
Memory not recalledLow relevance scoreConvert important memories to Rules
Turbo runs dangerous commandNot in deny listAdd to cascadeCommandsDenyList
Workflow too longOver context limitSplit into smaller, composable workflows

Examples

PR Review Workflow

<!-- .windsurf/​workflows/​review-pr.md -->
---
name: review-pr
description: Review current PR changes
---
1. Run `git diff main...HEAD --stat` to see changed files
2. For each changed file, analyze the diff for:
   - Missing error handling
   - Missing tests for new code
   - Security issues (hardcoded secrets, SQL injection)
   - Performance concerns (N+1 queries, missing indexes)
3. Summarize findings as a bulleted list

Code Quality Workflow

<!-- .windsurf/​workflows/​quality-check.md -->
---
name: quality-check
description: Run full code quality suite
---
// turbo-all
1. Run `npm run typecheck`
2. Run `npm run lint`
3. Run `npm test -- --coverage`
4. Report: types, lint issues, test results, coverage percentage

Resources

Next Steps

For common errors, see windsurf-common-errors.

More skills from jeremylongshore

openrouter-compliance-review logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-compliance-review

Review OpenRouter integration for regulatory compliance (SOC2, GDPR,

2.8K 0
View
maintainx-data-handling logo
jeremylongshore/claude-code-plugins-plus-skills

maintainx-data-handling

Data synchronization, ETL patterns, and data management for MaintainX.

2.8K 0
View
groq-core-workflow-a logo
jeremylongshore/claude-code-plugins-plus-skills

groq-core-workflow-a

Execute Groq primary workflow: chat completions with tool use and JSON

2.8K 0
View
validating-csrf-protection logo
jeremylongshore/claude-code-plugins-plus-skills

validating-csrf-protection

Validate CSRF protection implementations for security gaps. Use when

2.8K 0
View
api-contract logo
jeremylongshore/claude-code-plugins-plus-skills

api-contract

Configure this skill should be used when the user asks about "API contract",

2.8K 0
View
ideogram-incident-runbook logo
jeremylongshore/claude-code-plugins-plus-skills

ideogram-incident-runbook

Execute Ideogram incident response with triage, mitigation, and postmortem.

2.8K 0
View
gamma-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

gamma-sdk-patterns

Reusable patterns for the Gamma REST API (no SDK exists).

2.8K 0
View
deepgram-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

deepgram-sdk-patterns

Apply production-ready Deepgram SDK patterns for TypeScript and Python.

2.8K 0
View
openrouter-upgrade-migration logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-upgrade-migration

Migrate to OpenRouter from direct provider APIs or upgrade between SDK/model

2.8K 0
View
openrouter-common-errors logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-common-errors

Diagnose and fix common OpenRouter API errors. Use when encountering

2.8K 0
View
linear-cost-tuning logo
jeremylongshore/claude-code-plugins-plus-skills

linear-cost-tuning

Optimize Linear API usage, reduce unnecessary calls, and maximize

2.8K 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View