atomic design

    1

    Enforce Atomic Design hierarchy and reuse repo-specific UI primitives in React and Next.js projects.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    atomic design

    Example session with this skill installed

    Refactor the ProfileHeader in the account feature. It currently uses raw divs and spans. Move it to the correct atomic layer and use repo primitives.

    • Read your context and instructions
    • Compiled the atomic design
    • Generated the UI component

    I have refactored ProfileHeader from a raw JSX component into a structured Organism. I replaced native HTML tags with FlexAtom and BoxAtom, and moved the layout orchestration to the presentation layer.

    Refactored ProfileHeader Organism

    // src/features/account/presentation/organisms/ProfileHeader/ProfileHeader.tsx
    import { FlexAtom, BoxAtom, ButtonAtom, HeadingAtom } from '@/commons-ui/atoms';
    import styles from './ProfileHeader.module.scss';
    
    interface ProfileHeaderProps {
      user: { name: string; avatar: string };
      onEdit: () => void;
    }
    
    export const ProfileHeader = ({ user, onEdit }: ProfileHeaderProps) => {
      return (
        <FlexAtom direction="row" align="center" justify="between" className={styles.container}>
          <FlexAtom gap="md" align="center">
            <BoxAtom className={styles.avatarWrapper}>
              <img src={user.avatar} alt={user.name} />
            </BoxAtom>
            <HeadingAtom level={2}>{user.name}</HeadingAtom>
          </FlexAtom>
          <ButtonAtom variant="secondary" onClick={onEdit}>
            Edit Profile
          </ButtonAtom>
        </FlexAtom>
      );
    };
    

    Next steps

    1. Create ProfileHeader.module.scss in the same directory for custom spacing.
    2. Add a ProfileHeader.stories.tsx file if Storybook documentation is required for this feature.
    3. Update the AccountTemplate to use this new organism instead of the previous inline JSX.

    stories.tsx

    TSX · React component

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Maintaining a clean component hierarchy is difficult in fast-moving React projects. This skill enforces strict Atomic Design principles to prevent component bloat and ensures your UI remains modular and scalable.

    What it does

    • Enforces hierarchy by strictly categorizing components into atoms, molecules, organisms, templates, and pages.
    • Audits layout primitives to replace raw div, button, and img tags with established repo atoms like BoxAtom or ButtonAtom.
    • Decouples logic by identifying and moving business rules out of reusable UI components.
    • Orchestrates templates to ensure Next.js pages remain thin by delegating composition to the template layer.
    • Refactors presentation layers by moving reusable pieces into commons-ui while keeping feature-specific UI local.

    How it works

    1. Analyze UI by reviewing existing JSX or design specs to map elements to the atomic hierarchy.
    2. Identify primitives by scanning for native HTML tags that should be replaced with existing repo-level atoms.
    3. Select layer for new components based on reusability and data dependencies.
    4. Scaffold components including module.scss, __tests__/, and *.stories.tsx where required.

    Frameworks & tools

    React, Next.js, Tailwind CSS, and SASS Modules. It specifically targets architectures utilizing a commons-ui library and feature-based presentation layers.

    Why this beats prompting it yourself

    Generic prompts often fail to maintain the distinction between templates and organisms, leading to "fat" pages. This skill understands the specific delegation of layout orchestration and enforces the use of internal primitives over native tags.

    Use cases

    • Refactoring a monolithic page into reusable atoms and molecules.
    • Building new features that must match existing commons-ui patterns.
    • Auditing a PR to ensure no business logic has leaked into UI primitives.
    • Converting Figma designs into a structured component hierarchy.

    Known limitations

    Does not support native JSX tags when a repo-specific atom exists. Requires a pre-existing Atomic Design folder structure to be effective.

    Requires pre-existing folder structure (atoms, molecules, etc.). Does not support projects using only native HTML tags.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 15 days ago

    • Free with an Agensi account

    Permissions

    Read Files
    Listed15 days ago

    What's inside

    Frequently Asked Questions

    This skill automates the enforcement of Atomic Design principles by scanning your codebase, mapping components to their correct layer (Atoms to Pages), and replacing raw HTML tags with your project's specific UI primitives to ensure consistency.

    Yes, the skill is optimized for Next.js and React environments using Tailwind CSS or SASS Modules, and it is specifically designed to work within architectures that utilize a `commons-ui` library and feature-based folders.

    While it cannot generate a folder structure from scratch, the skill is designed to integrate into any existing Atomic Design repository; you simply point it at your component library, and it begins auditing and scaffolding based on your local patterns.

    Unlike generic AI prompts, this skill strictly enforces the delegation of layout orchestration to the template layer, preventing 'fat pages' and ensuring business logic never leaks into reusable UI atoms.

    You receive the full skill package including the logic for UI auditing, component scaffolding (including test and storybook files), and orchestration rules for Next.js presentation layers.

    The skill includes an audit feature that scans your JSX for native tags like <button> or <div> and automatically suggests refactoring them into your repo-specific atoms, such as <ButtonAtom> or <BoxAtom>.

    New in Frontend & Web Apps