zeroclaw-labs/zeroclaw · error · anyhow::Error

reflected SKILL.md has an empty body

Error message

reflected SKILL.md has an empty body

What it means

Error "reflected SKILL.md has an empty body" thrown in zeroclaw-labs/zeroclaw.

Source

Thrown at crates/zeroclaw-runtime/src/skills/creator.rs:279

            if out.len() >= budget {
                let _ = writeln!(out, "…[{} more tool call(s) omitted]", tool_calls.len() - i);
                break;
            }
            let name = scrub_secrets(&call.name);
            let args = truncate_chars(
                &scrub_secrets(&serde_json::to_string(&call.args).unwrap_or_default()),
                MAX_TOOL_ARG_CHARS,
            );
            let _ = writeln!(out, "{}. {} {}", i + 1, name, args);
        }
        out
    }

    fn normalize_reflected_md(slug: &str, raw: &str) -> Result<String> {
        let content = extract_frontmatter_block(raw);
        let mut doc = SkillDocument::parse(&content).context("reflected SKILL.md is invalid")?;
        if doc.body.trim().is_empty() {
            anyhow::bail!("reflected SKILL.md has an empty body");
        }
        // Deterministic identity + auto-generated markers.
        doc.frontmatter.name = slug.to_string();
        doc.frontmatter.author = Some("zeroclaw-auto".to_string());
        if doc.frontmatter.version.is_none() {
            doc.frontmatter.version = Some("0.1.0".to_string());
        }
        Ok(doc.serialize())
    }

    /// Generate a URL-safe slug from a task description.
    /// Alphanumeric and hyphens only, max 64 characters.
    fn generate_slug(description: &str) -> String {
        let slug: String = description
            .to_lowercase()
            .chars()
            .map(|c| if c.is_alphanumeric() { c } else { '-' })
            .collect();

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Add body content to the reflected SKILL.md below its frontmatter.

When it happens

Trigger: Thrown at crates/zeroclaw-runtime/src/skills/creator.rs:279 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/7d758aa1ef13f262. Report an issue: GitHub.