Windsurf rules and Claude skills represent two distinct agent instruction models: Windsurf Cascade rules apply global or project-wide system guidelines across your IDE sessions, whereas Claude Code skills use modular directory packages with YAML frontmatter for on-demand procedural execution. Synchronizing them requires converting monolithic rule files into modular, trigger-aware instructions that follow you across workflows.
What Are Windsurf Cascade Rules and How Do They Work?
Windsurf Cascade rules are persistent configuration directives stored in a root .windsurfrules file or user global memories that dictate coding style, architectural boundaries, and tool execution behavior within the Windsurf IDE. They load into Cascade's active reasoning context on every session initialization, ensuring that the model adheres to your codebase conventions without repetitive prompting. However, because they are injected globally, they scale linearly in context token consumption as rules expand.
According to the official Windsurf Cascade documentation, Cascade rules serve as "persistent workspace context and operational constraints that guide Cascade's agentic reasoning and tool execution across your codebase." Inside Windsurf, instructions operate across two primary tiers:
- Workspace-Level Rules (
.windsurfrules): Located at the root of your project directory, this plaintext markdown file is read automatically by Cascade whenever a chat, edit, or terminal action begins. It defines repository-specific constraints such as package managers (e.g.,pnpmovernpm), test runners (e.g.,vitest), styling libraries, and branch naming conventions. - Global User Memories (
global_rules.md): Located in~/.codeium/windsurf/memories/global_rules.md, these directives capture cross-project developer preferences, such as preferred programming idioms, personal tone, and universal git safety constraints.
While Windsurf Cascade rules offer frictionless setup—requiring only a single markdown file at the repository root—their fundamental constraint is that they are monolithic and static. On every turn of interaction, Cascade ingests the entire contents of .windsurfrules into the active context window, whether the task involves a complex database refactor or merely changing a CSS color token.
What Are Claude Code Skills and How Do They Differ in Architecture?
Claude Code skills are modular, filesystem-based capability packages defined by a SKILL.md file with YAML 1.2 frontmatter metadata stored in ~/.claude/skills or project .claude/skills directories. Unlike static workspace rules, Claude Code skills use an on-demand, lazy-loaded discovery model where the agent indexes lightweight semantic descriptions at startup and only ingests procedural instructions when a user's prompt matches the trigger intent. This architectural separation preserves up to 96% of the 200,000-token context window during daily terminal sessions.
As detailed in the official Anthropic Claude Code documentation, skills are modular packages that structure "procedural workflows, domain constraints, and reusable prompts into directory-based modules that Claude dynamically invokes based on semantic task matching."
The Claude Code architecture enforces a strict four-part anatomy within each SKILL.md manifest:
- YAML 1.2 Frontmatter: Defines the unique skill
name, executiondescription(semantic trigger criteria under 1,024 characters), and optionalallowed-toolspermissions. - Operational Boundaries: Explicit system constraints and negative boundaries detailing what the agent must not modify.
- Procedural Playbook: Step-by-step deterministic instructions, bash execution snippets, and branch resolution logic.
- Verification Assertions: Self-testing rubrics, linter commands, and verification criteria to validate changes before concluding.
Because Claude Code evaluates skills dynamically, a developer can install 50 specialized skills without exhausting the model's working memory. To learn more about directory resolution, explore our guide on where Claude Code stores personal vs project skills.
Windsurf Cascade Rules vs Claude Code Skills: Direct Architectural Comparison
Comparing Windsurf Cascade rules directly with Claude Code skills reveals contrasting trade-offs across trigger mechanisms, filesystem locations, token economics, and team synchronization. While Windsurf optimizes for immediate in-editor context across interactive chats, Claude Code optimizes for token-efficient procedural tasks within the command-line interface.
| Dimension | Windsurf Cascade Rules | Claude Code Skills | Architectural Takeaway |
|---|---|---|---|
| Primary Configuration File | .windsurfrules (workspace root) or global memories | ~/.claude/skills/<name>/SKILL.md or .claude/skills/ | Windsurf uses flat markdown files; Claude Code requires structured directories. |
| Context Ingestion Model | Static injection on every session turn | Semantic lazy-loading based on YAML frontmatter | Claude Code isolates execution tokens until actively invoked by matching intent. |
| Baseline Token Overhead | 2,000–3,500 tokens per prompt turn (for 2,500-word rules) | <150 tokens total cache index across entire skill library | Claude Code delivers up to 96% context budget savings during idle turns. |
| Multi-File & Script Execution | Limited to in-editor context and workspace files | Native support for bundled bash scripts and templates | Claude skills can execute deterministic shell scripts directly on the host. |
| Hierarchy & Precedence | Global memories overridden by workspace .windsurfrules | Project skills override personal ~/.claude/skills | Both platforms support two-tier global vs local rule resolution. |
| Cross-Machine Synchronization | Manual git commits or IDE profile sync | Manual filesystem dotfiles or symlink scripts | Neither tool natively syncs instructions across machines without an external tool. |
Windsurf Cascade rules inject static guidelines into active session memory on every interaction, whereas Claude Code skills use semantic YAML frontmatter to lazy-load instructions only when triggered. For developers who operate across both desktop editors and terminal agents, maintaining separate files across both ecosystems creates friction and divergence over time. You can compare how these standards align with Cursor and Codex in our architectural guide on Cursor Rules vs Claude Skills, CLAUDE.md, and AGENTS.md.
How Do Context Window Economics Compare Between Static Rules and Modular Skills?
Static rules in Windsurf Cascade cost tokens on every single query turn, whereas Claude Code skills consume working memory only during active execution. A 2,500-word .windsurfrules file injects approximately 3,200 tokens into every model interaction regardless of task relevance, consuming over 64,000 tokens across a 20-turn coding conversation. Claude Code's two-tier indexing architecture keeps idle token cost under 150 tokens across an entire 20-skill library, loading the complete 1,200-token procedural playbook only when the specific skill is invoked.
In modern coding models such as Anthropic's Claude 3.7 Sonnet and Claude 3.5 Sonnet, context window efficiency directly impacts reasoning depth and response latency. While a 200,000-token context window appears ample, attention degradation occurs when multi-thousand-token system prompts are continuously re-processed alongside massive git diffs, AST file trees, and terminal outputs.
A monolithic .windsurfrules file scales linearly in token cost with every instruction added, while directory-based SKILL.md architectures isolate execution token overhead until runtime. Consider the math across a standard 30-turn refactoring session:
- Windsurf Monolithic Injection: 3,200 tokens × 30 turns = 96,000 cumulative context tokens spent parsing static rules, leaving less effective working memory for multi-file code synthesis and compiler diagnostics.
- Claude Code Lazy Loading: 120 frontmatter tokens indexed across startup + 1,200 tokens injected only during the 4 turns where the specific skill is executed = 4,920 total tokens.
This represents a 94.8% reduction in token overhead. By decomposing generalized project guidelines into trigger-aware modules, developers prevent attention dilution and ensure their agents remain focused on relevant code logic.
How to Convert a Monolithic .windsurfrules File Into Modular Claude Skills
To convert a monolithic .windsurfrules file into modular Claude Code skills, developers must decompose generalized guidelines into distinct operational domains, extract actionable procedures into separate directories, and prepend standardized YAML 1.2 frontmatter headers. Each converted rule receives an explicit trigger description and boundary constraints, transforming static markdown text into dynamic agent capabilities. This restructuring isolates specialized logic such as database migrations, API testing, or linting into on-demand execution units.
Here is an example of an unmanaged, monolithic .windsurfrules file commonly found in full-stack repositories:
# Monolithic .windsurfrules (Antipattern: 2,800 tokens injected every turn)
Always use TypeScript in strict mode. Never use "any".
When building React components, use Tailwind CSS and shadcn/ui primitives.
For database queries, use Prisma ORM with explicit transaction blocks.
When writing unit tests, use Vitest with react-testing-library.
When deploying database migrations, run "pnpm prisma migrate dev" and update the seed file.
Always verify that prisma generate runs after modifying schema.prisma.
Ensure all API routes return standard JSON error envelopes with code, message, and timestamp.When converted into a production-grade Claude Code skill located at ~/.claude/skills/prisma-database-migration/SKILL.md, the database-specific rules become an isolated, executable capability:
---
name: prisma-database-migration
description: Applies database schema updates, generates Prisma client types, and validates database migrations. Trigger when editing schema.prisma or running migrations.
allowed-tools: [Bash, ReadFile, WriteFile]
---
# Prisma Database Migration Playbook
## Operational Boundaries
- NEVER execute destructive migration resets (`prisma migrate reset`) in production or staging environments.
- NEVER edit generated files in `node_modules/@prisma/client` manually.
- ALL schema modifications must include corresponding seed assertions in `prisma/seed.ts`.
## Execution Workflow
1. Inspect pending schema diffs:
```bash
pnpm prisma diff --from-schema-datamodel prisma/schema.prisma --to-schema-datasource prisma/schema.prisma
```
2. Generate migration SQL with explicit naming:
```bash
pnpm prisma migrate dev --name <descriptive_migration_name> --create-only
```
3. Review generated SQL in `prisma/migrations/` for non-null constraints without default values.
4. Execute migration and update client bindings:
```bash
pnpm prisma migrate deploy && pnpm prisma generate
```
## Verification & Test Gate
- Execute database integration tests: `pnpm test:db`
- Validate schema drift: `pnpm prisma migrate status`Notice how the converted skill includes executable bash commands, negative constraints, and verification assertions. If you want to automate this conversion across your existing prompt collections, you can build custom skills instantly using our free Claude Skill Creator.
The Sprawl Moment: The Rule That Vanished When You Switched from Windsurf to Terminal
You spend four days fine-tuning a meticulous set of TypeScript refactoring constraints, API error-handling patterns, and Vitest mocking rules inside your repository's .windsurfrules file in Windsurf. Cascade follows them flawlessly, generating exact DTO mappings without hallucinating deprecated types. An hour later, an urgent production hotfix requires running Claude Code from a headless SSH terminal on your remote staging server. You fire up claude and type your refactoring prompt, expecting the same clean architecture. Instead, Claude Code proceeds to generate legacy callback patterns and invalid mock fixtures—because your hard-won guidelines live solely in a local IDE file on your desktop, completely invisible to the CLI agent on the server.
Prompttly is a skill manager for AI agents — one library for your skills and prompts that syncs into Claude Code, Codex, ChatGPT, and Claude and is one hotkey away on your Mac, so your setup follows you across every machine, repo, and tool.
With Prompttly's native Mac hotkey palette, you never have to hunt through forgotten repositories or browser tabs to find an instruction. Tapping your global shortcut brings up your entire prompt and skill library in under 200ms, allowing you to insert tested rules or trigger agent workflows anywhere on macOS. To learn how to organize your instruction set across multiple coding assistants, review our guide on managing prompt sprawl when using 3+ AI coding assistants.
How Can You Sync Rules and Skills Across Windsurf, Claude Code, and Other Agents?
Synchronizing agent instructions across Windsurf Cascade, Claude Code, and Cursor requires establishing a single central library that automatically translates and exports to tool-specific filesystem paths. Developers can implement automated directory symlinks or deploy an agent skill manager like Prompttly to synchronize SKILL.md directories and .windsurfrules exports without manual file duplication. This approach ensures that updates made to your coding standards propagate immediately across terminal CLIs, desktop IDEs, and remote machines.
Maintaining separate instruction files for Windsurf and Claude Code guarantees prompt drift, requiring dual maintenance whenever architectural standards or testing scripts change. Engineering teams can solve this multi-agent synchronization challenge using a three-stage pipeline:
- Centralize Instruction Source of Truth: Store canonical guidelines in a version-controlled, agent-agnostic library rather than committing hardcoded files into individual git repos. This decouples your agent rules from volatile git branches and worktrees, as outlined in our analysis of fixing broken agent instructions across repos and worktrees.
- Automated Multi-Agent Compilation: When syncing to a local development machine, compile canonical skills into their respective target formats:
- Claude Code receives directory packages in
~/.claude/skills/<skill-name>/SKILL.md. - Windsurf receives compiled summaries exported into
.windsurfrulesor global memories. - Cursor receives rule definitions mapped into
.cursor/rules/*.mdc.
- Claude Code receives directory packages in
- Global Hotkey Access for Manual Invocations: For web-based models like ChatGPT, Claude.ai, or ad-hoc terminal prompts, use a native hotkey palette to inject instructions instantly without copy-pasting across browser windows.
Prompttly functions as a centralized skill manager that bridges Windsurf rules and Claude Code skills, synchronizing instructions across local directories and providing sub-200ms hotkey retrieval on macOS. Whether you are standardizing prompts for yourself or onboarding engineering teammates, having one synchronized library ensures that your AI agents always execute with identical standards. For an evaluation of prompt management software, check out our buyer's guide to the best prompt managers for developers.
Frequently Asked Questions About Windsurf Rules and Claude Skills
Can Windsurf Cascade read Claude Code SKILL.md files directly?
No, Windsurf Cascade does not natively parse SKILL.md files or evaluate YAML 1.2 frontmatter metadata. Windsurf reads instructions from .windsurfrules at the workspace root or global memories, while Claude Code discovers skills within ~/.claude/skills and project .claude/skills directories. Bridging the two requires using a skill manager like Prompttly or an export script that compiles modular skills into Windsurf-compatible markdown.
Where does Windsurf store global rules compared to project rules?
Windsurf stores project-level rules in a .windsurfrules file located at the workspace root directory. Global user instructions are managed through Windsurf Cascade Memories (~/.codeium/windsurf/memories/global_rules.md) or configured through the Windsurf IDE settings interface, applying across all open workspaces and projects on that machine.
What happens if you have both .windsurfrules and SKILL.md in the same repository?
Having both files in the same repository works without technical conflict because each tool inspects only its native paths: Windsurf ingests .windsurfrules during Cascade sessions, while Claude Code discovers skills inside .claude/skills/<skill-name>/SKILL.md. However, maintaining both files manually introduces rule drift whenever coding standards or testing procedures change.
How does Prompttly synchronize instructions between Windsurf and Claude Code?
Prompttly maintains a centralized cloud library of your skills, rules, and prompts. It synchronizes instructions down to your Mac filesystem as native SKILL.md folders for Claude Code and automated exports for .windsurfrules, while providing sub-200ms hotkey palette access to your entire library from any application.
Can you use Model Context Protocol (MCP) servers alongside Windsurf rules and Claude skills?
Yes. Both Windsurf and Claude Code support Model Context Protocol (MCP) to connect agents to external data sources, database inspectors, and execution tools. Instructions in .windsurfrules and SKILL.md files can define constraints and directives guiding how each agent invokes available MCP tools during complex multi-step workflows.
Related Resources and Guides
Explore additional technical deep-dives on managing agent instructions, prompt libraries, and multi-agent developer workflows:
- Cursor Rules vs Claude Skills: What is the Difference?
- Agent Skills & Claude Skills: The Complete Guide to SKILL.md
- Claude Skills Across Projects: Personal vs Project Skills Directory Hierarchy
- How to Manage Prompt Sprawl When You Use 3+ AI Coding Assistants
- Best Prompt Managers for Developers in 2026
- Explore All Prompttly Developer Resources and Prompt Libraries
Related Prompt Resources
Keep your skills and rules in sync across Windsurf and Claude Code
Stop copying rules between .windsurfrules and ~/.claude/skills. Prompttly maintains one cloud library for your AI instructions, syncs native directories across every machine, and gives you instant sub-200ms hotkey access from any Mac application.