data-model-mapping
/data-model-mapping
When adding, renaming, or removing a field on a data model that has a mapped counterpart elsewhere — an API/DTO, a database/ORM entity, a serializer, or a cross-platform equivalent model (Android/iOS/Backend). Use whenever a model's fields change, before considering the change complete.
- Author
- ahmadulhoq ↗
- Repository
- agentskel ↗
- Licence
- MIT
- Last repository change
- 23.09.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 23.09.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
When adding, renaming, or removing a field on a data model that has a mapped counterpart elsewhere — an API/DTO, a database/ORM entity, a serializer, or a cross-platform equivalent model (Android/iOS/Backend). Use whenever a model's fields change, before considering the change complete.
Original author description
When adding, renaming, or removing a field on a data model that has a mapped counterpart elsewhere — an API/DTO, a database/ORM entity, a serializer, or a cross-platform equivalent model (Android/iOS/Backend). Use whenever a model's fields change, before considering the change complete.
How it works
- Step 1 — Locate Every Side of the Mapping First
- Step 2 — Propagate the Change
- Step 3 — Cross-Platform Parity
- Step 4 — Trace the Field End-to-End
- Step 5 — Defaults and Nullability
- Step 6 — Test the Round Trip
- Common Rationalizations
SKILL.md preview
--- name: data-model-mapping license: MIT description: When adding, renaming, or removing a field on a data model that has a mapped counterpart elsewhere — an API/DTO, a database/ORM entity, a serializer, or a cross-platform equivalent model (Android/iOS/Backend). Use whenever a model's fields change, before considering the change complete. --- # Data Model Mapping Standards ## Step 1 — Locate Every Side of the Mapping First - [ ] Before editing a model, grep for its name across mapper/serializer files (`*Mapper`, `*Serializer`, `toDto`/`fromDto`, `toEntity`/`fromEntity`, proto/JSON codecs). - [ ] If a Blueprint is configured (`Blueprint Path` in `.memory/CONFIG.md`), check its parity matrix and domain specs for a cross-platform counterpart of this model. - [ ] List every mapped side found — the field change must land on all of them, not just the origin model. ## Step 2 — Propagate the Change - [ ] Add/rename/remove the field on every mapped side identified in Step 1 in the same change, not as a follow-up. - [ ] Never consider a field change done because "only this model" needed it — a model with a mapping is never edited in isolation. ## Step 3 — Cross-Platform Parity - [ ] If this model maps to a documented domain entity in the Blueprint, update the parity matrix / domain spec to match. - [ ] If another platform repo has its own copy of this model and you can't update it directly, write a Knowledge Bus entry flagging the change. ## Step 4 — Trace the Field End-to-End - [ ] Follow the changed field through the full mapping chain (model → mapper → serialized/DB form) and confirm it isn't silently dropped anywhere along the way. - [ ] Pay special attention to mappers that build output field-by-field (e.g. manual `Dto(name = x.name, ...)` constructors) — these drop new fields silently unless every constructor call site is updated. ## Step 5 — Defaults and Nullability - [ ] For a new field, explicitly decide its default/null behavior on every side — don't rely on an implicit language-level fallback that may differ between sides. ## Step 6 — Test the Round Trip - [ ] Add or update a mapping test that asserts the changed field survives a full round trip (model → mapped form → model) with a non-default value. ## Common Rationalizations | Rationalization | Why it's wrong | Do this instead | |---|---|---| | "I only changed the domain model, the mapper doesn't need touching" | Mappers are usually explicit field-by-field — an unmapped field disappears silently, with no compile error. | Grep for the model name in mapper/serializer files and update every match. | | "The field has a sensible default, I'll skip the mapper" | A default on one side can diverge from the actual default on another side. | Explicitly wire the default/null behavior into the mapper. | | "Cross-platform parity isn't my job, I'm only touching this platform" | Silent parity drift breaks other platforms without anyone noticing until a bug report. | Update the parity matrix or flag a Knowledge Bus entry. | | "Tests already pass, mapping must be fine" | Passing feature tests without a mapping-specific test don't catch a dropped field. | Add a round-trip mapping test for the changed field. | **Gate:** Do not consider a data model field change complete until every mapped representation found in Step 1 has been updated and verified via Step 4.
Versions
The database has no other skills named data-model-mapping.
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version 3c1892f93e51 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100generating-orm-code
Execute use when you need to work with ORM code generation. This skill provides ORM model and code generation with comprehensive guidance and automation. Trigger with phrases like "generate ORM models", "create entity classes", or "scaffold database models". - 100generating-orm-code
Execute use when you need to work with ORM code generation. This skill provides ORM model and code generation with comprehensive guidance and automation. Trigger with phrases like "generate ORM models", "create entity classes", or "scaffold database models". - 100database-design
Database decisions - DB and ORM, schema, indexes, queries, migrations. Use when designing or changing a data model. - 85backend-database-review
Use when reviewing database schema design, migrations, ORM entity definitions, or query patterns. Triggers when SQL files (`*.sql`), migration directories (`db/migration/`, `migrations/`, `alembic/`), JPA entities, or ORM model files are in scope. - 100cache-entities
Read-only single-entity-by-id caching via the generic IEntityCache abstraction (cache to the entity or a DTO), auto-invalidated. USE FOR: AddEntityCache, caching to entity or DTO, batch lookups (FindMany/GetMany), expiration, EntityCacheWithObjectMapper mapping. DO NOT USE FOR:… - 96db-change
Use for database schema/model/query changes AND new entity/relation/document modeling — SQL, NoSQL, ORM, indexes, constraints, data safety. Once a migration file exists, hand off to migration-review.