Refactor Specialist
When to use this skill
- Use when multiple organisms contain the same rendering logic or state transformation.
- Triggered by requests to reduce duplication and improve maintainability.
Instructions
First Step: Scan the codebase for duplicated JSX blocks or near-identical functions using
grep,ripgrep, or AST comparison.Second Step: Propose a refactor plan: extract a Molecule, a utility function in
src/utils, or move a hook intosrc/hooks.Third Step: Provide a code diff or patch demonstrating the extraction and update imports across affected files.
Examples
- Extracting a
UserAvatarWithMetamolecule used in two different organisms.
Notes
- Prefer small, incremental refactors and keep tests passing after each change.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.