搜索

PythonReactSEOPDF
OpenClaw

materials-workbench

Materials editor workbench — React UI and Express server to render JSON schemas to images and generate schemas with AI (declare-render + materials-agents).

cai-zhuo0 来源安装数☆ 0 仓库 Starsv1.0.0

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install cai-zhuo/materials-workbench

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Materials Workbench

Use this skill when the user wants to run the materials editor workbench: a local web app with a React client and Express server that renders JSON schemas to images (declare-render) and can generate or edit schemas using AI (materials-agents).

What it is

  • Client — React + Vite app for editing and previewing render schemas.
  • Server — Express API that renders schemas to PNG/JPG and uses materials-agents (OpenAI) for schema generation or refinement.

When to use

  • User wants to "run the workbench", "start the materials editor", or "open the schema editor UI".
  • User needs a local dev environment for rendering schemas and AI-assisted schema creation.

Run

From the workbench root:

pnpm install
pnpm run install:all   # install root, server, and client deps
pnpm run dev           # start server + client (concurrently)

Set OPENAI_API_KEY for AI/generate features.

Project layout

  • client/ — React frontend (Vite).
  • server/ — Express backend (declare-render, materials-agents, canvas).

Schema format

Same as materials-cli: declare-render format with id, width, height, layers (text, image, container, shape, etc.).

来源信息

Source
github
Repository
openclaw/skills
Path
skills/cai-zhuo/materials-workbench
Version
1.0.0
Commit
3d67ed71b9c8866933bbb1e54bd7df70c2246c15
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

Workbench

A web app to create and edit canvas images by conversing with an AI agent. Upload materials (e.g. images), chat to generate or modify a declarative canvas (RenderData), preview and edit JSON, and download the result.

Setup

  1. Install dependencies from the workbench root:

    cd workbench
    pnpm install
    cd server && pnpm install && cd ..
    cd client && pnpm install && cd ..
    
  2. Create server/.env with your API configuration:

    # Edit server/.env and set:
    # OPENAI_API_KEY=your-key
    # OPENAI_BASE_URL=https://api.hunyuan.cloud.tencent.com/v1  # Optional, for custom endpoints
    # OPENAI_MODEL=hunyuan-lite  # Optional, defaults to gpt-4o
    # PICUI_TOKEN=your-token     # Optional, for image uploads. Get from https://picui.cn personal center
    

Run

From the workbench directory:

pnpm dev

Usage

  1. Use the left panel to chat: type messages and optionally attach images (materials). Images are sent as base64 in the message; the server uploads them to PICUI and passes URLs to the agent. Set PICUI_TOKEN in server/.env to enable uploads. The agent returns updated canvas JSON (RenderData) when it produces or changes a design.
  2. Use the right panel tabs:
    • Preview: view the current rendered image and click Download to save it.
    • JSON: edit the RenderData and click Apply to re-render and update the preview.
  3. Continue the conversation to refine the result; the agent can update the canvas based on your feedback.

来源内容

SKILL.md
# Materials Workbench

Use this skill when the user wants to run the materials editor workbench: a local web app with a React client and Express server that renders JSON schemas to images (declare-render) and can generate or edit schemas using AI (materials-agents).

## What it is

- **Client** — React + Vite app for editing and previewing render schemas.
- **Server** — Express API that renders schemas to PNG/JPG and uses materials-agents (OpenAI) for schema generation or refinement.

## When to use

- User wants to "run the workbench", "start the materials editor", or "open the schema editor UI".
- User needs a local dev environment for rendering schemas and AI-assisted schema creation.

## Run

From the workbench root:

```bash
pnpm install
pnpm run install:all   # install root, server, and client deps
pnpm run dev           # start server + client (concurrently)
```

- Client usually: http://localhost:5173
- Server usually: http://localhost:3000 (or port in server config)

Set `OPENAI_API_KEY` for AI/generate features.

## Project layout

- `client/` — React frontend (Vite).
- `server/` — Express backend (declare-render, materials-agents, canvas).

## Schema format

Same as materials-cli: declare-render format with `id`, `width`, `height`, `layers` (text, image, container, shape, etc.).
README
# Workbench

A web app to create and edit canvas images by conversing with an AI agent. Upload materials (e.g. images), chat to generate or modify a declarative canvas (RenderData), preview and edit JSON, and download the result.

## Setup

1. Install dependencies from the workbench root:

   ```bash
   cd workbench
   pnpm install
   cd server && pnpm install && cd ..
   cd client && pnpm install && cd ..
   ```

2. Create `server/.env` with your API configuration:

   ```bash
   # Edit server/.env and set:
   # OPENAI_API_KEY=your-key
   # OPENAI_BASE_URL=https://api.hunyuan.cloud.tencent.com/v1  # Optional, for custom endpoints
   # OPENAI_MODEL=hunyuan-lite  # Optional, defaults to gpt-4o
   # PICUI_TOKEN=your-token     # Optional, for image uploads. Get from https://picui.cn personal center
   ```

## Run

From the workbench directory:

```bash
pnpm dev
```

- **Server** runs at http://localhost:3001 (API: `/api/chat`).
- **Client** renders canvas in the browser (no server-side rendering).
- **Client** runs at http://localhost:5173 with Vite proxy so `/api` requests go to the server.

## Usage

1. Use the **left panel** to chat: type messages and optionally attach images (materials). Images are sent as base64 in the message; the server uploads them to [PICUI](https://picui.cn) and passes URLs to the agent. Set `PICUI_TOKEN` in `server/.env` to enable uploads. The agent returns updated canvas JSON (RenderData) when it produces or changes a design.
2. Use the **right panel** tabs:
   - **Preview**: view the current rendered image and click **Download** to save it.
   - **JSON**: edit the RenderData and click **Apply** to re-render and update the preview.
3. Continue the conversation to refine the result; the agent can update the canvas based on your feedback.

相关技能

OpenClaw

captchas-openclaw

captchasco

OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.

OpenClaw

x402hub

capncoconut

Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay,...

OpenClaw

Modelready

carol-gutianle

name: modelready description: Start using a local or Hugging Face model instantly, directly from chat. metadata: {"openclaw":{"requires":{"bins": "bash", "curl" }, "env": "URL" }}