cg-enum-standards

Audits and enforces cross-language enum standards for Go, TypeScript, PHP, and Rust codebases.

Updated May 16, 2026
One-click install
npx skills add https://github.com/alimtvnetwork/img-pdf-v2 --skill cg-enum-standards-alimtvnetwork
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cg-enum-standards
Source: https://github.com/alimtvnetwork/img-pdf-v2/tree/main/.agents/skills/cg-enum-standards
Command: npx skills add https://github.com/alimtvnetwork/img-pdf-v2 --skill cg-enum-standards-alimtvnetwork

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams maintaining enums across multiple languages often end up with inconsistent naming, hand-edited generated files, and drift between language implementations. This Skill audits enum definitions against a single source of truth and enforces the repository's consolidated enum standards automatically. ## Core Features & Use Cases - Single Source of Truth Enforcement: Verifies enums are defined once in 02-spec/<module>/enums/<EnumName>.yaml rather than duplicated per language. - Generator Workflow Validation: Ensures enums for Go, TypeScript, PHP, and Rust are produced via 03-ai-scripts/30-enum-generator.py and that *_generated.* files are never hand-edited. - Naming and Derive Checks: Confirms PascalCase naming, Type suffixes on PHP enums, and required Rust derives (Debug, Clone, PartialEq, Serialize, Deserialize). - Use Case: During a code review, run an audit to catch a developer who manually edited a generated TypeScript enum or added a PHP enum missing its Type suffix before it merges. ## Quick Start Audit the repository's enum definitions against the enum standards and report any violations in naming, generation workflow, or Rust derives.

Frequently Asked Questions about cg-enum-standards

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

FAQPage Schema
How do I keep enums consistent across Go, TypeScript, PHP, and Rust?

Define each enum once in a YAML spec file under 02-spec/<module>/enums/, then generate all language implementations with the enum generator script. This Skill audits the repository to confirm that workflow is followed and flags hand-edited generated files.

How to audit enum naming conventions in a multi-language repository?

Run an enum standards audit that checks PascalCase naming across all languages, verifies PHP enums carry a Type suffix, and confirms Rust enums derive Debug, Clone, PartialEq, Serialize, and Deserialize.

Can I hand-edit generated enum files?

No. Files matching *_generated.* must never be edited manually. All changes belong in the YAML source definition, followed by re-running the 30-enum-generator.py script to regenerate every language target.

What Rust derives are required for enums?

Rust enums must include Debug, Clone, PartialEq, Serialize, and Deserialize derives. The audit flags any generated or audited Rust enum missing one of these derives.

Where should enum definitions live in the repository?

Each enum is defined exactly once in 02-spec/<module>/enums/<EnumName>.yaml. That YAML file is the single source of truth from which Go, TypeScript, PHP, and Rust implementations are generated.