Automatically fix common code patterns and anti-patterns across the codebase
Automatically fix common code anti-patterns across your codebase, including var declarations, TypeScript enums, missing error handling, and React/Next.js best practices. Shows a preview of changes before applying and supports selective fixing by pattern type.
/plugin marketplace add Tylerbryy/codewarden/plugin install codewarden@codewarden-marketplaceAutomatically detect and fix common anti-patterns in your codebase using Ultracite and modern React/Next.js best practices.
When this command is invoked:
Scan the codebase for common anti-patterns:
var declarations → const/letenum → as const objectsany types → specific types (where obvious)useEffect for derived state → render calculationsShow a preview of all changes before applying:
Ask for confirmation before making changes
Apply fixes in order of safety:
Generate a report of all changes made:
/fix-patterns
# Interactive mode - shows all fixable issues
/fix-patterns --dry-run
# Preview changes without applying
/fix-patterns --type=var
# Fix only var declarations
/fix-patterns web/src/app
# Fix patterns in specific directory
any with proper types