# Nuxt Enums

> TypeScript enum pattern with Castable interface for model integration. Use when creating enums with behavior methods (colors, labels), defining fixed value sets, or integrating enums with the model casting system.

- **Type:** Skill
- **Install:** `agentstack add skill-leeovery-agentic-skills-nuxt-enums`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [leeovery](https://agentstack.voostack.com/s/leeovery)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [leeovery](https://github.com/leeovery)
- **Source:** https://github.com/leeovery/agentic-skills/tree/main/nuxt/skills/nuxt-enums

## Install

```sh
agentstack add skill-leeovery-agentic-skills-nuxt-enums
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Nuxt Enums

Class-based enums with behavior methods and model casting integration.

## Core Concepts

**[enums.md](references/enums.md)** - Complete enum patterns, behavior methods, UI integration

## Basic Enum

```typescript
// app/enums/PostStatus.ts
import Enum from '#layers/base/app/enums/Enum'
import type { Castable } from '#layers/base/app/types'

export default class PostStatus extends Enum implements Castable {
  // Static enum values
  static readonly Draft = PostStatus.create('draft')
  static readonly PendingReview = PostStatus.create('pending review')
  static readonly Published = PostStatus.create('published')
  static readonly Archived = PostStatus.create('archived')

  // Cast method for model system
  static cast(value: string): PostStatus {
    return PostStatus.coerce(value)
  }

  // Behavior methods
  color(): string {
    switch (this.value) {
      case 'draft': return 'neutral'
      case 'pending review': return 'warning'
      case 'published': return 'success'
      case 'archived': return 'error'
      default: return 'neutral'
    }
  }

  get text(): string {
    return this.value
  }
}
```

## Usage

```typescript
// In models (auto-cast from API string)
status: PostStatus

// Comparisons
post.status.is(PostStatus.Published)

// Get all values
PostStatus.values()

// In templates
{{ post.status.text }}
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [leeovery](https://github.com/leeovery)
- **Source:** [leeovery/agentic-skills](https://github.com/leeovery/agentic-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-leeovery-agentic-skills-nuxt-enums
- Seller: https://agentstack.voostack.com/s/leeovery
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
