Parse dont validate
Agent skills, templates, examples, validators, and docs for operating Amadeus DLC, a lifecycle contract for AI driven software development.
npx -y skills add amadeus-dlc/amadeus --skill parse-dont-validateAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when replacing validation that discards information with parsing that returns a typed, validated value. Helps enforce invariants through the type system and reduce shotgun parsing. Trigger for validation refactors, type-safe inputs, invalid-state prevention, reducing `Maybe`/nullable checks, or converting validators into constructors/parsers.
SKILL.md
1.5 KB, 235 tokens by cl100k_base, as published. Nobody here has run it
Parse, Don't Validate
Do not merely check data and then throw the proof away. Parse it into a type that carries the proof.
Workflow
-
Find validators that return
bool,void, or throw while leaving the original untyped value in circulation. -
Define a target type whose construction proves the invariant.
-
Replace validation calls with parser or smart-constructor calls that return
Result,Either, option, or exceptions as appropriate for the language. -
Change downstream APIs to accept the parsed type.
-
Remove redundant re-validation.
Checks
-
A parsed type should make invalid states unrepresentable.
-
Keep boundary parsing near input edges.
-
Preserve error detail for users and logs.
Reference
Read references/patterns.md for language patterns.
Detailed Reference
For non-trivial implementation, review, or refactoring work, read references/details.md before giving final guidance. It contains the detailed rules, examples, smells, and migration notes that do not belong in the short invocation body.
Output
Return the current validation leak, parsed type design, API changes, and migration steps.
What ships with it: 2 files
1.3 KB alongside SKILL.md
references/
- details.md905 B
- patterns.md427 B