cue

Create, validate, test, and debug CUE configuration files and schemas.

5|Updated Sep 9, 2017
One-click install
npx skills add https://github.com/hpcsc/dotfiles --skill cue-hpcsc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cue
Source: https://github.com/hpcsc/dotfiles/tree/main/link/common/claude/.claude/skills/cue
Command: npx skills add https://github.com/hpcsc/dotfiles --skill cue-hpcsc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing and maintaining CUE configurations is error-prone because unification can silently produce false positives, and validation failures are hard to diagnose without structured guidance on schemas, constraints, and testing patterns. ## Core Features & Use Cases - Schema and Configuration Authoring: Applies patterns for definitions, constraints, hidden fields, unification, and list comprehensions when writing CUE files. - Validation and Debugging: Uses commands like cue vet, cue eval, and cue export to validate files, troubleshoot errors, and verify generated YAML/JSON output. - Test-First Workflow: Enforces a critical rule that tests must be verified to detect failures, avoiding false positives caused by CUE's unification behavior. - Use Case: When building a Kubernetes or infrastructure configuration in CUE, use this Skill to write a failing validation test first, implement the schema incrementally, and export verified YAML output. ## Quick Start Use the cue skill to create a validated CUE schema for my deployment configuration and verify it with cue vet.

Frequently Asked Questions about cue

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

FAQPage Schema
How do I validate CUE configuration files?▼

Run cue vet on your CUE files to validate them against their constraints and definitions. Use cue eval to inspect evaluated output and cue export with --out yaml or json to generate final configuration artifacts.

How to write tests for CUE schemas?▼

Write tests against observable outputs rather than hidden fields, and always verify the test can fail. For new code, write a failing test first, confirm cue vet fails, then implement until it passes.

Why does my CUE test pass when it should fail?▼

CUE's unification merges compatible values automatically, which can create false positives where invalid configurations still validate. Break the code intentionally and rerun cue vet to confirm your test actually detects the failure.

What are hidden fields in CUE configuration?▼

Hidden fields are prefixed with an underscore, such as _name, and hold internal values excluded from exported output. Definitions prefixed with #, like #Name, declare schemas and types used for validation.

What are common CUE configuration mistakes to avoid?▼

Common pitfalls include field name collisions in nested definitions, testing hidden fields that have defaults, skipping test verification, and using hardcoded array indices. Reading existing CUE files first helps match established patterns.