[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7389KVDX858WVCH8P8MCM56":3,"skill-same:01M7389KVDX858WVCH8P8MCM56":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M7389KVDX858WVCH8P8MCM56","design-serialization-schema",null,"Design serialization schemas using JSON Schema, Protocol Buffer definitions, or Apache Avro. Covers schema versioning, backwards compatibility, validation rules, and evolution strategies for long-lived data formats. Use when defining a new API contract or data interchange format, adding fields to an existing schema without breaking consumers, migrating between schema versions, choosing between schema systems, or documenting data validation rules for automated enforcement.","roohe\u002Fagentic-super-skills","roohe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99054084?v=4","01M734WCDFP6RZVT5CNM00QR26","01M734WCE4BD0T4NZS5PCV9V5F",10,"MIT","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fdesign-serialization-schema\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: design-serialization-schema\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-23\"\ndescription: >\n  Design serialization schemas using JSON Schema, Protocol Buffer definitions,\n  or Apache Avro. Covers schema versioning, backwards compatibility, validation\n  rules, and evolution strategies for long-lived data formats. Use when defining\n  a new API contract or data interchange format, adding fields to an existing\n  schema without breaking consumers, migrating between schema versions, choosing\n  between schema systems, or documenting data validation rules for automated\n  enforcement.\nlicense: MIT\nallowed-tools: Read Write Edit Bash Grep Glob\nmetadata:\n  author: Philipp Thoss\n  version: \"1.0\"\n  domain: data-serialization\n  complexity: intermediate\n  language: multi\n  tags: json-schema, protobuf, avro, schema-evolution, versioning, compatibility\n---\n\n# Design Serialization Schema\n\nCreate well-versioned serialization schemas that evolve gracefully without breaking consumers.\n\n## When to Use\n\n- Defining a new API contract or data interchange format\n- Adding fields to an existing schema without breaking consumers\n- Migrating between schema versions\n- Choosing between schema systems (JSON Schema, Protobuf, Avro)\n- Documenting data validation rules for automated enforcement\n\n## Inputs\n\n- **Required**: Data model (entity relationships, field types, constraints)\n- **Required**: Compatibility requirements (who consumes this data, how long must old formats be readable)\n- **Optional**: Existing schema to evolve\n- **Optional**: Performance requirements (validation speed, schema registry integration)\n- **Optional**: Target serialization format (JSON, binary, columnar)\n\n## Procedure\n\n### Step 1: Choose a Schema System\n\n| System | Format | Strengths | Best For |\n|--------|--------|-----------|----------|\n| JSON Schema | JSON | Widely supported, flexible validation | REST APIs, config validation |\n| Protocol Buffers | Binary | Compact, fast, strong typing, built-in evolution | gRPC, microservices |\n| Apache Avro | Binary\u002FJSON | Schema in data, excellent evolution support | Kafka, data pipelines |\n| XML Schema (XSD) | XML | Comprehensive typing, namespace support | Enterprise\u002Flegacy SOAP |\n| TypeBox\u002FZod | TypeScript | Type inference, runtime validation | TypeScript APIs |\n\n**Got:** Schema system selected based on ecosystem, performance needs, and evolution requirements.\n**If fail:** If uncertain, start with JSON Schema — it has the broadest tooling support and can be layered onto existing JSON APIs.\n\n### Step 2: Design the Core Schema\n\n#### JSON Schema example:\n\n```json\n{\n  \"$schema\": \"https:\u002F\u002Fjson-schema.org\u002Fdraft\u002F2020-12\u002Fschema\",\n  \"$id\": \"https:\u002F\u002Fexample.com\u002Fschemas\u002Fmeasurement\u002Fv1\",\n  \"title\": \"Measurement\",\n  \"description\": \"A sensor measurement reading\",\n  \"type\": \"object\",\n  \"required\": [\"sensor_id\", \"value\", \"unit\", \"timestamp\"],\n  \"properties\": {\n    \"sensor_id\": {\n      \"type\": \"string\",\n      \"pattern\": \"^[a-z]+-[0-9]+$\",\n      \"description\": \"Unique sensor identifier (lowercase-digits format)\"\n    },\n    \"value\": {\n      \"type\": \"number\",\n      \"description\": \"Measured value\"\n    },\n    \"unit\": {\n      \"type\": \"string\",\n      \"enum\": [\"celsius\", \"fahrenheit\", \"kelvin\", \"percent\", \"ppm\"],\n      \"description\": \"Unit of measurement\"\n    },\n    \"timestamp\": {\n      \"type\": \"string\",\n      \"format\": \"date-time\",\n      \"description\": \"ISO 8601 timestamp with timezone\"\n    },\n    \"metadata\": {\n      \"type\": \"object\",\n      \"additionalProperties\": true,\n      \"description\": \"Optional key-value metadata\"\n    }\n  },\n  \"additionalProperties\": false\n}\n```\n\n#### Protocol Buffers example:\n\n```protobuf\nsyntax = \"proto3\";\npackage sensors.v1;\n\nimport \"google\u002Fprotobuf\u002Ftimestamp.proto\";\n\n\u002F\u002F Measurement represents a single sensor reading.\nmessage Measurement {\n  string sensor_id = 1;         \u002F\u002F Unique sensor identifier\n  double value = 2;             \u002F\u002F Measured value\n  Unit unit = 3;                \u002F\u002F Unit of measurement\n  google.protobuf.Timestamp timestamp = 4;\n  map\u003Cstring, string> metadata = 5; \u002F\u002F Optional key-value metadata\n}\n\nenum Unit {\n  UNIT_UNSPECIFIED = 0;\n  UNIT_CELSIUS = 1;\n  UNIT_FAHRENHEIT = 2;\n  UNIT_KELVIN = 3;\n  UNIT_PERCENT = 4;\n  UNIT_PPM = 5;\n}\n```\n\n#### Apache Avro example:\n\n```json\n{\n  \"type\": \"record\",\n  \"name\": \"Measurement\",\n  \"namespace\": \"com.example.sensors\",\n  \"doc\": \"A sensor measurement reading\",\n  \"fields\": [\n    {\"name\": \"sensor_id\", \"type\": \"string\", \"doc\": \"Unique sensor identifier\"},\n    {\"name\": \"value\", \"type\": \"double\", \"doc\": \"Measured value\"},\n    {\"name\": \"unit\", \"type\": {\"type\": \"enum\", \"name\": \"Unit\", \"symbols\": [\"CELSIUS\", \"FAHRENHEIT\", \"KELVIN\", \"PERCENT\", \"PPM\"]}},\n    {\"name\": \"timestamp\", \"type\": {\"type\": \"long\", \"logicalType\": \"timestamp-millis\"}},\n    {\"name\": \"metadata\", \"type\": [\"null\", {\"type\": \"map\", \"values\": \"string\"}], \"default\": null}\n  ]\n}\n```\n\n**Got:** Schema is self-documenting with descriptions, constraints, and clear type definitions.\n**If fail:** If the data model is not yet stable, mark the schema as `draft` and avoid publishing to a registry.\n\n### Step 3: Plan for Schema Evolution\n\nCompatibility rules:\n\n| Change | Backwards Compatible? | Forwards Compatible? | Safe? |\n|--------|----------------------|---------------------|-------|\n| Add optional field | Yes | Yes | Yes |\n| Add required field | No | Yes | No (breaks existing consumers) |\n| Remove optional field | Yes | No | Careful (producers may still send) |\n| Remove required field | Yes | No | Careful |\n| Rename a field | No | No | No (use alias + deprecation) |\n| Change field type | No | No | No (add new field, deprecate old) |\n| Add enum value | Yes (if consumers ignore unknown) | No | Depends on implementation |\n| Remove enum value | No | Yes | No |\n\nSafe evolution strategy:\n1. **Only add optional fields** with sensible defaults\n2. **Never remove or rename** — deprecate instead\n3. **Version the schema** in the identifier (`v1`, `v2`)\n4. **Use a schema registry** for binary formats (Confluent Schema Registry for Avro\u002FProtobuf)\n\n#### Protobuf evolution rules:\n```protobuf\n\u002F\u002F v1 — original\nmessage Measurement {\n  string sensor_id = 1;\n  double value = 2;\n  Unit unit = 3;\n}\n\n\u002F\u002F v2 — safe evolution\nmessage Measurement {\n  string sensor_id = 1;\n  double value = 2;\n  Unit unit = 3;\n  \u002F\u002F NEW: added in v2 — old clients ignore this field\n  google.protobuf.Timestamp timestamp = 4;\n  \u002F\u002F DEPRECATED: use sensor_id instead\n  reserved 6;\n  reserved \"old_sensor_name\";\n}\n```\n\n#### JSON Schema versioning:\n```json\n{\n  \"$id\": \"https:\u002F\u002Fexample.com\u002Fschemas\u002Fmeasurement\u002Fv2\",\n  \"allOf\": [\n    {\"$ref\": \"https:\u002F\u002Fexample.com\u002Fschemas\u002Fmeasurement\u002Fv1\"},\n    {\n      \"properties\": {\n        \"location\": {\n          \"type\": \"string\",\n          \"description\": \"Added in v2: GPS coordinates\"\n        }\n      }\n    }\n  ]\n}\n```\n\n**Got:** Evolution plan documented: which changes are safe, which require new versions.\n**If fail:** If a breaking change is unavoidable, version the schema (v1 → v2) and maintain parallel support during migration.\n\n### Step 4: Implement Schema Validation\n\n```python\n# JSON Schema validation (Python)\nfrom jsonschema import validate, ValidationError\nimport json\n\nschema = json.load(open(\"measurement_v1.json\"))\n\ndef validate_measurement(data: dict) -> list[str]:\n    \"\"\"Validate a measurement against the schema. Returns list of errors.\"\"\"\n    errors = []\n    try:\n        validate(instance=data, schema=schema)\n    except ValidationError as e:\n        errors.append(f\"{e.json_path}: {e.message}\")\n    return errors\n\n# Usage\nerrors = validate_measurement({\"sensor_id\": \"s-01\", \"value\": \"not_a_number\"})\n# → [\"$.value: 'not_a_number' is not of type 'number'\"]\n```\n\n```typescript\n\u002F\u002F TypeScript with Zod (runtime + compile-time)\nimport { z } from 'zod';\n\nconst MeasurementSchema = z.object({\n  sensor_id: z.string().regex(\u002F^[a-z]+-[0-9]+$\u002F),\n  value: z.number(),\n  unit: z.enum(['celsius', 'fahrenheit', 'kelvin', 'percent', 'ppm']),\n  timestamp: z.string().datetime(),\n  metadata: z.record(z.string()).optional(),\n});\n\ntype Measurement = z.infer\u003Ctypeof MeasurementSchema>;\n\n\u002F\u002F Validation\nconst result = MeasurementSchema.safeParse(inputData);\nif (!result.success) {\n  console.error(result.error.issues);\n}\n```\n\n**Got:** Validation runs on all incoming data at system boundaries (API endpoints, file ingestion).\n**If fail:** Log validation errors with the full payload (redacting sensitive fields) for debugging.\n\n### Step 5: Document the Schema\n\nCreate a schema documentation page:\n\n```markdown\n# Measurement Schema (v1)\n\n## Overview\nRepresents a single sensor reading with metadata.\n\n## Fields\n| Field | Type | Required | Description | Constraints |\n|-------|------|----------|-------------|-------------|\n| sensor_id | string | Yes | Unique sensor ID | Pattern: `^[a-z]+-[0-9]+$` |\n| value | number | Yes | Measured value | Any valid IEEE 754 double |\n| unit | enum | Yes | Unit of measurement | One of: celsius, fahrenheit, kelvin, percent, ppm |\n| timestamp | string | Yes | Reading time | ISO 8601 with timezone |\n| metadata | object | No | Key-value pairs | String keys and values |\n\n## Changelog\n| Version | Date | Changes |\n|---------|------|---------|\n| v1 | 2025-03-01 | Initial schema |\n\n## Compatibility\n- **Backwards**: Consumers of v1 will continue to work with future versions\n- **Policy**: Only additive, optional field changes between minor versions\n```\n\n**Got:** Documentation is auto-generated or stays in sync with the schema definition.\n**If fail:** If docs drift from schema, add a CI check that validates docs against the schema source.\n\n## Validation\n\n- [ ] Schema uses appropriate system for the use case (JSON Schema, Protobuf, Avro)\n- [ ] All fields have types, descriptions, and constraints\n- [ ] Required vs optional fields are explicitly defined\n- [ ] Evolution strategy documented (safe changes, versioning policy)\n- [ ] Validation implemented at system boundaries\n- [ ] Schema is versioned with a changelog\n- [ ] Round-trip test: serialize → deserialize → compare confirms no data loss\n\n## Pitfalls\n\n- **Over-constraining too early**: Strict validation on a new schema blocks iteration. Start permissive (`additionalProperties: true`), tighten later.\n- **No default values**: Adding a required field without a default breaks all existing data. Always provide defaults for new fields.\n- **Ignoring null**: Many schemas don't handle null\u002Fmissing fields clearly. Be explicit about nullable vs optional.\n- **Version in the payload, not the URL**: For long-lived data (storage, events), embed the schema version in the data itself, not the endpoint URL.\n- **Enum exhaustiveness**: Adding a new enum value can crash consumers that use exhaustive switch statements. Document that unknown values should be handled gracefully.\n\n## Related Skills\n\n- `serialize-data-formats` — format selection and encoding\u002Fdecoding implementation\n- `implement-pharma-serialisation` — pharmaceutical serialisation (regulatory schemas)\n- `write-validation-documentation` — validation documentation for regulated schemas\n","# Design Serialization Schema\n\nCreate well-versioned serialization schemas that evolve gracefully without breaking consumers.\n\n## When to Use\n\n- Defining a new API contract or data interchange format\n- Adding fields to an existing schema without breaking consumers\n- Migrating between schema versions\n- Choosing between schema systems (JSON Schema, Protobuf, Avro)\n- Documenting data validation rules for automated enforcement\n\n## Inputs\n\n- **Required**: Data model (entity relationships, field types, constraints)\n- **Required**: Compatibility requirements (who consumes this data, how long must old formats be readable)\n- **Optional**: Existing schema to evolve\n- **Optional**: Performance requirements (validation speed, schema registry integration)\n- **Optional**: Target serialization format (JSON, binary, columnar)\n\n## Procedure\n\n### Step 1: Choose a Schema System\n\n| System | Format | Strengths | Best For |\n|--------|--------|-----------|----------|\n| JSON Schema | JSON | Widely supported, flexible validation | REST APIs, config validation |\n| Protocol Buffers | Binary | Compact, fast, strong typing, built-in evolution | gRPC, microservices |\n| Apache Avro | Binary\u002FJSON | Schema in data, excellent evolution support | Kafka, data pipelines |\n| XML Schema (XSD) | XML | Comprehensive typing, namespace support | Enterprise\u002Flegacy SOAP |\n| TypeBox\u002FZod | TypeScript | Type inference, runtime validation | TypeScript APIs |\n\n**Got:** Schema system selected based on ecosystem, performance needs, and evolution requirements.\n**If fail:** If uncertain, start with JSON Schema — it has the broadest tooling support and can be layered onto existing JSON APIs.\n\n### Step 2: Design the Core Schema\n\n#### JSON Schema example:\n\n```json\n{\n  \"$schema\": \"https:\u002F\u002Fjson-schema.org\u002Fdraft\u002F2020-12\u002Fschema\",\n  \"$id\": \"https:\u002F\u002Fexample.com\u002Fschemas\u002Fmeasurement\u002Fv1\",\n  \"title\": \"Measurement\",\n  \"description\": \"A sensor measurement reading\",\n  \"type\": \"object\",\n  \"required\": [\"sensor_id\", \"value\", \"unit\", \"timestamp\"],\n  \"properties\": {\n    \"sensor_id\": {\n      \"type\": \"string\",\n      \"pattern\": \"^[a-z]+-[0-9]+$\",\n      \"description\": \"Unique sensor identifier (lowercase-digits format)\"\n    },\n    \"value\": {\n      \"type\": \"number\",\n      \"description\": \"Measured value\"\n    },\n    \"unit\": {\n      \"type\": \"string\",\n      \"enum\": [\"celsius\", \"fahrenheit\", \"kelvin\", \"percent\", \"ppm\"],\n      \"description\": \"Unit of measurement\"\n    },\n    \"timestamp\": {\n      \"type\": \"string\",\n      \"format\": \"date-time\",\n      \"description\": \"ISO 8601 timestamp with timezone\"\n    },\n    \"metadata\": {\n      \"type\": \"object\",\n      \"additionalProperties\": true,\n      \"description\": \"Optional key-value metadata\"\n    }\n  },\n  \"additionalProperties\": false\n}\n```\n\n#### Protocol Buffers example:\n\n```protobuf\nsyntax = \"proto3\";\npackage sensors.v1;\n\nimport \"google\u002Fprotobuf\u002Ftimestamp.proto\";\n\n\u002F\u002F Measurement represents a single sensor reading.\nmessage Measurement {\n  string sensor_id = 1;         \u002F\u002F Unique sensor identifier\n  double value = 2;             \u002F\u002F Measured value\n  Unit unit = 3;                \u002F\u002F Unit of measurement\n  google.protobuf.Timestamp timestamp = 4;\n  map\u003Cstring, string> metadata = 5; \u002F\u002F Optional key-value metadata\n}\n\nenum Unit {\n  UNIT_UNSPECIFIED = 0;\n  UNIT_CELSIUS = 1;\n  UNIT_FAHRENHEIT = 2;\n  UNIT_KELVIN = 3;\n  UNIT_PERCENT = 4;\n  UNIT_PPM = 5;\n}\n```\n\n#### Apache Avro example:\n\n```json\n{\n  \"type\": \"record\",\n  \"name\": \"Measurement\",\n  \"namespace\": \"com.example.sensors\",\n  \"doc\": \"A sensor measurement reading\",\n  \"fields\": [\n    {\"name\": \"sensor_id\", \"type\": \"string\", \"doc\": \"Unique sensor identifier\"},\n    {\"name\": \"value\", \"type\": \"double\", \"doc\": \"Measured value\"},\n    {\"name\": \"unit\", \"type\": {\"type\": \"enum\", \"name\": \"Unit\", \"symbols\": [\"CELSIUS\", \"FAHRENHEIT\", \"KELVIN\", \"PERCENT\", \"PPM\"]}},\n    {\"name\": \"timestamp\", \"type\": {\"type\": \"long\", \"logicalType\": \"timestamp-millis\"}},\n    {\"name\": \"metadata\", \"type\": [\"null\", {\"type\": \"map\", \"values\": \"string\"}], \"default\": null}\n  ]\n}\n```\n\n**Got:** Schema is self-documenting with descriptions, constraints, and clear type definitions.\n**If fail:** If the data model is not yet stable, mark the schema as `draft` and avoid publishing to a registry.\n\n### Step 3: Plan for Schema Evolution\n\nCompatibility rules:\n\n| Change | Backwards Compatible? | Forwards Compatible? | Safe? |\n|--------|----------------------|---------------------|-------|\n| Add optional field | Yes | Yes | Yes |\n| Add required field | No | Yes | No (breaks existing consumers) |\n| Remove optional field | Yes | No | Careful (producers may still send) |\n| Remove required field | Yes | No | Careful |\n| Rename a field | No | No | No (use alias + deprecation) |\n| Change field type | No | No | No (add new field, deprecate old) |\n| Add enum value | Yes (if consumers ignore unknown) | No | Depends on implementation |\n| Remove enum value | No | Yes | No |\n\nSafe evolution strategy:\n1. **Only add optional fields** with sensible defaults\n2. **Never remove or rename** — deprecate instead\n3. **Version the schema** in the identifier (`v1`, `v2`)\n4. **Use a schema registry** for binary formats (Confluent Schema Registry for Avro\u002FProtobuf)\n\n#### Protobuf evolution rules:\n```protobuf\n\u002F\u002F v1 — original\nmessage Measurement {\n  string sensor_id = 1;\n  double value = 2;\n  Unit unit = 3;\n}\n\n\u002F\u002F v2 — safe evolution\nmessage Measurement {\n  string sensor_id = 1;\n  double value = 2;\n  Unit unit = 3;\n  \u002F\u002F NEW: added in v2 — old clients ignore this field\n  google.protobuf.Timestamp timestamp = 4;\n  \u002F\u002F DEPRECATED: use sensor_id instead\n  reserved 6;\n  reserved \"old_sensor_name\";\n}\n```\n\n#### JSON Schema versioning:\n```json\n{\n  \"$id\": \"https:\u002F\u002Fexample.com\u002Fschemas\u002Fmeasurement\u002Fv2\",\n  \"allOf\": [\n    {\"$ref\": \"https:\u002F\u002Fexample.com\u002Fschemas\u002Fmeasurement\u002Fv1\"},\n    {\n      \"properties\": {\n        \"location\": {\n          \"type\": \"string\",\n          \"description\": \"Added in v2: GPS coordinates\"\n        }\n      }\n    }\n  ]\n}\n```\n\n**Got:** Evolution plan documented: which changes are safe, which require new versions.\n**If fail:** If a breaking change is unavoidable, version the schema (v1 → v2) and maintain parallel support during migration.\n\n### Step 4: Implement Schema Validation\n\n```python\n# JSON Schema validation (Python)\nfrom jsonschema import validate, ValidationError\nimport json\n\nschema = json.load(open(\"measurement_v1.json\"))\n\ndef validate_measurement(data: dict) -> list[str]:\n    \"\"\"Validate a measurement against the schema. Returns list of errors.\"\"\"\n    errors = []\n    try:\n        validate(instance=data, schema=schema)\n    except ValidationError as e:\n        errors.append(f\"{e.json_path}: {e.message}\")\n    return errors\n\n# Usage\nerrors = validate_measurement({\"sensor_id\": \"s-01\", \"value\": \"not_a_number\"})\n# → [\"$.value: 'not_a_number' is not of type 'number'\"]\n```\n\n```typescript\n\u002F\u002F TypeScript with Zod (runtime + compile-time)\nimport { z } from 'zod';\n\nconst MeasurementSchema = z.object({\n  sensor_id: z.string().regex(\u002F^[a-z]+-[0-9]+$\u002F),\n  value: z.number(),\n  unit: z.enum(['celsius', 'fahrenheit', 'kelvin', 'percent', 'ppm']),\n  timestamp: z.string().datetime(),\n  metadata: z.record(z.string()).optional(),\n});\n\ntype Measurement = z.infer\u003Ctypeof MeasurementSchema>;\n\n\u002F\u002F Validation\nconst result = MeasurementSchema.safeParse(inputData);\nif (!result.success) {\n  console.error(result.error.issues);\n}\n```\n\n**Got:** Validation runs on all incoming data at system boundaries (API endpoints, file ingestion).\n**If fail:** Log validation errors with the full payload (redacting sensitive fields) for debugging.\n\n### Step 5: Document the Schema\n\nCreate a schema documentation page:\n\n```markdown\n# Measurement Schema (v1)\n\n## Overview\nRepresents a single sensor reading with metadata.\n\n## Fields\n| Field | Type | Required | Description | Constraints |\n|-------|------|----------|-------------|-------------|\n| sensor_id | string | Yes | Unique sensor ID | Pattern: `^[a-z]+-[0-9]+$` |\n| value | number | Yes | Measured value | Any valid IEEE 754 double |\n| unit | enum | Yes | Unit of measurement | One of: celsius, fahrenheit, kelvin, percent, ppm |\n| timestamp | string | Yes | Reading time | ISO 8601 with timezone |\n| metadata | object | No | Key-value pairs | String keys and values |\n\n## Changelog\n| Version | Date | Changes |\n|---------|------|---------|\n| v1 | 2025-03-01 | Initial schema |\n\n## Compatibility\n- **Backwards**: Consumers of v1 will continue to work with future versions\n- **Policy**: Only additive, optional field changes between minor versions\n```\n\n**Got:** Documentation is auto-generated or stays in sync with the schema definition.\n**If fail:** If docs drift from schema, add a CI check that validates docs against the schema source.\n\n## Validation\n\n- [ ] Schema uses appropriate system for the use case (JSON Schema, Protobuf, Avro)\n- [ ] All fields have types, descriptions, and constraints\n- [ ] Required vs optional fields are explicitly defined\n- [ ] Evolution strategy documented (safe changes, versioning policy)\n- [ ] Validation implemented at system boundaries\n- [ ] Schema is versioned with a changelog\n- [ ] Round-trip test: serialize → deserialize → compare confirms no data loss\n\n## Pitfalls\n\n- **Over-constraining too early**: Strict validation on a new schema blocks iteration. Start permissive (`additionalProperties: true`), tighten later.\n- **No default values**: Adding a required field without a default breaks all existing data. Always provide defaults for new fields.\n- **Ignoring null**: Many schemas don't handle null\u002Fmissing fields clearly. Be explicit about nullable vs optional.\n- **Version in the payload, not the URL**: For long-lived data (storage, events), embed the schema version in the data itself, not the endpoint URL.\n- **Enum exhaustiveness**: Adding a new enum value can crash consumers that use exhaustive switch statements. Document that unknown values should be handled gracefully.\n\n## Related Skills\n\n- `serialize-data-formats` — format selection and encoding\u002Fdecoding implementation\n- `implement-pharma-serialisation` — pharmaceutical serialisation (regulatory schemas)\n- `write-validation-documentation` — validation documentation for regulated schemas\n",{"name":5,"locale":23,"license":14,"metadata":24,"translator":31,"description":32,"allowed-tools":33,"source_commit":34,"source_locale":35,"translation_date":36},"caveman-lite",{"tags":25,"author":26,"domain":27,"version":28,"language":29,"complexity":30},"json-schema, protobuf, avro, schema-evolution, versioning, compatibility","Philipp Thoss","data-serialization","1.0","multi","intermediate","Julius Brussee homage — caveman","Design serialization schemas using JSON Schema, Protocol Buffer definitions, or Apache Avro. Covers schema versioning, backwards compatibility, validation rules, and evolution strategies for long-lived data formats. Use when defining a new API contract or data interchange format, adding fields to an existing schema without breaking consumers, migrating between schema versions, choosing between schema systems, or documenting data validation rules for automated enforcement.\n","Read Write Edit Bash Grep Glob","82c77053","en","2026-04-23","master","f483e54f3ad5f202a77d45f2e57f8d970b71195f","skills_library\u002Fdesign-serialization-schema",2,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills","https:\u002F\u002Fgithub.com\u002Froohe","yoou.link","2026-05-19 15:56:07",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add roohe\u002Fagentic-super-skills --skill design-serialization-schema",{"tool":51,"command":52},"bunx","bunx skills add roohe\u002Fagentic-super-skills --skill design-serialization-schema",{"tool":54,"command":55},"pnpm","pnpm dlx skills add roohe\u002Fagentic-super-skills --skill design-serialization-schema","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fdesign-serialization-schema\u002FSKILL.md",true,[],[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M73D865CZME2FCMKA4PQM348","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M73D7Z64J4ABWZJD7P44XBBF","youtube-downloader","Download and process YouTube content for research. Use when: downloading competitor videos for analysis; extracting audio for podcasts; getting transcripts for content repurposing; archiving webinars; research content curation","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M73D7K8778TGZV3GJFR3703D","yc-pitch-deck","Create a compelling startup pitch deck that follows the structure proven to raise billions from top investors. Master the YC and Sequoia formats that get founders funded. Use when: **Fundraising** to create investor pitch decks; **YC application** to structure your narrative; **Demo Day prep** to craft your 2-minute pitch; **Angel investors** to communicate your opportunity; **Partnership pitches** to structure compelling asks","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyc-pitch-deck\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M73D70KJSE0E8Z28YMNNRT04","x-twitter-scraper","Use when the user needs X (Twitter) data or confirmation-gated X actions through Xquik: tweet search, user lookup, follower extraction, media download, monitoring, webhooks, MCP, SDKs, posting, likes, DMs, and profile updates. Requires a Xquik API key. Never ask for X login material.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M73D6ED01GV077R7K4NZNFZJ","write-vignette","Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-vignette\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M73D69YJR0BK3NFHE0CYG3EF","write-validation-documentation","Write IQ\u002FOQ\u002FPQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-validation-documentation\u002FSKILL.md",[],[]]