governing-field-serialization

Enforce RFC 3339 timestamps, ISO 8601 durations, and snake_case field naming in API payloads.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/musher-dev/bundles --skill governing-field-serialization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: governing-field-serialization
Source: https://github.com/musher-dev/bundles/tree/main/api-route-governance/skills/governing-field-serialization
Command: npx skills add https://github.com/musher-dev/bundles --skill governing-field-serialization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the chaos of inconsistent data serialization in APIs, ensuring that timestamps, durations, money, identifiers, enums, and binary data are represented uniformly across all services.

Core Features & Use Cases

  • Enforce Canonical Formats: Guarantees adherence to standards like RFC 3339 for timestamps and ISO 8601 for durations.
  • Consistent Type Representation: Mandates specific JSON structures for money and identifiers, preventing precision loss and ambiguity.
  • Standardized Naming: Enforces snake_case for fields with a camelCase escape hatch for interoperability.
  • Use Case: When designing a new API endpoint, use this Skill to ensure all fields, from creation timestamps to user IDs, follow the established, unambiguous serialization rules.

Quick Start

Review the serialization format for the 'user_profile' endpoint, ensuring all timestamps use RFC 3339 and monetary values are represented as embedded objects.

Frequently Asked Questions about governing-field-serialization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize API field serialization formats for timestamps and money?

Standardize API field serialization by enforcing RFC 3339 timestamps with _time suffix, ISO 8601 durations, and money as embedded objects to ensure unambiguous type representation across services.

What is the best way to enforce consistent field naming conventions in API payloads?

Enforce consistent field naming by applying snake_case to all fields with a camelCase alias escape hatch, ensuring interoperability and preventing ambiguity across API payloads.

How should binary data and enum strings be represented in JSON API responses?

Represent binary data and enum strings by encoding binaries as base64url and formatting enums as UPPER_SNAKE_CASE strings to maintain unambiguous API payload standards.

When do I need opaque string identifiers in API data formats?

Use opaque string identifiers in API data formats when you need to prevent precision loss and ambiguity for ID fields across all serialized payloads.

Can I use camelCase for field naming while maintaining snake_case standards?

Yes, you can use camelCase as an alias while maintaining snake_case as the primary field naming standard, providing an escape hatch for interoperability with systems requiring camelCase.

Why do array fields need plural naming in API serialization?

Array fields need plural naming in API serialization to enforce consistent type representations and naming conventions, making array structures immediately recognizable across all payloads.