Install
openclaw skills install test-materialsRender JSON schemas to images and generate schemas from prompts using declare-render and AI.
openclaw skills install test-materialsUse this skill when the user wants to render JSON schemas to images (PNG/JPG), validate render-data schemas, or generate schemas from natural-language prompts and then render them.
Run via Node (from the project or after npm install -g materials-cli):
materials render <schema-path> [options]
materials generate "<prompt>" [options]
materials validate <schema-path> [options]
materials render schema.json -o output.png-s, --schema <path>, -o, --output <path> (default ./output.png), -f, --format <png|jpg>, -w, --width, -h, --height, --output-schema <path>, -i, --interactivematerials generate "A red circle with text Hello" -o out.png-o, --output, -f, --format, -w, --width, -h, --height, --output-schema, --model, --api-key, --base-url, -i, --interactiveOPENAI_API_KEY (and optionally OPENAI_MODEL, OPENAI_BASE_URL) if not passed via flags.materials validate schema.json-s, --schema <path>, -i, --interactiveUsage: materials <command> [options]
Commands:
render <schema> Render a JSON schema file to an image
generate <prompt> Use AI to generate a schema, then render
validate <schema> Validate a schema against the render data schema
Examples:
materials render schema.json -o output.png
materials generate "A red circle with text Hello"
materials validate schema.json
The JSON schema follows the declare-render format: root has id, width, height, and layers. Layer types include text, image, container, shape, etc. Use materials validate <file> to check a schema before rendering.