arkiv-data-modeling
Model data for the queries you need
When to use
Use this skill before implementing an Arkiv entity schema. Start with the requested screen or operation: which entity type it returns, filters, ranges, sort, expected cardinality, trusted creators and update policy.
For an existing error, use arkiv-troubleshooting first. Use arkiv-query for pagination, arkiv-entity-lifecycle for mutation permissions, and arkiv-security-trust for authorization. Use arkiv-write-safety to journal and reconcile multi-step writes, arkiv-entity-expiration for related deadlines, and arkiv-first-write for a first transaction.
Check the installed SDK version and declarations. Examples below target SDK 0.8.1 on Tiramisu. Without that local evidence, explain the model and documented operations conceptually and ask for the missing declarations; do not assemble executable code from guessed imports. Producing a model does not authorize publishing data or spending GLM.
Storage rules
- Put scalar fields needed by predicates in attributes. Put nested objects, arrays, long descriptions and other unqueried data in payload. Both are public; exclude secrets and private fields before encoding either.
- Create permits 32 cells total. Payload and content type consume two, leaving 30 user attributes, including namespace and schema fields. Patches also count system mutations against their operation budget. Separately, Tiramisu caps the resulting entity at 32 user attributes after a patch; splitting transactions cannot grow beyond that state ceiling.
- Use lowercase
snake_caseapplication names, at most 32 bytes, beginning with a letter; exclude reserved query words and type tags listed in limits. The SDK accepts a wider alphabet than the current node; this conservative convention avoids the uppercase node rejection.projectplusentity_typescopes an application's data. Anyone can copy these values; scope trusted reads by creator too. - A
strholds at most 128 UTF-8 bytes and excludes C0 controls and DEL. Validate a text limit from the input contract; never silently truncate or replace a requested text filter with a hash. - There are nine user attribute types.
bytesis system-only payload storage, not a tenth user type. No indexed array, object or null constructor exists.