Type Design Analyzer for ChatGPT: Identify Invalid States in Data Types
Review supplied type definitions against domain rules. Identify invalid combinations and propose a clearer representation with examples of compile-time and runtime checks.
中文Install in ChatGPT
Use an eligible ChatGPT workspace with permission to create skills and, for uploads, upload permission. The installation path for this text-only adaptation was checked against OpenAI documentation. Workspace runtime verification is pending.
- Download skills/type-design-analyzer/SKILL.md from the pinned GitHub source. Keep the name, description, and instructions for type-design-analyzer together as a standalone text skill.
- In a ChatGPT workspace with skills and uploads enabled, open Plugins, Skills, Create, and Upload from your computer. Choose a skill package format accepted by the file picker. You can also choose Create with editor and enter the original name, description, and instructions.
- After the scan completes, check that type-design-analyzer appears in Installed. Type @ in a new chat, select the skill, and use the fictional example on this page to check the output.
Example task
A fictional loan record has `open` and `returned` statuses and an optional `returnedAt`. Only a returned record should have a return time. Review the current structure and suggest an alternative.What to check
Show that the optional field allows `returned` without a date and `open` with one. Suggest a status-based union and retain runtime validation for external input.
Original SKILL.md on GitHub · Updated
Frequently asked question
Can all business rules be encoded in types?
Mutual exclusion, field presence, and finite states often fit. Temporal ordering and authenticity of external input typically need runtime checks.