What problem does it solve?
This Skill addresses the common AI mistake of only building the 'Content' state for UI components, leading to broken user experiences when data is loading, an error occurs, or no data is available.
Core Features & Use Cases
- Comprehensive State Management: Guides the AI to implement Loading, Error, Empty, and Content states for any component interacting with data.
- Error Handling Best Practices: Ensures user-friendly error messages and actionable recovery options.
- Empty State Design: Promotes informative empty states with clear next steps, rather than silent failures.
- Use Case: When building a user profile page, this Skill ensures that a skeleton loader is shown while the profile data is fetched, a clear error message with a retry option appears if the fetch fails, a "No profile data available" message is shown if the user has no profile, and finally, the profile content is displayed.
Quick Start
Implement all four states for the user list component, ensuring a skeleton loader is used for the loading state and a clear error message with a retry button is displayed on failure.