What problem does it solve?
Refactoring code that involves field mappings (dataIndex, enum type maps, data conversion) often introduces subtle bugs that TypeScript cannot catch: wrong field names guessed from type definitions, incomplete enum mappings, undefined values rendering as "Invalid Date", and sync jobs silently overwriting manually adjusted data. This Skill enforces verification against the original code instead of guessing from type definitions.
Core Features & Use Cases
- Field Name Verification: Checklists for validating dataIndex, rowKey, and API field names against the original source code (e.g., via git show) rather than inferring from TypeScript interfaces.
- Enum Mapping Completeness: Rules to ensure no enum values are dropped during refactoring, with correct spelling, text, and colors.
- Sync Overwrite Protection: A last-sync-value pattern with a decision matrix preventing external data syncs (ERP/CRM imports) from clearing fields or overwriting manual user edits.
- Use Case: When refactoring an Ant Design table's column definitions, use this Skill to compare each dataIndex and enum map against the pre-refactor code, then add defensive rendering for optional date fields.
Quick Start
Ask the AI to refactor the table columns and enum mappings of a component while following the field mapping safety checks against the original code.