openai/codex · error · SkillParseError
missing field `{0}`
Error message
missing field `{0}` What it means
Error "missing field `{0}`" thrown in openai/codex.
Source
Thrown at codex-rs/skills/src/parser.rs:37
short_description: Option<String>,
}
/// Validated metadata parsed from a `SKILL.md` frontmatter block.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ParsedSkillFrontmatter {
pub name: String,
pub description: String,
pub short_description: Option<String>,
}
/// Error produced while parsing or validating `SKILL.md` metadata.
#[derive(Debug, Error)]
pub enum SkillParseError {
#[error("missing YAML frontmatter delimited by ---")]
MissingFrontmatter,
#[error("invalid YAML: {0}")]
InvalidYaml(#[source] serde_yaml::Error),
#[error("missing field `{0}`")]
MissingField(&'static str),
#[error("invalid {field}: {reason}")]
InvalidField { field: &'static str, reason: String },
}
/// Parses and validates the metadata frontmatter from `SKILL.md` contents.
pub fn parse_skill_frontmatter_metadata(
contents: &str,
default_name: impl FnOnce() -> String,
) -> Result<ParsedSkillFrontmatter, SkillParseError> {
let frontmatter = extract_frontmatter(contents).ok_or(SkillParseError::MissingFrontmatter)?;
let parsed: SkillFrontmatter = match serde_yaml::from_str(&frontmatter) {
Ok(parsed) => Ok(parsed),
Err(original_error) => match repair_frontmatter_scalar_fields(&frontmatter) {
// Some third-party skills use prose like `description: Build for AWS: ECS`
// or `argument-hint: <duration: e.g. 7d>`. Keep the repair line-oriented
// so unrelated invalid YAML still surfaces.View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/skills/src/parser.rs:37 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/238093cbd8da891c.
Report an issue: GitHub.