π¦ ClawHub
Ant Design Skill
by @felipeoff
Skill for efficiently building React UIs using Ant Design v5+ with layouts, forms, tables, modals, theming via ConfigProvider, and consistent component patte...
TERMINAL
clawhub install ant-design-skillπ About This Skill
name: ant_design_skill description: Front-end design skill for building React UIs with Ant Design (antd): component patterns, layout, forms, tables, and theming/tokens via ConfigProvider.
Ant Design (React) β Practical Front-end Design Skill
Use this skill when you are building a React UI with Ant Design (antd) and want consistent, non-ugly screens fast.
When to use
Default workflow (do this order)
1) Confirm stack: React + antd version (v5+ assumed). 2) Choose page pattern: - CRUD list (Table) + filters (Form) + actions (Modal/Drawer) - Wizard (Steps) - Settings (Form + Cards) - Dashboard (Grid + Cards + Charts) 3) Build layout skeleton first: -Layout + Sider + Header + Content
- Navigation with Menu
4) Build the main interaction component:
- Forms: Form, Form.Item, Input, Select, DatePicker, Switch
- Tables: Table + column definitions + row actions
5) Add feedback loop:
- message, notification, Modal.confirm
6) Apply theming/tokens via ConfigProvider (global) and component-level overrides.
7) Verify:
- Empty states
- Loading states
- Error states
- Mobile responsiveness (at least: 360px layout sanity)Component patterns (copy/paste mental models)
Layout
Layout with Sider (collapsible), Header for top actions, Content scroll.Flex (or Space) row.Forms
Form + Form.Item rules for validation; avoid custom validation unless necessary.Form.useForm() and form.setFieldsValue() for edit flows.Tables (CRUD)
rowKey always.Modals/Drawers
Theming / Tokens (AntD v5)
Ant Design v5 uses Design Tokens and CSS-in-JS.Global theme
Wrap your app inConfigProvider:import { ConfigProvider, theme } from 'antd';export function AppProviders({ children }: { children: React.ReactNode }) {
return (
{children}
);
}
Dark mode
Usetheme.darkAlgorithm and keep tokens consistent:const isDark = true;
Component-level overrides
Usecomponents. for specific tweaks (Button, Input, Table, etc.).References
protocols/ when you want LLM-first contracts (describe UIs as data, then generate code deterministically).references/tokens.md for a tokens cookbook.references/components.md for practical page recipes (CRUD, Settings, Wizard).examples/ when you want ready-to-copy AntD screens.starter/ when you need a runnable Vite + React + AntD skeleton.