apps-sdk-ui
AGENTS.md953 starsChanged 12 months agoMITView on GitHub
Apps SDK UI is a design system tailored for building apps in ChatGPT. Apps SDK UI provides styling foundations, CSS variable design tokens, and a library of well-crafted, accessible components. Keep this goal and context in mind as you contribute code to the repository. This code is the foundation for many other projects, and changes should be robust, well-considered, and workable for many different contexts. You should make changes only in the src/ folder: When adding new functionality or docs,…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Keep this goal and context in mind as you contribute code to the repository.
- Very specific: line 25
When adding new functionality or docs, place files in the appropriate src/* location.
- Very specific: line 80
All components should be thoroughly documented in Storybook, using the .mdx and .stories sidecar files.
- Very specific: line 83
Update or create .mdx and .stories.tsx files when adding new components or features.
- Very specific: line 84
Keep usage examples simple and focused.
- Distinctive: line 88
When working on features or documentation, avoid making unrelated changes to the current task.
- Very specific: line 92
Use Node version specified in .node-version
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Contribution guide for Apps SDK UI
Apps SDK UI is a design system tailored for building apps in ChatGPT. Apps SDK UI provides styling foundations, CSS variable design tokens, and a library of well-crafted, accessible components.
- Design tokens – defined across colors, typography, spacing, sizing, shadows, surfaces, and more.
- Tailwind 4 – fully integrated and pre-configured with Apps SDK UI's design tokens.
- Component library – high-quality components built on top of Radix for consistent accessibility patterns.
- Utilities – helpful tools for handling core concepts like dark mode, responsiveness, and more across React and CSS.
Keep this goal and context in mind as you contribute code to the repository. This code is the foundation for many other projects, and changes should be robust, well-considered, and workable for many different contexts.
Repository overview
You should make changes only in the src/ folder:
components/- React component implementations (e.g., Button, Chat, Tooltip)hooks/- Reusable React hooks (e.g., useAutoGrowTextarea, useBreakpoints)lib/- Utility functions (theme helpers, attachment helpers, etc.)styles/- Global CSS config, Tailwind setup, and design token definitions**/*.stories.tsx- Storybook stories definition for a given component**/*.mdx- Storybook documentation, often referring to sibling.stories.tsxfiletypes.ts- Shared TypeScript typesvite-env.d.ts- Vite type declarations
When adding new functionality or docs, place files in the appropriate src/* location.
Components
File Naming Conventions
- Component:
ComponentName.tsx - Styles:
ComponentName.module.css - Tests:
ComponentName.test.tsx - Storybook:
ComponentName.stories.tsxComponentName.mdx
Component library
Below is a quick reference of all provided components:
| Component | Description |
| Alert | Call attention to a specific message or warning. |
| Animate | Animate components as they mount and unmount. |
| AnimateLayout | Animate width & height of components as they mount and unmount. |
| AnimateLayoutGroup | Animate width & height of lists of components as they enter and exit. |
| Avatar | Display user identities with either text, photo, or an icon. |
| AvatarGroup | Display avatars as a single stack. |
| Badge | Emphasize details with a status indicator. |
| Button | Create actions in many different styles. |
| ButtonLink | <Button> but as a semantic anchor element. |
| Checkbox | Toggle control for on and off states. |
| CodeBlock | Display syntax‑highlighted code snippets. |
| CopyTooltip | Allow users to easily copy to clipboard. |
| EmptyMessage | Gracefully inform users when there's nothing to see. |
| Icon | Collection of SVG icons exported as React components. |
| Image | Load remote images with optional aspect ratio and cover mode. |
| Indicator | Loading dots and circular progress indicators. |
| Input | Semantic input text collection. |
| Markdown | Render rich formatted content. |
| Menu | Structured actions in a dropdown list. |
| Modal | Capture focus for essential tasks or details. |
| AppsSDKUIProvider | React provider for shared context (e.g., link component). |
| Popover | Generic floating UI utility for contextual actions. |
| RadioGroup | Radio button group selection component. |
| SegmentedControl | Toggle through grouped options. |
| Select | Choose from a dropdown of options. |
| SelectControl | Alternative select control component with enhanced features. |
| Slider | Fine-tune values within a set range. |
| Switch | Toggle control for on and off states. |
| TagInput | Enter multiple unique tags. |
| TextLink | Semantic link used for both internal and external links. |
| Textarea | Autosizable text input area with optional validation. |
| Tooltip | Brief and informative hover text. |
| TransitionGroup | Primitive for rendering components over time. |
Documentation & Storybook
All components should be thoroughly documented in Storybook, using the .mdx and .stories sidecar files.
- You should not need to run Storybook locally, so ignore the
pnpm run storybookcommand - Update or create
.mdxand.stories.tsxfiles when adding new components or features. - Keep usage examples simple and focused. Refer to documentation examples like
Avatar,Badge, andButtonfor guidance.
Contributing
When working on features or documentation, avoid making unrelated changes to the current task. Do not add comments for obvious behaviors, and do not change build settings.
Setup instructions
- Use Node version specified in
.node-version - Install dependencies with
npm install
Required commands before commit
npm run format:fix- Auto-fixes any formatting issuesnpm run lint- Runs ESLint (TS) and Stylelint (CSS)npm run types- Runs TypeScript type checkingnpm run test- Executes unit tests via Vitest
Ignore all other script commands, as they will be irrelevant to your work.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

