.cursor/skills/design-tokens-enforcement/SKILL.md
Enforces design token usage (AppColors/AppTheme) instead of direct Colors.*. Use when writing UI code, reviewing widgets, or ensuring design consistency.
npx skillsauth add avra-cadavra/avrai design-tokens-enforcementInstall 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.
✅ ALWAYS use AppColors or AppTheme for colors
❌ NEVER use direct Colors.*
import 'package:avrai/core/theme/colors.dart';
import 'package:avrai/core/theme/app_theme.dart';
Container(
color: AppColors.electricGreen,
child: Text(
'Hello',
style: TextStyle(color: AppTheme.textPrimary),
),
)
// Background colors
Container(
color: AppColors.grey50, // Light background
color: AppColors.grey900, // Dark background
)
// Semantic colors
Text(
'Error message',
style: TextStyle(color: AppColors.error),
)
Container(
color: Colors.blue, // Don't use direct Colors.*
color: Colors.green, // Don't use
color: Color(0xFF00FF66), // Don't hardcode colors
)
Use AppTheme for consistent theme-aware styling:
Text(
'Hello',
style: TextStyle(
color: AppTheme.textPrimary,
fontSize: AppTheme.fontSizeLarge,
),
)
See available tokens in:
lib/core/theme/colors.dart - Color definitionslib/core/theme/app_theme.dart - Theme definitionsAppColors.electricGreen // Primary brand accent
AppColors.black // Pure black
AppColors.white // Pure white
AppColors.grey50 // Lightest grey
AppColors.grey900 // Darkest grey
AppColors.error // Error red
AppColors.warning // Warning yellow
AppColors.success // Success green (electricGreen)
When converting existing code:
// Before
Container(color: Colors.blue)
// After
Container(color: AppColors.electricGreen)
Always use brand-accurate colors, not arbitrary color choices.
development
--- name: world-model-development description: Guides world model development patterns: state/action encoders, ONNX inference, feature extraction pipeline, latency budgets. Use when implementing world model components, state encoders, action encoders, feature extractors, or ONNX models. Core skill for Phases 3-6. --- # World Model Development Patterns ## Core Principle All world model components follow LeCun's autonomous machine intelligence framework. State observations flow through a percep
tools
Implements base workflow controller patterns for multi-step processes. Use when creating complex workflows that require orchestration of multiple steps with error handling and rollback.
testing
--- name: widget-test-patterns description: Guides widget test patterns: BLoC testing, user interactions, state changes, material app setup. Use when writing widget tests, testing UI components, or validating widget behavior. --- # Widget Test Patterns ## Core Pattern Widget tests verify UI behavior: user interactions, state changes, and visual display. ## Basic Widget Test Setup ```dart testWidgets('widget displays correctly', (WidgetTester tester) async { // Arrange: Create widget awa
testing
--- name: test-template-generation description: Generates test templates: unit, widget, integration, service tests following project patterns. Use when creating new tests or ensuring tests follow project standards. --- # Test Template Generation ## Available Templates Test templates are located in `test/templates/`: - `unit_test_template.dart` - `widget_test_template.dart` - `integration_test_template.dart` - `service_test_template.dart` ## Unit Test Template ```dart /// SPOTS Component Uni