write-component

Generate React UI components with UI-only rendering and hook-based logic separation.

Updated Oct 29, 2025
One-click install
npx skills add https://github.com/coeus-ventures/epic-web --skill write-component
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-component
Source: https://github.com/coeus-ventures/epic-web/tree/main/.claude/skills/write-component
Command: npx skills add https://github.com/coeus-ventures/epic-web --skill write-component

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill ensures React UI components follow a consistent Epic three-layer architecture, separating rendering from business logic and enabling predictable, testable components.

Core Features & Use Cases

  • UI-only components: components render UI and delegate logic to hooks.
  • Architecture consistency: enforces three-layer structure and clear prop interfaces.
  • Testing readiness: requires data-testid attributes and test-friendly patterns.

Quick Start

Create a new page component under app/[role]/[page]/components and implement UI using the provided hooks.

Frequently Asked Questions about write-component

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I separate business logic from UI rendering in React components?

To separate business logic from UI rendering in React components, apply the Epic three-layer architecture. This pattern enforces UI-only components that delegate logic to dedicated hooks, ensuring predictable and testable rendering.

What is the Epic three-layer architecture for React frontend development?

The Epic three-layer architecture for React frontend development is a structural pattern that strictly separates UI rendering from business logic. It enforces UI-only components, explicit props interfaces, and hook-based logic separation to create consistent page components.

How do I enforce data-testid attributes for testing readiness in React UI widgets?

To enforce data-testid attributes for testing readiness in React UI widgets, generate components using the Epic three-layer architecture. This approach mandates data-testid attributes and test-friendly patterns, preventing direct server actions or data fetching within the UI layer.

Does the Epic three-layer pattern work for refactoring existing React components?

Yes, the Epic three-layer pattern works for refactoring existing React components. It enforces UI-only rendering and hook-based logic separation, stripping direct server actions or data fetching from components to establish clear prop interfaces and architecture consistency.

Why should React page components avoid direct server actions and data fetching?

React page components should avoid direct server actions and data fetching to maintain architecture consistency. Delegating this logic to hooks ensures UI-only rendering, making components predictable, explicitly prop-driven, and ready for testing.