skill-creator: quick_validate accepts invalid types for optional frontmatter fields
Summary
The bundled Skill Creator validator accepts invalid YAML types for optional frontmatter fields. It checks whether optional keys are in an allowlist, but does not validate the types or structure of their values.
This can allow malformed skill metadata to pass with exit code 0.
Affected source
Current openai/codex main was inspected at 9baf9789e1b0db1d12080020017b73311950723e.
Validator optional-field allowlist and checks.
The code rejects unknown top-level keys, but after that it validates only the required name and description types. Optional fields are not type-checked.
Reproduction
Use a valid required-field baseline and add one invalid optional value at a time.
Numeric license
---
name: paper-trail
description: A valid skill description.
license: 17
---
Instructions.
Actual: exit 0, Skill is valid!.
Expected: reject because license is a string field.
List-valued allowed-tools
---
name: paper-trail
description: A valid skill description.
allowed-tools: [Read, Write]
---
Instructions.
Actual: exit 0, Skill is valid!.
Expected: reject because allowed-tools is a space-separated string.
Scalar metadata
---
name: paper-trail
description: A valid skill description.
metadata: nope
---
Instructions.
Actual: exit 0, Skill is valid!.
Expected: reject because metadata must be a mapping.
Non-string metadata value
---
name: paper-trail
description: A valid skill description.
metadata:
version: 3
---
Instructions.
Actual: exit 0, Skill is valid!.
Expected: reject because metadata is a map from string keys to string values.
Specification
The Agent Skills specification defines:
licenseas a license name or reference (string);allowed-toolsas a space-separated string;metadataas a mapping from string keys to string values.
Source: Agent Skills specification.
The optional compatibility field is separately rejected altogether because it is missing from the allowlist. That distinct defect is already tracked in #58538.
Expected behaviour
Validate each optional field according to its declared type and structure. Reject malformed values with a field-specific diagnostic and non-zero exit code. Preserve valid optional metadata and existing required-field checks.
Validation
All four cases were executed against the current source snapshot in temporary directories. Each invalid optional value returned exit 0 and Skill is valid!.
The tests used Python 3.13.5 and PyYAML 6.0.3. No repository or installed skill files were modified. Full Codex build and CI were not run.