home / skills / jeremylongshore / claude-code-plugins-plus-skills / windsurf-multi-file-editing

This skill enables coordinated multi-file edits across files with Cascade AI, ensuring atomic changes, previews, and safe rollbacks.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill windsurf-multi-file-editing

Review the files below or copy the command above to add this skill to your agents.

Files (5)
SKILL.md
2.1 KB
---
name: "windsurf-multi-file-editing"
description: |
  Manage multi-file edits with Cascade coordination. Activate when users mention
  "multi-file edit", "edit multiple files", "cross-file changes", "refactor across files",
  or "batch modifications". Handles coordinated multi-file operations. Use when working with windsurf multi file editing functionality. Trigger with phrases like "windsurf multi file editing", "windsurf editing", "windsurf".
allowed-tools: Read,Write,Edit,Grep,Glob
version: 1.0.0
license: MIT
author: "Jeremy Longshore <[email protected]>"
---

# Windsurf Multi File Editing

## Overview

This skill enables coordinated multi-file editing operations within Windsurf using Cascade AI. It provides atomic changes across multiple files, ensuring consistency when renaming symbols, moving code, or making cross-file refactoring changes. The skill handles dependency tracking, preview generation, and rollback capabilities for safe multi-file operations.

## Prerequisites

- Windsurf IDE installed and configured
- Active Cascade AI subscription
- Project workspace initialized with `.windsurf/` directory
- Git or version control for rollback safety
- Understanding of project file structure and dependencies

## Instructions

1. **Scope the Operation**
2. **Configure Operation Template**
3. **Generate Preview**
4. **Execute with Preview**
5. **Verify Results**


See `{baseDir}/references/implementation.md` for detailed implementation guide.

## Output

- Modified files with consistent changes applied
- `edit-history.json` log with operation details
- Rollback snapshot for recovery if needed
- Validation report with syntax check results

## Error Handling

See `{baseDir}/references/errors.md` for comprehensive error handling.

## Examples

See `{baseDir}/references/examples.md` for detailed examples.

## Resources

- [Windsurf Multi-File Editing Documentation](https://docs.windsurf.ai/features/multi-file-editing)
- [Cascade AI Coordination Guide](https://docs.windsurf.ai/cascade/coordination)
- [Atomic Operations Best Practices](https://docs.windsurf.ai/best-practices/atomic-ops)

Overview

This skill enables coordinated multi-file editing within Windsurf using Cascade AI to apply atomic, consistent changes across a project. It ensures safe cross-file refactors, symbol renames, and batch modifications with previews, dependency tracking, and rollback support. Use it to minimize inconsistent edits and reduce manual merge errors during large code changes.

How this skill works

The skill inspects project files and dependency relationships to build a scoped operation template. It generates a preview of all proposed edits, runs syntax and validation checks, then executes an atomic operation that updates files and records an edit-history.json log. If validation fails or the user requests rollback, the skill restores a snapshot and provides a validation report.

When to use it

  • Renaming symbols or APIs across multiple files
  • Moving or extracting code that affects several modules
  • Large-scale refactors or cross-file formatting changes
  • Applying coordinated configuration updates across a codebase
  • Preparing batch changes before a release or major merge

Best practices

  • Scope the operation narrowly first; start with a representative subset of files
  • Generate and review the full preview before executing any changes
  • Keep a Git commit or checkpoint before running edits for extra safety
  • Validate the project build or run tests after execution to catch runtime issues
  • Use descriptive operation templates and document intent in the edit-history.json entry

Example use cases

  • Rename a service interface and update all implementations and imports across the repository
  • Move a utility module to a new package and update all referencing files and build configs
  • Apply API signature changes and propagate type updates to dependent files
  • Batch-update license headers, formatting rules, or config keys across many files
  • Refactor a cross-cutting concern (logging, error handling) with coordinated edits and rollback option

FAQ

What prerequisites are required to run multi-file edits?

Windsurf IDE configured with a Cascade AI subscription, a project workspace initialized with the .windsurf directory, and version control (recommended) for extra rollback safety.

How do previews and rollbacks work?

The skill generates a full preview showing all proposed edits and runs syntax validation. On execution it creates a rollback snapshot and records details in edit-history.json so you can restore the previous state if needed.

Can I limit the scope of an operation?

Yes. Start by scoping the operation to specific folders, file patterns, or symbols and iterate with previews before expanding to the full codebase.