go-create-enum
CommunityCreate type-safe Go enums with validation
Authorcristiano-pacheco
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Go projects often need type-safe enums with strict validation, a reusable constructor, and a consistent String method across modules. This skill standardizes a maintainable enum pattern to reduce boilerplate and ensure correctness in internal/modules/<module>/enum/.
Core Features & Use Cases
- Generated file structure: internal/modules/<module>/enum/<name>_enum.go containing constants, a validation map, an enum type, a constructor, a String method, and a private validator.
- Validation integration: uses a central errs package to surface invalid values with clear errors.
- Reusability and consistency: enforces a uniform enum pattern across different modules and services.
Quick Start
Provide the enum name and its value list; the tool will generate a complete, validated Go enum in internal/modules/<module>/enum.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: go-create-enum Download link: https://github.com/cristiano-pacheco/ai-rules/archive/main.zip#go-create-enum Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.