smithery/hoangnguyen0403

flutter-design-system

Enforce Design Language System adherence in Flutter. Use when implementing design tokens, preventing hardcoded colors/spacing, or building a DLS.

Installation

$ npx skills add smithery/hoangnguyen0403 --skill flutter-design-system

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/hoangnguyen0403.

npx skills add smithery/hoangnguyen0403

Browse all from smithery/hoangnguyen0403

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

More metadata
triggers
{"files":[],"0":"**\/theme\/**","1":"**\/*_theme.dart","2":"**\/*_colors.dart","3":"**\/*_dls\/**","4":"**\/foundation\/**","5":"**\/presentation\/**","6":"**\/ui\/**","7":"**\/widgets\/**","keywords":[],"8":"ThemeData","9":"ColorScheme","10":"AppColors","11":"VColors","12":"VSpacing","13":"AppTheme","14":"design token"}

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,394 B
  • docs SUMMARY.md 168 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

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:

  1. Check main.dart: Look for MaterialApp theme configuration.
  2. Determine Pattern:

- Theme-Driven (Adaptive): VThemeData(...).toThemeData() or extensive ThemeData overrides → use Theme.of(context).textTheme / theme.textTheme. - Token-Driven (Static): Use static tokens (VTypography.*) only when no global theme bridge exists, or when defining theme itself.

Guidelines

  • Colors: Use tokens (VColors., AppColors.), never Color(0xFF...) or Colors.red.
  • Spacing: Use tokens (VSpacing.*), never magic numbers like 16 or 24.
  • Typography: Prioritize theme.textTheme. for adaptive UI. Use VTypography. tokens only for theme definitions or non-contextual logic. Never use inline TextStyle.
  • Borders: Use tokens (VBorders.*), never raw BorderRadius.
  • Components: Use DLS widgets (VButton) over raw Material widgets (ElevatedButton) if available.

[Detailed Examples](references/usage.md)

Anti-Patterns

  • No Hex Colors: Color(0xFF...) strictly forbidden.
  • No Color Enums: Colors.blue forbidden in UI code.
  • No Magic Spacing: SizedBox(height: 10) forbidden.
  • No Inline Styles: TextStyle(fontSize: 14) forbidden.
  • No Raw Widgets: Don't use ElevatedButton when VButton exists.

Related Topics

mobile-ux-core | flutter/widgets | idiomatic-flutter

Canonical response anchors

When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:

  • ElevatedButton
  • SizedBox
  • VColors
  • magic number
  • Additional task-grounded exact anchors: TextStyle