build/skills/validate/SKILL.md
MUST be invoked before any work involving: charly box validate command, validation rules, common validation errors, or checking charly.yml and layer definitions.
npx skillsauth add overthinkos/overthink-plugins validateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Invoked as charly box validate. See /charly-image:image for the family overview.
charly box validate checks charly.yml and all layer definitions for errors. Validation collects all errors at once rather than failing on the first.
| Action | Command | Description |
|--------|---------|-------------|
| Validate all | charly box validate | Check charly.yml + all layers (enabled images only) |
| Validate disabled too | charly box validate --include-disabled | Extend the validation pass to images marked enabled: false (does not modify charly.yml) |
| Check version | charly version | Verify CalVer computation |
| Inspect image | charly box inspect <image> | Show resolved config |
| Code | Meaning | |------|---------| | 0 | Validation passed | | 1 | Validation or user error | | 2 | Internal error |
charly.yml with a non-empty task: list or a rpm: / deb: / pac: / aur: packages section; an auto-detected builder manifest (pixi.toml, pyproject.toml, environment.yml, package.json, Cargo.toml); or a candy: composition field (pure composition layers are valid).description: (a non-empty feature: + at least one scenario:) AND a non-empty eval: list (enforced by validateCandyContents; a hard error names the missing field). A fetched remote candy is exempt — its compliance is its own repo's concern, same scope as the mandatory version: rule. See /charly-eval:eval.depends must reference existing layers (local or remote).volumes names must match ^[a-z0-9]+(-[a-z0-9]+)*$.aliases in charly.yml require both name and command.^[a-zA-Z0-9][a-zA-Z0-9._-]*$.PATH directly in env is an error (use path_append).pixi.toml, pyproject.toml, or environment.yml).task: RulesSee /charly-image:layer for the full verb catalog. The validator enforces:
cmd / mkdir / copy / write / link / download / setcap / build. Zero verbs → "task has no action"; multiple → "task has conflicting actions: X and Y".copy → to: (destination) required; copy: value must be relative to the layer directory, no .. traversalwrite → content: required (non-empty)link → target: required (what the symlink points to)download → to: required unless extract: sh (piped install scripts)setcap with non-empty caps: → caps pattern check (cap_name=flags[,cap_name=flags])~/-prefixed, or ${HOME}-prefixed. copy: source must exist under the layer directory at generate time.mode: must match ^0[0-7]{3,4}$ (octal) if present.tar.gz / tar.xz / tar.zst / zip / none / sh or empty.cache: rules: only valid on cmd: / download: tasks; each path must be absolute (or ~/ / ${HOME}-prefixed). Declares extra BuildKit cache mounts (owned per the task user:).build: value: must be "all" (initial implementation; specific builder names reserved for future use).user: format: must be root, ${USER}, a literal name matching ^[a-z_][a-z0-9_-]*$, or numeric <uid>:<gid>. Unresolved ${VAR} in user: errors.var: Rules^[A-Z_][A-Z0-9_]*$ (shell identifier).USER, UID, GID, HOME, ARCH, BUILD_ARCH).env: keys.${VAR} Reference Resolutionto, target, etc.), every ${NAME} reference must resolve against var: ∪ auto-exports. Unresolved references error at validate time.cmd: values, write: content:), references are passed through verbatim and resolved by bash at build time.base must reference a valid external image or another image in charly.ymllayers field is requiredbuilder must reference an existing imagebootc: true requires appropriate base imagecommand defaults to name if omittedenv accepts list of KEY=VALUE strings (runtime only)env_file accepts a path string (validated at runtime)security at image level overrides layer-level security (not an error)name and path required, name must match volume name regexhost must be empty; Plain: host requiredgocryptfs not in PATH when encrypted mounts existfqdn requiredbootc: true requires appropriate base imagevm.rootfs must be ext4, xfs, or btrfsvm.backend must be auto, libvirt, or qemuport:ports must be "all" or omittedports: all, the image must have at least one port definedtcp: prefix is supported@github ref) referenced via two different git tags is not
an error — the git tag is only the FETCH coordinate. The resolver reads each
fetched layer's OWN version: and dedups by it: same per-entity version → no
warning (a re-tag of an unchanged layer is silent); different per-entity
versions → warns once and resolves to the newest (highest CalVer). Run
charly box reconcile to align the pins and clear any warning. A fetched layer
with no version: IS a hard error (the layer kind requires one).base:/builder: chains are fetched. See /charly-internals:go
"Remote-layer resolver" and /charly-build:reconcile.Layers form a dependency cycle. Check depends fields.
A depends entry or charly.yml layer references a non-existent layer.
Use path_append in charly.yml instead of env: PATH: ....
Volume names must be unique within a candy.
charly box validate && charly box build my-image
charly box validate 2>&1 # See all errors at once
charly box inspect <image> # Check resolved config
charly box list candies # Verify layer exists
charly box validate resolves charly.yml via os.Getwd(). Override with -C <dir> / --dir <dir> / CHARLY_PROJECT_DIR=<dir>. See /charly-image:image "Project directory resolution".
charly box family siblings/charly-image:image -- Family overview + charly.yml composition reference/charly-build:build -- Building validated images/charly-build:generate -- Containerfile generation after validation/charly-build:inspect -- Inspect a specific image after validation/charly-build:list -- Enumerate images/layers to validate/charly-build:merge -- Post-build layer consolidation/charly-build:new -- Scaffold new candies before validation/charly-build:pull -- Pull prebuilt images (orthogonal to validation)/charly-image:layer — Canonical reference for the task verb catalog, var: substitution, YAML anchors, execution order. The validator rules above enforce what's documented there./charly-build:generate — What the generator emits from validated input (per-verb emitters, cache-mount inheritance, inline-content staging)./charly-internals:generate-source — Internal architecture of the task emission pipeline./charly-eval:eval — charly box validate schema-checks every eval: entry: exactly-one-verb, attribute types, scope/variable consistency (build-scope can't reference runtime-only vars), id: uniqueness per section, matcher operator allowlist, unroutable-check rejection. The five live-container verbs (cdp/wl/dbus/vnc/mcp) also get per-verb method-allowlist + required-modifier enforcement via validateCharlyVerb (deploy-scope-only; unknown methods rejected with the allowed set listed)./charly-build:charly-mcp-cmd — the standalone reference for the mcp: verb: required modifiers (tool: for call, uri: for read), the 7-method allowlist, and the URL-rewrite / port-publishing behavior that authors occasionally hit./charly-eval:cdp, /charly-eval:wl, /charly-eval:dbus, /charly-eval:vnc — per-verb references for the other four live-container verbs.charly box validate does NOT enforce global name uniqueness across kinds. The same name MAY exist simultaneously as a layer (candy/<name>/), a box: entry, a pod: entry, a vm: entry, a k8s: entry, a local: entry, AND a deploy: entry. Uniqueness is scoped to each kind. Do not write a validator that flags box.foo + vm.foo as ambiguous — verbs disambiguate by command context. The loader raises hard load-time errors on: (a) the obsolete deploy.qc / deploy.cachyos-dx keys; (b) any obsolete kind: deployment doc or root-key deployment: (the deploy kind is kind: deploy). Every such error points at charly migrate. See CLAUDE.md "Cross-kind name reuse is permitted and encouraged" and /charly-build:migrate.
MUST be invoked when the task involves charly box validate command, validation rules, common validation errors, or checking charly.yml and layer definitions. Invoke this skill BEFORE reading source code or launching Explore agents.
Workflow position: Pre-build. Validate before building to catch errors early.
tools
OpenCharly CLI (charly) binary installed into container/VM images for in-container use. Use when working with charly binary deployment inside containers, native D-Bus support, or the full charly toolchain (charly binary + virtualization + gocryptfs + socat).
development
Operator CachyOS workstation profile — a kind:local template + target:local deploy that installs the full dev stack (30 candies) onto a CachyOS host via ShellExecutor. Lives in the overthinkos/cachyos submodule. MUST be invoked before editing or applying the charly-cachyos workstation profile.
tools
Fedora box with the full charly toolchain using shared candies. Rootless-first — runs as uid=1000 with passwordless sudo (no root, no cap_add: ALL). Same candy list as charly-arch. Includes NVIDIA GPU runtime. MUST be invoked before building, deploying, configuring, or troubleshooting the charly-fedora box.
tools
Arch Linux box with the full charly toolchain. Rootless-first — runs as uid=1000 with passwordless sudo (no root, no cap_add: ALL). Composes /charly-coder:charly-mcp so the box is reachable as an MCP gateway on port 18765. NVIDIA GPU runtime composed in. MUST be invoked before building, deploying, configuring, or troubleshooting the charly-arch box.