Bỏ qua tới nội dung
TakoAPI
Quay lại kỹ năng

materials-cli

bởi cai-zhuo

DevOps & Cloud
573Lượt tải do clawskills.sh công bố
0Lượt xem
0 lượt thíchĐăng nhập để thích kỹ năng này
—Chưa có đánh giá
Đánh giá của bạn

Tóm tắt

Render JSON schemas to images and generate schemas from prompts using declare-render and AI.

Mô tả

Kỹ năng này làm gì

Materials CLI renders JSON schemas to PNG or JPG images, validates schemas against the declare-render format, and generates schemas from natural-language prompts using OpenAI. It exposes three subcommands: render, generate, and validate.

Combines schema validation, AI-driven schema generation, and image rendering in one CLI, avoiding the need to wire together separate utilities.

Khi nào nên dùng

  • Render a JSON layout schema to a PNG for design review
  • Generate an image from a text description using OpenAI
  • Validate a declare-render schema before passing it to a pipeline
  • Export layered JSON compositions to JPG files
  • Prototype visual layouts from natural language without writing schema by hand

Quy trình ví dụ

ĐẦU VÀO

User asks: Generate an image of a blue rectangle with the text 'Hello World' and save it as hello.png

AGENT
  1. 1

    Run materials generate "A blue rectangle with text Hello World" -o hello.png

  2. 2

    CLI sends the prompt to OpenAI, which returns a declare-render JSON schema

  3. 3

    Schema is validated against the declare-render format

  4. 4

    CLI renders the schema layers to hello.png

ĐẦU RA

hello.png written to disk containing the rendered blue rectangle with 'Hello World' text

Yêu cầu

  • OPENAI_API_KEY environment variable, obtained from an OpenAI account

Cài đặt

clawhub install cai-zhuo/materials-cli

Chạy lệnh CLI, hoặc dán prompt vào Claude Code, Cursor, Codex hay coding agent bạn đang dùng.

Liên kết