.cursor/skills/file-organization-standards/SKILL.md
Enforces file naming conventions, directory structure, one class per file, Clean Architecture layer placement. Use when creating new files, organizing code, or refactoring file structure.
npx skillsauth add avra-cadavra/avrai file-organization-standardsInstall 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.
Follow Clean Architecture layer structure:
lib/
├── core/ # Core business logic, models, services
├── data/ # Data sources, repositories (implementation)
├── domain/ # Use cases, repository interfaces
└── presentation/ # UI, BLoCs, widgets, pages
lowercase_with_underscores for file namesExamples:
create_event_page.dart → CreateEventPagespot_details_page.dart → SpotDetailsPageauth_service.dart → AuthServicespots_bloc.dart → SpotsBlocPascalCase for classes, enums, typedefsExamples:
user_service.dart → Class: UserServicespot_card.dart → Class: SpotCardlib/core/
├── models/
│ ├── user.dart
│ └── spot.dart
├── services/
│ ├── auth_service.dart
│ └── storage_service.dart
└── utils/
└── validators.dart
lib/domain/
├── repositories/
│ └── spots_repository.dart
└── usecases/
├── get_spots_usecase.dart
└── create_spot_usecase.dart
lib/data/
├── datasources/
│ ├── spots_remote_datasource.dart
│ └── spots_local_datasource.dart
└── repositories/
└── spots_repository_impl.dart
lib/presentation/
├── pages/
│ ├── auth/
│ │ ├── login_page.dart
│ │ └── signup_page.dart
│ └── spots/
│ ├── spots_page.dart
│ └── spot_details_page.dart
├── widgets/
│ ├── common/
│ │ └── custom_button.dart
│ └── spots/
│ └── spot_card.dart
└── blocs/
├── auth/
│ └── auth_bloc.dart
└── spots/
└── spots_bloc.dart
Rule: One class per file (except closely related classes like models)
✅ GOOD:
// user.dart
class User {
// User class
}
// user_service.dart
class UserService {
// Service class
}
✅ GOOD (Related Classes):
// auth_events.dart
class SignInEvent {}
class SignUpEvent {}
class SignOutEvent {}
// auth_states.dart
class AuthInitial {}
class AuthLoading {}
class AuthAuthenticated {}
❌ BAD:
// services.dart (Multiple unrelated services)
class UserService {}
class SpotService {}
class EventService {}
Group related files in subdirectories:
lib/presentation/pages/auth/
├── login_page.dart
├── signup_page.dart
└── auth_wrapper.dart
lib/presentation/widgets/spots/
├── spot_card.dart
├── spot_list.dart
└── spot_picker.dart
login_page.dart → LoginPagespot_details_page.dart → SpotDetailsPagecreate_event_page.dart → CreateEventPageauth_service.dart → AuthServicestorage_service.dart → StorageServicepayment_service.dart → PaymentServiceauth_bloc.dart → AuthBlocspots_bloc.dart → SpotsBlocsearch_bloc.dart → SearchBlocspot_card.dart → SpotCardcustom_button.dart → CustomButtonoffline_indicator.dart → OfflineIndicatorlib/core/models/ or lib/domain/entities/lib/core/services/lib/domain/usecases/lib/domain/repositories/lib/data/repositories/lib/data/datasources/lib/presentation/pages/[feature]/lib/presentation/widgets/[feature]/ or lib/presentation/widgets/common/lib/presentation/blocs/[feature]/Check existing structure before creating new files:
lib/core/ - Core layer exampleslib/presentation/pages/ - Page exampleslib/presentation/widgets/ - Widget examplesdevelopment
--- 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