use-koruma
Installation
SKILL.md
Use Koruma
Follow the application workflow
- Inspect the application's
Cargo.toml, validated types, error consumers, and existing Koruma patterns. Preserve compatible dependency versions and feature choices. - Depend on
korumaas the facade. Addkoruma-collectionwhen a built-in rule matches the requirement. - Use a custom
#[validator]for domain-specific behavior, custom error data, or custom rendering. - Put every validator and modifier for a field in one
#[koruma(...)]attribute. Configure validators with dot-chain setters and deriveKorumaon the containing type. - Inspect failures through generated field and validator accessors. Add
KorumaAllDisplayfor displayable borrowed error variants orKorumaAllFluentfor es-fluent rendering. - Use
nestedfor a validated child object andnewtypefor transparent validation through an exactly-one-field wrapper. Selecttry_new,try_from, ortry_from_inneraccording to the caller-facing construction API. - Update dependency features, imports, validation attributes, and error handling together.