agentsclimarketplace

Domain

Skill launch52-ai/flutter-template/.claude/skills/domain

Template for Flutter mobile applications.

Install
npx -y skills add launch52-ai/flutter-template --skill domain

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Generate domain layer code (entities, enums, repository interfaces) from feature specifications. Creates pure Dart business logic with no external dependencies. Use after /feature-init to fill in the domain layer.

SKILL.md

5.3 KB, as published. Nobody here has run it

Domain - Domain Layer Generator

Generate domain layer components from feature specifications. Creates the foundation that data and presentation layers build upon.

Philosophy

The domain layer is pure Dart with zero external dependencies:

  • No Flutter
  • No Freezed (that's for data layer DTOs)
  • No JSON serialization
  • Only language primitives

This ensures the domain is:

  • Framework-agnostic
  • Easily testable
  • Stable (changes least frequently)

When to Use This Skill

  • After /feature-init has created the folder structure
  • When you need to fill in entities, enums, or repository interfaces
  • When adding new domain concepts to an existing feature
  • User asks to "create domain", "generate entities", or "create repository interface"

What This Skill Creates

lib/features/{feature}/domain/
├── entities/
│   ├── {entity}.dart           # Pure Dart class
│   └── {value_object}.dart     # Value objects (if needed)
├── enums/
│   └── {enum_name}.dart        # Enum definitions
└── repositories/
    └── {feature}_repository.dart  # Abstract interface

Workflow

Step 1: Locate the Spec

Look for:

lib/features/{feature}/.spec.md     # If feature exists
docs/features/{feature}.spec.md     # If feature is new

If no spec exists, ask user to run /plan {feature} first.

Step 2: Extract Domain Requirements

From the spec, identify:

  • Entities - Section 2.1 (fields, types, required/optional)
  • Enums - Section 2.2 (values and descriptions)
  • Repository Interface - Section 2.3 (methods and signatures)
  • Value Objects - Composite types like LatLng, Money
  • Business Rules - Validation, computed properties

Step 3: Generate Code

Use reference files in reference/ directory as templates:

ComponentReference File
Simple entityreference/entities/simple_entity.dart
Entity with computedreference/entities/entity_with_computed.dart
Entity with equalityreference/entities/entity_with_equality.dart
Entity with copyWithreference/entities/entity_with_copywith.dart
LatLng value objectreference/value_objects/lat_lng.dart
Money value objectreference/value_objects/money.dart
Simple enumreference/enums/simple_enum.dart
Enum with propertiesreference/enums/enum_with_properties.dart
Enum with methodsreference/enums/enum_with_methods.dart
Basic CRUD repositoryreference/repositories/basic_crud_repository.dart
Paginated repositoryreference/repositories/paginated_repository.dart
Offline repositoryreference/repositories/offline_repository.dart

Step 4: Verify

dart run .claude/skills/domain/scripts/check.dart {feature}

Commands

# Generate domain layer from spec
/domain {feature}

# Generate only entities
/domain {feature} --only=entities

# Generate only repository interface
/domain {feature} --only=repository

# Add entity to existing feature
/domain {feature} --add-entity={EntityName}

When to Add What

NeedAdd
Just store dataNothing extra
Compare instances== and hashCode
Update immutablycopyWith
Debug outputtoString

Default: Add nothing extra. Only add when there's a clear need.

Checklist

Before finishing domain generation:

  • All entities from spec are created
  • All enums from spec are created
  • Repository interface has all methods from spec
  • All fields have correct types
  • Required vs optional fields match spec
  • Computed properties are implemented
  • Doc comments explain purpose
  • No external dependencies (pure Dart only)
  • Files follow naming convention ({snake_case}.dart)
  • ==/hashCode added only where needed
  • copyWith added only where needed

Naming Conventions

ElementConventionExample
Entity classPascalCase, finalfinal class Memory
Entity filesnake_casememory.dart
EnumPascalCaseSyncStatus
Enum valuescamelCasepending, inProgress
Repository{Feature}RepositoryMemoriesRepository
Value objectPascalCase, finalfinal class LatLng

Domain Layer Rules

  1. No Flutter imports - Domain is pure Dart
  2. No Freezed - That's for data layer DTOs
  3. No JSON/serialization - Data layer concern
  4. No implementation details - Repository is interface only
  5. Minimal boilerplate - Only add ==/hashCode/copyWith when needed

Guides

GuideUse For
patterns-guide.mdPattern descriptions and when to use
reference/Actual code templates

Related Skills

  • /plan - Run first to create feature specification
  • /feature-init - Initialize feature scaffold (run before /domain)
  • /data - Implement repository and data sources after domain
  • /presentation - Implement UI layer after data
  • /testing - Create unit tests for domain logic

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.