adonisjs-enums

Create string-backed enums with labels and metadata for AdonisJS projects.

2|1|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/omakei/adonisjs-architecture-skill --skill adonisjs-enums
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adonisjs-enums
Source: https://github.com/omakei/adonisjs-architecture-skill/tree/main/adonisjs/skills/adonisjs-enums
Command: npx skills add https://github.com/omakei/adonisjs-architecture-skill --skill adonisjs-enums

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Standardize and type-safely represent finite value sets across AdonisJS projects.

Core Features & Use Cases

  • String-backed enums for models, validators, and data transfer objects
  • Labels, metadata, and domain behaviour attached to enum values
  • Seamless usage in Lucid migrations, VineJS validators, and DTOs

Quick Start

Create a new app/enums/order_status.ts enum and start using OrderStatus across models and validators.

Frequently Asked Questions about adonisjs-enums

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

FAQPage Schema
How do I define type-safe string enums in an AdonisJS project?

Type-safe string enums in an AdonisJS project are defined by creating a TypeScript enum file that attaches labels, metadata, and domain behaviour to finite value sets for seamless runtime integration across Lucid and VineJS.

Can I use string-backed enums with both Lucid models and VineJS validators?

Yes, string-backed enums work seamlessly with both Lucid models and VineJS validators, allowing you to standardize finite value sets and represent fixed options safely across data transfer objects and domain actions.

What is the best way to attach metadata and labels to enum values in TypeScript?

Attaching metadata and labels to enum values in TypeScript is handled by structuring string-backed enums that encapsulate domain behaviour, enabling standardized representation of fixed options across your application layers.

Do I need TypeScript string enums for AdonisJS data transfer objects and actions?

Using TypeScript string enums for AdonisJS data transfer objects and actions is needed when you want to type-safely represent finite value sets, ensuring fixed options remain standardized and validated across models and validators.

When should I use standardized string enums instead of raw string constants in AdonisJS?

Standardized string enums should be used instead of raw string constants when your AdonisJS project requires type-safe finite value sets with attached metadata, labels, and runtime integration with Lucid migrations and VineJS validators.