fossui
AI native

Rules

Paste the fossui rules into your agent config so any coding assistant writes idiomatic fossui code without the MCP server.

The rules snippet gives any coding agent the fossui idioms without the MCP server. It is a ready-to-paste block of the rules that keep AI-written code compiling: enum-not-string variants, no per-instance props, the group and launcher APIs, and how tokens resolve. A generated component catalog (reference.md) sits beside it for the exact per-component API, so the pair is self-contained.

Add it

Drop the fossui.md snippet into your agent's config file:

  • Claude Code: CLAUDE.md
  • Generic agents: AGENTS.md
  • Cursor: .cursorrules

Keep reference.md in the repo for the full component reference. Both are generated from the same source of truth as the skill and the MCP server, so all three agree. Do not hand-edit reference.md; it is regenerated from the package.

What it covers

  • One import (package:fossui/fossui.dart) for the theme system and every component.
  • Register FossThemeData once, then read tokens through context.fossTheme; there is no FossApp wrapper.
  • Tokens resolve to real Dart types at the access site: typography.lg is a TextStyle, colors.primary a Color, radii.md a double, motion.overlay a Duration.
  • Variants and sizes are enums, never strings.
  • Change the look through the theme or a component's style object, never per-instance color / borderRadius / padding props.

Which vehicle to use

The skill is the richest for Claude Code, this rules snippet is the always-on paste-in baseline for any agent, and the MCP server serves the exact per-component API live on demand. Use the rules or skill as the baseline and add the server for the freshest detail.

On this page