.claude/skills/update-domain-model/SKILL.md
Add properties to an existing domain model from TMDb
npx skillsauth add adamayoung/popcorn update-domain-modelInstall 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.
Guide for adding properties to an existing domain model from TMDb SDK types. See references/domain-model-patterns.md (in the create-domain-model skill) for code patterns, file locations, and common pitfalls.
Ask the user for:
DocC documentation: https://adamayoung.github.io/TMDb/documentation/tmdb/
Source code (in Xcode DerivedData after build):
.../SourcePackages/checkouts/TMDb/Sources/TMDb/Domain/Models/
Compare the TMDb type reference (see TMDB_MAPPING.md) with the current domain entity.
For new complex types (enums, structs), create domain entities:
Contexts/Popcorn<X>/Sources/<X>Domain/Entities/<NewType>.swiftAdd properties to the struct, init, and init defaults:
Contexts/Popcorn<X>/Sources/<X>Domain/Entities/<Name>.swiftFor each new complex type, write tests first then implement:
Adapters/.../Tests/.../Mappers/<NewType>MapperTests.swiftAdapters/.../Sources/.../Mappers/<NewType>Mapper.swiftUpdate tests then implementation:
Adapters/.../Tests/.../Mappers/<Name>MapperTests.swiftAdapters/.../Sources/.../Mappers/<Name>Mapper.swiftFor new complex types that need persistence:
Contexts/Popcorn<X>/Sources/<X>Infrastructure/DataSources/Local/Models/<Context><NewType>Entity.swiftAdd properties and relationships:
Contexts/Popcorn<X>/Sources/<X>Infrastructure/DataSources/Local/Models/<Context><Name>Entity.swiftUpdate all 3 methods (entity->domain, domain->entity, update-in-place) with tests:
Contexts/.../Tests/<X>InfrastructureTests/Mappers/<Name>MapperTests.swiftContexts/.../Sources/<X>Infrastructure/DataSources/Local/Mappers/<Name>Mapper.swiftContexts/Popcorn<X>/Sources/<X>Application/Models/<Name>Details.swiftContexts/Popcorn<X>/Sources/<X>Application/Mappers/<Name>DetailsMapper.swiftContexts/.../Tests/<X>ApplicationTests/Mappers/<Name>DetailsMapperTests.swiftUpdate <Name>+Mocks.swift in all test targets that use it.
Run the full pre-PR checklist: /format, /lint, /build, /test
$ARGUMENTS
testing
Run all unit tests
testing
Run UI tests
testing
Run snapshot tests
testing
Run a specific test target or test class