flutter-design-system-from-design-md
Skill8 starsChanged 49 days agoMITView on GitHub
Convert one or more DESIGN.md specifications into a production-ready custom Flutter design system. Use whenever a user asks to implement, generate, refactor, migrate, or audit Flutter UI foundations, design tokens, themes, or reusable components from DESIGN.md, Figma-exported design notes, or an existing design-system folder. Inspect the repository first and ask whether to implement under lib/design_system or as a local package before writing design-system code. Do not use for a one-off feature screen that does not create or change a reusable design system.
In this repository70 other files it gives its agents.
- camerawesome-flutterSkill
- dart-args-production-cliSkill
- dart-flutter-equatable-engineeringSkill
- dart-flutter-ffi-systems-engineeringSkill
- dart-metaSkill
- document-camera-frameSkill
- document-scan-flutterSkill
- figma-to-flutter-expertSkill
- flutter-animations-production-engineeringSkill
- flutter-app-hardening-reverse-engineeringSkill
- flutter-app-icon-engineeringSkill
- flutter-application-security-engineeringSkill
- flutter-app-links-deep-link-engineeringSkill
- flutter-cachingSkill
- flutter-concurrency-memory-performanceSkill
- flutter-confetti-engineeringSkill
- flutter-dart-package-engineeringSkill
- flutter-dio-cache-interceptor-engineeringSkill
- flutter-dio-engineeringSkill
- flutter-doc-scannerSkill
- flutter-drift-persistence-engineeringSkill
- flutter-expert-tipsSkill
- flutter-firebase-analyticsSkill
- flutter-firebase-core-engineeringSkill
- flutter-firebase-messagingSkill
- flutter-get-it-injectable-dependency-injectionSkill
- flutter-go-router-engineeringSkill
- flutter-hive-persistence-engineeringSkill
- flutter-image-performanceSkill
- flutter-image-picker-production-engineeringSkill
- flutter-lints-static-analysis-engineeringSkill
- flutter-local-notifications-production-engineeringSkill
- flutter-memory-leak-engineeringSkill
- flutter-mobile-developmentSkill
- flutter-motion-engineeringSkill
- flutter-multi-environmentSkill
- flutter-native-splash-engineeringSkill
- flutter-package-plugin-selectionSkill
- flutter-path-provider-production-storageSkill
- flutter-performance-jank-optimizationSkill
- flutter-permission-handler-engineeringSkill
- flutter-pinputSkill
- flutter-production-build-releaseSkill
- flutter-production-engineeringSkill
- flutter-production-loggingSkill
- flutter-pro-image-editor-engineeringSkill
- flutter-secure-storage-security-engineeringSkill
- flutter-sentry-engineeringSkill
- flutter-share-plus-engineeringSkill
- flutter-skeletonizer-engineeringSkill
- flutter-squadron-concurrency-engineeringSkill
- flutter-supabase-engineeringSkill
- flutter-svg-engineeringSkill
- flutter-ui-performance-engineeringSkill
- flutter-url-launcher-engineeringSkill
- flutter-video-player-production-engineeringSkill
- flutter-webview-production-engineeringSkill
- freezed-production-engineeringSkill
- html-to-flutterSkill
- hydrated-blocSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 11 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
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 23
Do not write or move design-system code until repository discovery is complete and this choice is known.
- Very specific: line 32
Do not silently select an option.
- Distinctive: line 53
Read the implementation playbook after the integration choice when designing foundations, custom controls, overlays, or the validation plan.
- Distinctive: line 65
Keep primitive palettes/scales private or clearly labelled when consumers genuinely need them.
- Very specific: line 71
Use ThemeExtension<T> for custom theme values that participate in a ThemeData.
- Distinctive: line 76
Do not hide a missing registration with a production fallback factory: that makes a broken theme look valid.
- Distinctive: line 82
Create component-specific tokens only for values shared by several variants or states.
- Distinctive: line 106
Use composition and small focused widgets.
- Very specific: line 125
Use const widgets and immutable token values where possible.
- Very specific: line 128
Do not perform I/O, parsing, sorting, intrinsic measurement, or expensive object construction in build.
- Very specific: line 130
Avoid clipping, opacity layers, blur, shadows, repaint boundaries, and custom painting unless their visual need justifies their render cost.
- Distinctive: line 141
After the user selects the integration boundary:
- Distinctive: line 144
Add the smallest reusable primitives needed by multiple components.
- Distinctive: line 147
Update the public barrel so it exports intentional public APIs only.
- Distinctive: line 154
Run the narrowest relevant checks: formatter, analyzer, and focused token or widget tests.
- Distinctive: line 160
Before finishing, inspect the diff for hard-coded design values that should be tokens, missing extension registration, duplicated …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
Flutter design system from DESIGN.md
Build the smallest complete design-system implementation that faithfully maps the design source and fits the host Flutter application. A design document is the source of visual intent, not a request to turn every number into a public constant or every described screen into a component.
Required decision point
Do not write or move design-system code until repository discovery is complete and this choice is known. If the user has not already answered it, ask exactly:
How should the Flutter design system be integrated?
A. Implement it directly in
lib/design_system/.B. Create an isolated local Flutter package and import it from the app.
Do not silently select an option. For A, keep implementation inside
lib/design_system/ except for the smallest necessary app-theme or package
configuration changes. For B, create a local package with a narrow public
barrel export and private implementation details; do not use app-specific
imports inside that package.
Discovery before implementation
- Locate the repository root, every relevant
DESIGN.md, asset, font,pubspec.yaml, lint configuration, existing design-system directory, and tests. Read the source documents rather than relying on a file name. - Trace the existing theme setup, token access API, public exports, component callers, input/overlay/navigation helpers, and dependencies. Reuse a coherent existing foundation. When it is contradictory or duplicated, refactor or migrate it deliberately; never add a competing token/theme layer.
- Extract a compact mapping before coding: primitive values, semantic roles, repeated component patterns and states, responsive rules, text direction, accessibility requirements, and open ambiguities. Report material contradictions before implementation. Resolve minor visual gaps conservatively and state the assumption.
- Read the implementation playbook after the integration choice when designing foundations, custom controls, overlays, or the validation plan.
Architecture
Represent design intent as a one-way hierarchy when the source supports it:
primitive values -> semantic tokens -> optional component tokens -> components- Keep primitive palettes/scales private or clearly labelled when consumers
genuinely need them. Components should normally consume semantic roles such
as
contentPrimary,surfaceRaised,borderSubtle, oractionPrimary, notblue500or arbitrary pixel values. - Group theme values by stable semantic ownership: for example colors,
typography, spacing/sizing, shape/borders, effects/motion, and breakpoints.
Use
ThemeExtension<T>for custom theme values that participate in aThemeData; give each extension complete, immutablecopyWithandlerpimplementations. Do not make a single catch-all extension or split every scalar into its own extension. - Register every extension used by components in every supported theme. Do not hide a missing registration with a production fallback factory: that makes a broken theme look valid. Tests may provide explicit test themes.
- Expose a small, typed context access API after the extensions exist. A facade is acceptable only when it remains a read-only view of the registered extensions and does not become a second source of truth or allocate a large object for every lookup.
- Create component-specific tokens only for values shared by several variants or states. Keep a value local when it belongs to exactly one component.
- Derive breakpoints and layout rules from the specification. Put repeated
rules in one responsive utility; use
LayoutBuilderfor parent constraints, and useMediaQueryonly for viewport, text scaling, or device properties.
Custom component rules
Build design-system controls from Flutter framework primitives, not pre-styled
Material or Cupertino visual widgets. Do not use ElevatedButton,
FilledButton, OutlinedButton, TextButton, IconButton, Card,
ListTile, AppBar, Scaffold, Switch, Checkbox, Radio, Slider,
SnackBar, DropdownButton, TextField, form-field helpers, or Cupertino
counterparts as their implementation base.
ThemeData and ThemeExtension may be used solely as the Flutter theme host;
that is not permission to inherit Material visuals. Prefer narrow Flutter
imports (widgets.dart, rendering.dart, painting.dart, services.dart)
where they suffice. Use framework services such as Navigator, Overlay, or
EditableText when a custom implementation needs their behavior, and keep the
visual layer custom.
- Model real variants and states with enums or immutable typed data. Do not create boolean-flag combinations that permit invalid state.
- Use composition and small focused widgets. Public components expose intent, not containers, colors, or internal implementation plumbing.
- Interactive controls preserve keyboard, pointer, focus, hover, disabled,
selected, loading, error, and read-only behavior where applicable. Use
Semantics, visible focus indication,Focus/FocusableActionDetector, and directional APIs;GestureDetectoralone is not a complete custom control. - Respect text scaling, RTL/LTR direction, minimum touch targets, contrast, overflow behavior, and reduced-motion/platform accessibility settings when the platform or specification exposes them.
- Build application shells, dialogs, sheets, menus, and notifications from
custom layers or low-level routes/overlays. Do not route their visuals
through Material
ScaffoldMessenger,SnackBar, or modal helpers.
Performance discipline
Aim for smooth interaction; do not claim "zero jank" or equivalent without profiling the real app on representative devices.
- Use
constwidgets and immutable token values where possible. Keep changing state below static subtrees and localize animations with anAnimatedBuilder/ListenableBuilderor an appropriate implicit animation. - Do not perform I/O, parsing, sorting, intrinsic measurement, or expensive
object construction in
build. Use lazy builders for large collections. - Avoid clipping, opacity layers, blur, shadows, repaint boundaries, and
custom painting unless their visual need justifies their render cost.
BackdropFilterandsaveLayer-prone effects need a concrete reason and a bounded paint area. AddRepaintBoundaryonly around a measured or clearly isolated repaint hotspot. - Custom painters must own immutable inputs and return an accurate
shouldRepaint. Dispose controllers, focus nodes, and listeners. Reuse a shared primitive rather than duplicating equivalent spinners or animations.
Implementation order
After the user selects the integration boundary:
- Establish or refactor foundations and theme registration first.
- Add the smallest reusable primitives needed by multiple components.
- Implement components in dependency order, including only states specified or required for accessible interaction.
- Update the public barrel so it exports intentional public APIs only. Keep internal files and token plumbing private where package boundaries permit.
- Migrate existing callers only when requested or necessary to prevent two competing systems. Preserve behavior outside the agreed scope.
Verification and completion
Run the narrowest relevant checks: formatter, analyzer, and focused token or widget tests. Add tests for non-trivial token interpolation, interactive states, semantics/keyboard behavior, and responsive or RTL/text-scaling rules when those behaviors were added. Use goldens only if the repository already has a stable golden workflow.
Before finishing, inspect the diff for hard-coded design values that should be tokens, missing extension registration, duplicated components, Material or Cupertino visual-widget leakage, leaked resources, and unintentional rebuild or paint work.
Report the integration choice, the mapping from design source to foundations and components, checks run and their outcomes, and only material assumptions or unresolved design questions.
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.

