UI

Provides best practices for building molecules by composing atoms, emphasizing presentational purity.

Install

mkdir -p .claude/skills/ui-molecule && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11602" && unzip -o skill.zip -d .claude/skills/ui-molecule && rm skill.zip

Installs to .claude/skills/ui-molecule

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Atomic-design guidance for Molecules — functional groups of atoms (SearchBar = input + button + icon; FormField = label + input + error) with a single cohesive purpose. Use when authoring or reviewing components under ui/molecules, composing atoms, or deciding atom vs molecule vs organism.
290 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Compose UI molecules from existing atoms
  • Ensure molecules have a single cohesive purpose
  • Pass props to child atoms for orchestration
  • Handle layout and spacing between atoms
  • Communicate via callbacks for interactions
  • Maintain consistent atom usage

How it works

The skill guides the creation of UI molecules by emphasizing composition of existing atoms, ensuring a single purpose, and managing data flow through props and callbacks. It enforces presentational purity.

Inputs & outputs

You give it
multiple UI atoms
You get back
a functional UI molecule component

When to use ui-molecule

  • Review molecule component structure
  • Decide between atom vs molecule
  • Structure presentational UI components

About this skill

Molecule

What is a Molecule?

Molecules are functional UI groups composed of multiple atoms working together for a single purpose—like a search bar (input + button + icon) or form field (label + input + error). They're reusable interface patterns.

Key Principles

  1. Composition Over Creation: Build molecules by composing existing atoms, don't recreate atom functionality inside molecules.

  2. Single Cohesive Purpose: A molecule does one thing (search, form field, card header)—if it does multiple distinct things, it's probably an organism.

  3. Props Passthrough: Molecules receive data and pass relevant props to child atoms. They orchestrate, not originate.

Best Practices

DO:

  • Import and compose atoms from your atom library
  • Keep molecules under 100 lines of code
  • Handle layout/spacing between atoms
  • Communicate via callbacks (onSearch, onSubmit, onChange)
  • Maintain consistent atom usage across similar molecules

DON'T:

  • Connect to global state or stores
  • Fetch data—molecules are presentational
  • Include complex business logic
  • Hardcode atom variations—accept as props
  • Nest molecules more than one level deep

Code Patterns

Recommended

// SearchBar.jsx - Molecule composing atoms
import Input from '../atoms/Input';
import Button from '../atoms/Button';
import Icon from '../atoms/Icon';

const SearchBar = ({ value, onChange, onSearch, placeholder }) => {
  const handleKeyPress = (e) => {
    if (e.key === 'Enter') onSearch(value);
  };

  return (
    <div className="search-bar">
      <Icon name="search" />
      <Input
        value={value}
        onChange={onChange}
        onKeyPress={handleKeyPress}
        placeholder={placeholder}
      />
      <Button label="Search" onClick={() => onSearch(value)} />
    </div>
  );
};

Avoid

// ❌ WRONG - Molecule connected to store
const SearchBar = () => {
  const dispatch = useDispatch();
  const query = useSelector(state => state.search.query);
  // Molecules shouldn't connect to store!
};

// ✅ CORRECT - Receives data via props
const SearchBar = ({ query, onQueryChange, onSearch }) => (
  // Pure presentational component
);

Related Terminologies

  • Atom (UI) - Building blocks molecules are composed of
  • Organism (UI) - Larger components that compose molecules
  • Component (UI) - Generic term; molecules are presentational components
  • Events (UI) - How molecules communicate user interactions

Quality Gates

  • Composed of existing atoms (not recreating)
  • Single cohesive purpose
  • No state management connections
  • No data fetching
  • Handles layout between child atoms
  • Uses callbacks for communication

Source: /docs/ui/molecule.md

When not to use it

  • When the component needs to connect to global state or stores.
  • When the component needs to fetch data.
  • When the component includes complex business logic.

Limitations

  • No state management connections.
  • No data fetching.
  • No complex business logic.

How it compares

This skill provides specific architectural guidance for building UI molecules that are purely presentational and composed of atoms, preventing common anti-patterns like direct state connections or data fetching.

Compared to similar skills

ui-molecule side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
ui-molecule (this skill)01moNo flagsIntermediate
ui-ux-pro-max1,9095moReviewIntermediate
visual-design-foundations55moNo flagsBeginner
ui-design12moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

ui-ux-pro-max

nextlevelbuilder

UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

1,9092,023

visual-design-foundations

wshobson

Apply typography, color theory, spacing systems, and iconography principles to create cohesive visual designs. Use when establishing design tokens, building style guides, or improving visual hierarchy and consistency.

547

ui-design

TencentCloudBase

Professional UI design and frontend interface guidelines. Use this skill when creating web pages, mini-program interfaces, prototypes, or any frontend UI components that require distinctive, production-grade design with exceptional aesthetic quality.

15

ui

tim-hub

Builds UI components, landing page sections, hero sections, and contact forms. Use when creating front-end visual elements.

00

design-with-taste

MaggieAppleton

Apply the "Family Values" design philosophy to every UI you build. Use this skill whenever creating frontends, components, apps, landing pages, dashboards, or any user-facing interface. Enforces three core principles — Simplicity (gradual revelation), Fluidity (seamless transitions), and Delight (se

00

ui-ux-pro-max

darkmatter

UI/UX design intelligence for web and mobile. Includes 50+ styles, 161 color palettes, 57 font pairings, 161 product types, 99 UX guidelines, and 25 chart types across 10 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, and HTML/CSS). Actions: plan, build, cr

00

Search skills

Search the agent skills registry