data-modeling
Skill4 starsChanged 9 days agoMITView on GitHub
Use when designing, reviewing, or migrating Ditto data models from JSON or SQL: CRDT merge semantics, arrays and counters, composite IDs, embedding vs splitting collections, attachments, document size and BLE sync budgets. Covers Ditto SDK 4.14.x, 5.0.x, 5.1.x and 5.2.0, including strict-mode migration.
16 other projects use a version of this.
Adopted by
Most recently taken up by
- nisarth/claude-skills-storetheir own version, first seen Nov 8, 2026
- SWEStash/swe-workflow-skillstheir own version, first seen Nov 8, 2026
- timmywheels/skillstheir own version, first seen Nov 1, 2026
- vindreshsingh/engineering-skillstheir own version, first seen Oct 20, 2026
- MartinOlivero/saas-buildertheir own version, first seen Oct 13, 2026
- nimadorostkar/Claude-Skills-collectiontheir own version, first seen Oct 13, 2026
Used with
Projects with it also use containerization, incident-response and 5 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
mmondoraSkillcontainerization
Docker best practices for cloud-native applications. Multi-stage builds, distroless images, security scanning, non-root users, Cloud Run orchestration. Use when writing Dockerfiles, configuring container builds, or deploying to Cloud Run/GKE.
Also in 3 projects that use this
AnthropicSkillincident-response
Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.
Also in 7 projects that use this
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 6 projects that use this
ElasticSkillaccessibility
Accessibility guidance for Kibana. Use this skill when working with or reviewing EUI components, resolving a11y-related (@elastic/eui) ESLint issues, and ensuring proper use of ARIA attributes, focus management, keyboard interactions, and accessible naming conventions.
Also in 5 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 8 projects that use this
AnthropicSkilldocumentation
Write and maintain technical documentation. Trigger with "write docs for", "document this", "create a README", "write a runbook", "onboarding guide", or when the user needs help with any form of technical writing — API docs, architecture docs, or operational runbooks.
Also in 3 projects that use this
Other versions16 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 16
- microsoft/rayfin★ 646same name
- microsoft/awesome-rayfin★ 108same name
- nimadorostkar/Claude-Skills-collection★ 33same name
- jdm4pku/RE-Skills★ 26same name
- khuynh22/agent-dev-team★ 9same name
- MartinOlivero/saas-builder★ 4same name
- bjornjee/skills★ 2same name
- mmondora/claude-skills★ 1same name
- nisarth/claude-skills-store★ 1same name
- SWEStash/swe-workflow-skills★ 1same name
6 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- data-streamsSkill
- ditto-mesh-networkingSkill
- kotlin-sdkSkill
- swift-sdkSkill
- sync-subscriptionsSkill
- write-dqlSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Read only the reference sections needed for the request.
- Distinctive: line 56
Use a unique line/entity ID when repeated instances of the same SKU are distinct.
- Distinctive: line 78
Deletes have a retention window: Default tombstone TTL is 7 days on Small Peers, 30 on Big Peer (tunable).
- Distinctive: line 84
Default to related data in one document with sub-entities as keyed MAPs: one atomic write with per-field merge.
“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Data Modeling for Ditto
Design collections around how concurrent offline edits merge. Each field is a CRDT;
choosing REGISTER, MAP, COUNTER, PN_COUNTER or ATTACHMENT determines what
survives when peers reconnect. This skill owns model design; use write-dql for query
syntax, or https://docs.ditto.live/dql/dql if that skill is unavailable.
Start with the task
Read only the reference sections needed for the request. For a long file, inspect its contents first, then read the matching section; do not load the entire skill directory. The README is for installation and verification, not a prerequisite.
| Task | Read |
| Review raw JSON or produce a complete design | workflow.md: intake, rubric and output contract |
| Choose a field's merge behavior | crdt-types.md |
| Resolve SDK differences or migrate strict-mode peers | versions.md |
| Budget size, BLE airtime, observers or metadata growth | performance.md |
| Audit logs, soft deletes, schema evolution, smart upserts, MongoDB Connector | best-practices.md, matching section |
| Adapt a worked design | One example: orders, chat, time series or relational migration |
Establish the baseline
Supports 4.14.x (LTS), 5.0.x, 5.1.x and 5.2.0. Establish the SDK version and who edits
which fields offline before designing. Ask missing intake questions in one batch;
infer other facts from the supplied JSON when possible and state assumptions.
Intake covers transports, hardware, document growth, binaries, query patterns,
permission scopes and retention; the full checklist is in references/workflow.md §1.
All examples assume dql_strict_mode = false on every peer. This is the 5.x
factory default and the migration target for 4.14.x. The flag is per-peer and runtime
only: apply ALTER SYSTEM SET dql_strict_mode = false at every app start. Migrate 4.x
peers before upgrading to v5 so the upgrade changes no merge behavior.
- Lenient writes infer objects as
MAP; scalars and arrays remainREGISTER. Lenient reads return every field type without declarations. - Declare only
COUNTER,ATTACHMENT, or a deliberateREGISTERoverride for an object that must remain atomic. Do not add routine MAP/REGISTER declarations. - Unmigrated strict peers need declarations on both writes and reads; otherwise
objects store as whole-object registers and undeclared MAP/COUNTER fields disappear
from query results without an error. Use the transition rules in
references/versions.md.
Decisions that prevent data loss
- Arrays merge as one last-write-wins register at every depth. Concurrent appends can lose data silently. Use a MAP keyed by stable ID or child documents for multi-writer/growing entities. Ordered lists need a sortable field or one writer responsible for position; a keyed MAP does not preserve order. Use a unique line/entity ID when repeated instances of the same SKU are distinct; keying those instances by SKU would collapse independent appends.
- Accumulating numbers need
COUNTER(4.14+).SETarithmetic on a register loses concurrent increments. Declare the counter when seeding it on INSERT; a plain number creates a register. Model money as integer minor units. - Objects merge per key under the lenient baseline. Force
REGISTERonly when the object must change atomically. A MAP overwrite keeps omitted keys; use dottedUNSETto remove them. Bulk key churn suggests a child collection. - Decide
_idat design time. It is immutable and never a CRDT. Permission rules can see only_id; put scope values (store/site/tenant/region/user) in a composite object ID, e.g.{ 'store_id': 42, 'order_id': 'o-1' }. Subfields are queryable and indexable; avoid delimiter-joined IDs and redundant scope fields in the body. - Move binary payloads to
ATTACHMENT. Bytes are fetched separately and excluded from document size. Ask about the MongoDB Connector first: it does not carry attachments, so connector-synced collections currently use inline base64 with a strict size budget; seebest-practices.md. - Budget serialized size including CRDT metadata. The soft warning is 256 KiB; the hard limit is 5 MiB. 5.1+ rejects oversized local writes; 4.14.x/5.0.x log. 5.2.0 drops a replication diff that would push the document over its hard limit and stops updates to that document until eviction/re-sync; see versions.md. BLE is roughly 20 KB/s effective, so 250 KiB can consume 10+ seconds of airtime; size for the slowest required transport.
- Deletes have a retention window. Default tombstone TTL is 7 days on Small Peers, 30 on Big Peer (tunable). Longer-offline peers can resurrect deleted documents; consider soft deletes when that is unacceptable.
Embed or split
Default to related data in one document with sub-entities as keyed MAPs: one atomic write with per-field merge. Split when an entity grows without bound, breaches the size budget, has a different permission scope, or is accessed independently at scale.
JOINs require 5.1+, an indexed or _id right-side key, and Small Peers; they are
not supported on Big Peer or in subscriptions. Child references must retain the full
composite parent identity, including its store/tenant scope. Joining only an unscoped
order number can match another store's order. Prefer matching the complete parent
_id; a right-side subfield join still requires an index. Consult write-dql before
emitting JOIN syntax. On 4.14.x/5.0.x, reassemble with app-side
fetches or denormalized read fields. Use the relational-migration example for the design
tradeoff and write-dql for grammar. Execute cookbook statements one at a time:
DQL rejects multi-statement strings.
Deliver a reviewable design
For a complete JSON review, use the stable finding IDs in references/workflow.md §2;
do not invent replacements for rubric IDs. Return:
- Findings: field path, rubric ID, severity and reason.
- Recommended collections: per-field CRDT behavior and pasteable INSERT statements.
- Split decisions: back-reference keys and how reads reassemble on the target version.
- Budget notes: estimated serialized size, transport implications and observer scope.
For a narrow question, read and answer only the relevant part of that workflow.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

