Skip to content
Magma Design System
Start a project
Install Magma Create the app with the tool of your framework, then install the Magma package: from then on its guides are in node_modules, where the agent can read them.
Terminal window
npm create vite@latest my-app -- --template vanilla
cd my-app
npm i @maggioli-design-system/magma
Terminal window
npm create vite@latest my-app -- --template react
cd my-app
npm i @maggioli-design-system/magma-react @maggioli-design-system/magma
Terminal window
npx @angular/cli new my-app
cd my-app
npm i @maggioli-design-system/magma-angular @maggioli-design-system/magma
Then ask the agent to install the rest:
Prompt
Read node_modules/@maggioli-design-system/magma/AGENTS.md and follow it to install Magma into this project.
Prompt
Read node_modules/@maggioli-design-system/magma-react/AGENTS.md and follow it to install Magma into this project.
Prompt
Read node_modules/@maggioli-design-system/magma-angular/AGENTS.md and follow it to install Magma into this project.
In Claude Code with the Magma plugin, /magma:setup does the same, installing the package of your framework too. The guide tells the agent to look at the project first (framework, bundler, Tailwind, server rendering, editor), to ask you only what it cannot find out, such as where the icons are served from or whether you want dark mode, and then to set up, in order: the styles, the fonts and the icons, and the registration of the components;the completions of the editor, for the tokens and the classes;the lint, in the ESLint and Stylelint configurations of the project;the MCP server: the Magma plugin in Claude Code, an entry in the configuration of the other clients. It ends with a build, a component on the page, an icon loaded and the lint with no errors. The check_setup tool of the MCP server then lists what the project still misses, each item with the guide that fixes it. Check the result against Installation: the same steps, written for people. Give the agent the context An agent starts every session from scratch. Write in the instructions file of the project where the context of Magma is, and it reads it every time: AGENTS.md at the root of the project is read by many agents. Claude Code reads CLAUDE.md: write @AGENTS.md in it, and it reads the same file.
AGENTS.md
## User interface: Magma
The UI is built with Magma, the Maggioli design system (`@maggioli-design-system/magma`). Before writing UI code, read `node_modules/@maggioli-design-system/magma/AGENTS.md`, section "Using the components", and only the files it points to that you need:
- choose components from `agents/components.md`, the catalogue;
- for each component you use, read its `AGENTS.md`, `pattern.md` and `antipattern.md`;
- color, type and spacing come from Magma's tokens and utilities (`agents/color.md`, `agents/typography.md`), never from literal values.
When the `magma` MCP server is available, ask it instead of reading files. After every change, run the lint and fix what it reports. Never guess a prop, a value or an event: the guides describe the installed version.
AGENTS.md
## User interface: Magma
The UI is built with Magma, the Maggioli design system (`@maggioli-design-system/magma-react`). Before writing UI code, read `node_modules/@maggioli-design-system/magma-react/AGENTS.md`, section "Using the components", and only the files it points to that you need:
- choose components from `agents/components.md`, the catalogue;
- for each component you use, read its `AGENTS.md`, `pattern.md` and `antipattern.md`;
- color, type and spacing come from Magma's tokens and utilities (`agents/color.md`, `agents/typography.md`), never from literal values.
When the `magma` MCP server is available, ask it instead of reading files. After every change, run the lint and fix what it reports. Never guess a prop, a value or an event: the guides describe the installed version.
AGENTS.md
## User interface: Magma
The UI is built with Magma, the Maggioli design system (`@maggioli-design-system/magma-angular`). Before writing UI code, read `node_modules/@maggioli-design-system/magma-angular/AGENTS.md`, section "Using the components", and only the files it points to that you need:
- choose components from `agents/components.md`, the catalogue;
- for each component you use, read its `AGENTS.md`, `pattern.md` and `antipattern.md`;
- color, type and spacing come from Magma's tokens and utilities (`agents/color.md`, `agents/typography.md`), never from literal values.
When the `magma` MCP server is available, ask it instead of reading files. After every change, run the lint and fix what it reports. Never guess a prop, a value or an event: the guides describe the installed version.
What each guide holds is in Guides in the package.
Modified 4 weeks agoVittorio VittoriDesign System Architect
Created 1 month agoVittorio VittoriDesign System Architect