Atomic Component Generator

Generate decomposed React components following Atomic Design and Smart/Dumb patterns.

Updated Oct 31, 2025
One-click install
npx skills add https://github.com/RomualdP/hoki --skill atomic-component-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Atomic Component Generator
Source: https://github.com/RomualdP/hoki/tree/main/.claude/skills/atomic-component
Command: npx skills add https://github.com/RomualdP/hoki --skill atomic-component-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires react, next.

What problem does it solve?

This Skill ensures the creation of highly reusable, maintainable, and testable React components by enforcing Atomic Design principles and the Smart/Dumb component pattern, preventing monolithic components and code duplication.

Core Features & Use Cases

  • Maximal Decomposition: Guides on breaking down UI into small, single-responsibility components (Atoms, Molecules, Organisms), with strict line limits for each.
  • Smart/Dumb Component Pattern: Differentiates between "Smart" (logic, state, Server Actions) and "Dumb" (pure presentation) components, clarifying responsibilities.
  • Server/Client Component Strategy: Emphasizes using Server Components by default for data fetching and Client Components only for interactivity, optimizing performance and SEO.
  • Use Case: When building a complex form, decompose it into a "Smart" ClubCreationForm (managing state and Server Actions) and several "Dumb" components like ClubInfoStep or PlanSelectionStep (handling pure UI presentation), ensuring each part is focused and reusable.

Quick Start

To create a new component, first decide if it's a Smart (logic) or Dumb (presentation) component. Ensure it has a single responsibility and is maximally decomposed. Place all components in features/*/components/ and never directly in app/.

Frequently Asked Questions about Atomic Component Generator

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

FAQPage Schema
How do I break down React components into smaller, reusable pieces?

Break down React components using Atomic Design: create Atoms (buttons, inputs), Molecules (form groups, search bars), and Organisms (forms, headers). Each component should have a single responsibility and stay under 150 lines, ensuring long-term reusability and easier testing.

What's the difference between Smart and Dumb components in React?

Smart components handle logic, state, and Server Actions, while Dumb components focus purely on presentation. This separation clarifies responsibilities: Smart components fetch data and manage behavior; Dumb components receive props and render UI, making each independently testable and reusable.

When should I use Next.js Server Components versus Client Components?

Use Server Components by default in Next.js for data fetching and server-only logic to optimize performance and SEO. Reserve Client Components only for interactive features like form submissions or event handlers, reducing bundle size and improving initial page load.

Can I apply Atomic Design with Next.js 16?

Yes. Next.js 16 treats Server Components as the default, aligning perfectly with Atomic Design. Place components in `features/*/components/`, never directly in `app/`, and apply the Smart/Dumb pattern: Smart components handle Server Actions, Dumb components render UI.

How do I prevent monolithic components and code duplication in React?

Enforce maximal decomposition: break complex UIs into focused Atoms, Molecules, and Organisms with strict single responsibilities. Apply the Smart/Dumb pattern to separate logic from presentation, and enforce a 150-line limit per component to keep code modular and maintainable.

What's the benefit of Atomic Design for team collaboration?

Atomic Design creates a shared vocabulary and consistent structure across your codebase. Small, single-responsibility components reduce merge conflicts, make code reviews faster, and allow team members to reuse and build upon existing components predictably.