Creates safe refactor plans for messy UI code including component splitting strategies, state simplification, performance optimizations, and accessibility improvements. Provides phased approach, risk assessment, and "done" criteria. Use when refactoring "legacy code", "messy components", "performance issues", or "large files".
Scanned 2/12/2026
Install via CLI
openskills install majiayu000/claude-skill-registry---
name: frontend-refactor-planner
description: Creates safe refactor plans for messy UI code including component splitting strategies, state simplification, performance optimizations, and accessibility improvements. Provides phased approach, risk assessment, and "done" criteria. Use when refactoring "legacy code", "messy components", "performance issues", or "large files".
---
# Frontend Refactor Planner
Create safe, phased refactor plans for complex frontend code.
## Refactor Assessment
**Identify Issues**: Large components (>300 lines), prop drilling, duplicate logic, poor performance, accessibility gaps, tight coupling, untested code
**Prioritize**: By risk (high-traffic pages first) and impact (user-facing bugs prioritized)
**Plan Phases**: Break into small, testable increments
## Common Refactor Patterns
**Component Splitting**: Extract sub-components, create compound components, separate logic from presentation
**State Management**: Lift state up, move to Context/Zustand, remove unnecessary state
**Performance**: Memoization (useMemo/useCallback), code splitting, lazy loading, virtualization
**Accessibility**: Add ARIA labels, keyboard navigation, focus management, semantic HTML
**Testing**: Add tests before refactoring, test after each change
## Phased Approach
**Phase 1 - Stabilize**: Add tests, fix critical bugs, document current behavior
**Phase 2 - Extract**: Pull out utilities, create smaller components, reduce complexity
**Phase 3 - Simplify**: Remove dead code, consolidate duplicates, optimize state
**Phase 4 - Polish**: Performance optimization, accessibility audit, documentation
## Risk Mitigation
Feature flags for gradual rollout, A/B testing refactored vs original, monitor error rates, have rollback plan, peer review all changes, incremental deployment.
## Done Criteria
Code coverage >80%, performance metrics improved, accessibility score 95+, no regressions in tests, code review approved, documentation updated.
No comments yet. Be the first to comment!
Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.
SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.
Python backend development expertise for FastAPI, security patterns, database operations, Upstash integrations, and code quality. Use when: (1) Building REST APIs with FastAPI, (2) Implementing JWT/OAuth2 authentication, (3) Setting up SQLAlchemy/async databases, (4) Integrating Redis/Upstash caching, (5) Refactoring AI-generated Python code (deslopification), (6) Designing API patterns, or (7) Optimizing backend performance.
Drive the full internationalization journey for a project — detect the stack, recommend a library, set up the chosen library, wrap existing strings, and optionally connect a translation platform. Use when the user asks to add or configure i18n, internationalization, localization, multi-language support, or translations — including when they explicitly mention LinguiJS, Lingui, next-intl, "wrap strings", "find hardcoded text", "make my app translatable", or "set up translations". Triggers on g...
PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.