Skillshub 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/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/HoangNguyen0403/agent-skills-standard/flutter-design-system" ~/.claude/skills/comeonoliver-skillshub-flutter-design-system && rm -rf "$T"
manifest:
skills/HoangNguyen0403/agent-skills-standard/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 any UI refactoring, you MUST identify the project's Theme Archetype:
- Check
: Look formain.dart
theme configuration.MaterialApp - Determine Pattern:
- Theme-Driven (Adaptive): If you see
or extensiveVThemeData(...).toThemeData()
overrides, you MUST useThemeData
orTheme.of(context).textTheme
for feature code.theme.textTheme - Token-Driven (Static): Only use static tokens (
) if there is no global theme bridge or if you are defining the theme itself.VTypography.*
- Theme-Driven (Adaptive): If you see
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:
is strictly forbidden.Color(0xFF...) - No Color Enums:
is forbidden in UI code.Colors.blue - No Magic Spacing:
is forbidden.SizedBox(height: 10) - No Inline Styles:
is forbidden.TextStyle(fontSize: 14) - No Raw Widgets: Don't use
whenElevatedButton
exists.VButton
Related Topics
mobile-ux-core | flutter/widgets | idiomatic-flutter