skills/flutter-design-tokens/SKILL.md
Design tokens for consistent spacing, sizes, and radii across Flutter UI components. Trigger: When creating UI components, reviewing spacing/sizing, or eliminating magic numbers.
npx skillsauth add 333-333-333/agents flutter-design-tokensInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
import 'package:bastet/app/theme/tokens.dart';| Class | Purpose | Example |
|-------|---------|---------|
| AppSpacing | Padding, margins, gaps | AppSpacing.lg (16px) |
| AppSizes | Icons, buttons, avatars | AppSizes.touchTarget (48px) |
| AppRadii | Border radius | AppRadii.borderMd (12px) |
| Token | Value | Use for |
|-------|-------|---------|
| xxs | 2px | Hairline gaps |
| xs | 4px | Icon-to-text gaps |
| sm | 8px | Related element gaps |
| md | 12px | Form field gaps |
| lg | 16px | Section gaps |
| xl | 20px | Related sections |
| xxl | 24px | Page padding, major gaps |
| xxxl | 32px | Large section separators |
| huge | 48px | Hero spacing |
| Token | Value | Use for |
|-------|-------|---------|
| iconSm | 16px | Inline icons |
| iconMd | 18px | Button icons |
| iconLg | 24px | Navigation icons |
| touchTarget | 48px | Minimum tap area |
| buttonHeight | 48px | Standard buttons |
| avatarMd | 40px | List avatars |
| Token | Value | Use for |
|-------|-------|---------|
| xs | 4px | Subtle rounding |
| sm | 8px | Buttons, inputs |
| md | 12px | Cards |
| lg | 16px | Modals |
| xl | 24px | Bottom sheets |
| full | 9999px | Pills |
Pre-built BorderRadius objects: AppRadii.borderSm, AppRadii.borderMd, etc.
See assets/usage_examples.dart for complete examples.
Need spacing (padding/margin/gap)? → AppSpacing.*
Need component size (width/height)? → AppSizes.*
Need border radius? → AppRadii.*
Value not in tokens? → Add to appropriate token class
# Import tokens in any widget file
import 'package:bastet/app/theme/tokens.dart';
mobile/lib/app/theme/app_spacing.dart, app_sizes.dart, app_radii.dartmobile/lib/app/theme/tokens.darttesting
Review Flutter components and screens for UX/UI compliance. Trigger: When user invokes /ux-review command or requests UX audit.
development
TypeScript strict patterns and best practices. Trigger: When implementing or refactoring TypeScript in .ts/.tsx (types, interfaces, generics, const maps, type guards, removing any, tightening unknown).
testing
Testing philosophy and strategy for every feature: test pyramid, mandatory levels per change type, completion checklist, and skill delegation. Trigger: When planning tests for a feature, reviewing test coverage, defining acceptance criteria, or asking what tests a change needs.
development
Terraform security practices: sensitive variables, secret management, state protection, .gitignore patterns, and CI/CD credential handling. Trigger: When handling secrets in Terraform, configuring state backends, reviewing .gitignore for Terraform, or setting up CI/CD pipelines for infrastructure.