What problem does it solve?
This Skill addresses common frontend code smells and security vulnerabilities, leading to more maintainable, performant, and secure web applications.
Core Features & Use Cases
- Identify & Fix Code Smells: Detects and provides solutions for issues like large functions, XSS vulnerabilities, magic strings, and global state.
- Enhance Security: Offers patterns for preventing XSS, CSRF, and implementing Content Security Policies.
- Improve CSS Practices: Guides on eliminating CSS duplication, using variables, and consolidating media queries.
- PWA Patterns: Demonstrates service worker strategies for offline support and performance.
- Use Case: A developer notices their React component functions are becoming too long and difficult to test. They use this Skill to learn how to break them down into smaller, more manageable units and apply best practices for state management.
Quick Start
Use the frontend-refactor skill to refactor a large monolithic function by extracting logical blocks into smaller, focused functions.