Skill for AI agents
The cherry repository ships an agent skill in skills/cherry-react. It teaches coding agents to build with cherry correctly: which component to use, exact props and values, --cherry-* tokens instead of hardcoded styles, and what accessibility needs from the app (labels, names, keyboard).
It is documentation only: no runtime code, and it is not part of the npm package.
What it contains
cherry-react/
SKILL.md # Agent Skill: rules, quick start, which component to use
AGENTS.md # self-contained guide for agents that read one file
README.md
references/
components.md # every component: props, defaults, accessibility, checked example
tokens.md # every --cherry-* token with light and dark values
setup.md # install, Next.js, Vite, per-component CSS, server-side mode
theming.md # light/dark, useColorMode, brands, overrides, custom components
accessibility.md # what cherry guarantees, what you provide, keyboard, testingcomponents.md and tokens.md are generated from the component source, the manifests and the token files. CI fails if they fall out of date, and every example in them is type-checked against the real components, so the skill matches each release.
Install with the skills CLI
The skills CLI installs the skill into the right place for most coding agents (Cursor, Codex and others):
# into the current project
npx -y skills add cherry-design-system/reactUpdate or remove it later:
npx skills update cherry-react
npx skills remove cherry-reactskills is a third-party tool. If you would rather not use it, copy the folder by hand as described below.
Install by hand
Clone or download the repository, then copy the skills/cherry-react folder into the skills directory your agent reads, either in the project (committed and shared with your team) or in your home directory (personal, every project).
Agents that read one file
For agents without skill support, put AGENTS.md at your repository root, or reference it from your agent's rules file (for example .cursor/rules or .github/copilot-instructions.md). Keep the references/ folder next to it so the agent can open the full component reference.
What the skill enforces
The skill's rules mirror these docs:
- Every control is a cherry component:
Button,IconButton,Input,Select,Comboboxand the rest. Never a raw<button>,<input>,<select>or<textarea>, and never a second component library. - Every control has a name: wrap form controls in
<Field label>, or passaria-label. EveryIconButtonneedsaria-label. - Plain prop names and listed values only (
variant,size,invalid,fullWidth). No$props. - Tokens, never hardcoded values, and no branching on the mode in JavaScript.
- Customize with a plain class: cherry is in
@layer cherry, so unlayered CSS wins without!important. - Icons are
lucide-reactelements passed toicon,leadingIconortrailingIcon. - Router links go through
asChildonNavItem.
For cherry 1.x (cherry-styled-components), use that repository's cherry-design-system skill instead. The two can be installed side by side.