Skip to content
Skills Library
Programming · Review & audit

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.

Repository
agentskel ↗
Licence
MIT
Last repository change
23.09.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 23.09.2026, without references to retired models or APIs.

Licence

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

  1. Step 1 — Locate Every Side of the Mapping First
  2. Step 2 — Propagate the Change
  3. Step 3 — Cross-Platform Parity
  4. Step 4 — Trace the Field End-to-End
  5. Step 5 — Defaults and Nullability
  6. Step 6 — Test the Round Trip
  7. Common Rationalizations
Original SKILL.md headings · 37 lines, 526 words
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.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.