Run a bulk refactor across 200 files without burning tokens
When to use: The same transformation needs to apply everywhere and the LLM would churn through too many tokens doing it file-by-file.
Flow
-
Define the transformationUse the Code Operations plugin. Replace every
import { foo } from 'old-lib'with the equivalent from 'new-lib'. Run via Execution Runtime.✓ Copied→ Plugin generates a Python script that runs locally, not a per-file LLM pass -
Review the diffShow me the full diff grouped by type of change.✓ Copied→ Structured diff you can skim
Outcome: Massive refactor done cheaply and reviewably.
Pitfalls
- Regex-based transform breaks edge cases — Runtime supports AST-level transforms — use those for syntax-sensitive changes