compact-enum-mappings
Installation
SKILL.md
Compact Enum & Short-Code Mapping Protocol
Overview
In automated data extraction, log classification, and batch API workflows, models frequently output structured JSON containing long descriptive string identifiers ("transaction_status": "PAYMENT_AUTHORIZATION_PENDING_FRAUD_REVIEW" or "log_severity": "INFRASTRUCTURE_CRITICAL_FAILURE").
Verbose string constants consume 8 to 15 tokens per record. In a batch processing run of 5,000 items, transmitting repetitive string identifiers burns over 60,000 redundant output tokens.
The Compact Enum Mapping Protocol defines a lightweight integer or 1-character codebook in the prompt header, allowing the model to emit 1-token codes (0, 1, 2) that downstream application code deserializes into rich, strongly-typed domain objects.