Agent-skills-standard flutter-design-system
Enforce Design Language System adherence in Flutter. Use when enforcing design tokens, preventing hardcoded colors/spacing, or implementing a DLS in Flutter. (triggers: **/theme/**, **/*_theme.dart, **/*_colors.dart, **/*_dls/**, **/foundation/**, **/presentation/**, **/ui/**, **/widgets/**, ThemeData, ColorScheme, AppColors, VColors, VSpacing, AppTheme, design token)
install
source · Clone the upstream repo
git clone https://github.com/HoangNguyen0403/agent-skills-standard
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/HoangNguyen0403/agent-skills-standard "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/flutter/flutter-design-system" ~/.claude/skills/hoangnguyen0403-agent-skills-standard-flutter-design-system && rm -rf "$T"
manifest:
skills/flutter/flutter-design-system/SKILL.mdsource content
Flutter Design System Enforcement
Priority: P0 (CRITICAL)
Zero tolerance for hardcoded design values.
Phase 0: Context Discovery (MANDATORY)
Before UI refactoring, identify project's Theme Archetype:
- Check
: Look formain.dart
theme configuration.MaterialApp - Determine Pattern:
- Theme-Driven (Adaptive):
or extensiveVThemeData(...).toThemeData()
overrides → useThemeData
/Theme.of(context).textTheme
.theme.textTheme - Token-Driven (Static): Use static tokens (
) only when no global theme bridge exists, or when defining theme itself.VTypography.*
Guidelines
- Colors: Use tokens (
,VColors.*
), neverAppColors.*
orColor(0xFF...)
.Colors.red - Spacing: Use tokens (
), never magic numbers likeVSpacing.*
or16
.24 - Typography: Prioritize
for adaptive UI. Usetheme.textTheme.*
tokens only for theme definitions or non-contextual logic. Never use inlineVTypography.*
.TextStyle - Borders: Use tokens (
), never rawVBorders.*BorderRadius. - Components: Use DLS widgets (
) over raw Material widgets (VButton
) if available.ElevatedButton
Anti-Patterns
- No Hex Colors:
strictly forbidden.Color(0xFF...) - No Color Enums:
forbidden in UI code.Colors.blue - No Magic Spacing:
forbidden.SizedBox(height: 10) - No Inline Styles:
forbidden.TextStyle(fontSize: 14) - No Raw Widgets: Don't use
whenElevatedButton
exists.VButton
Related Topics
mobile-ux-core | flutter/widgets | idiomatic-flutter