← 返回 Skills 市场
openlark

Web UI Builder

作者 OpenLark · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
42
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install web-ui-builder
功能描述
Generate complete frontend page code using React 19 + Vite 8 + Tailwind CSS 4 + lucide-react from UI descriptions or images. Outputs project structure, compo...
使用说明 (SKILL.md)

Web UI Builder

Automatically generate complete frontend page code from visual descriptions or image references. Fixed tech stack: React 19 + Vite 8 + Tailwind CSS 4 + lucide-react.

Tech Stack

Technology Version Purpose
React 19+ UI framework
Vite 8+ Build tool
Tailwind CSS 4+ Styling (CSS-driven, no tailwind.config.js)
lucide-react 1.17+ Icon library
@vitejs/plugin-react latest Vite React plugin

Tailwind CSS 4 Notes

Tailwind CSS 4 uses CSS-driven configuration, no tailwind.config.js or postcss.config.js needed:

/* src/index.css — replaces tailwind.config.js + postcss */
@import "tailwindcss";

/* Custom theme colors */
@theme {
  --color-brand-50: #eef2ff;
  --color-brand-100: #e0e7ff;
  --color-brand-500: #6366f1;
  --color-brand-600: #4f46e5;
  --color-brand-700: #4338ca;
}

/* Custom component classes */
@layer components {
  .card { @apply rounded-xl bg-white p-6 shadow-sm border border-gray-100; }
  .btn-primary { @apply rounded-lg bg-brand-600 px-4 py-2.5 text-sm font-medium text-white hover:bg-brand-700 transition-colors; }
}

Key changes:

  • @tailwind base/components/utilities@import "tailwindcss"
  • Custom themes use @theme directive instead of tailwind.config.js theme.extend
  • Custom components use @layer components
  • No postcss.config.js needed (handled by Vite)
  • No tailwind.config.js content configuration needed

package.json Dependencies

{
  "dependencies": {
    "react": "^19.0.0",
    "react-dom": "^19.0.0",
    "lucide-react": "^1.17.0"
  },
  "devDependencies": {
    "@vitejs/plugin-react": "^latest",
    "tailwindcss": "^4.0.0",
    "vite": "^8.0.0"
  }
}

Project Structure

project/
├── package.json
├── vite.config.js
├── index.html
└── src/
    ├── main.jsx          # React entry point
    ├── index.css         # @import "tailwindcss" + @theme customization
    ├── App.jsx           # Root component
    ├── LoginPage.jsx     # (on demand) Login page
    ├── DashboardPage.jsx # (on demand) Dashboard
    ├── Sidebar.jsx       # (on demand) Sidebar
    ├── Header.jsx        # (on demand) Header
    └── ...               # (on demand) Other components

vite.config.js

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
  plugins: [react()],
})

Workflow

User input (description/image) → Extract functional modules → Compose skeleton + content modules → Generate files → Return directory + start command

Component-Driven Strategy

Instead of predefined page types, identify functional modules from user descriptions and compose them on demand:

Skeleton Components (generated as needed)

Component Use Case
TopNav Page top navigation (links/brand/search/user menu)
Sidebar Side menu (icons+labels/hierarchy/user info)
Header Content area top bar (title/breadcrumbs/actions/notifications)
Footer Page footer (links/copyright/social)

Content Modules (generated as needed)

Module Detection Keywords
HeroBanner "banner/hero/welcome/featured"
FormSection "form/input/register/login/feedback"
StatsCards "statistics/metrics/KPI/overview"
DataTable "table/list/data rows/records"
CardGrid "cards/grid/gallery/showcase"
ChartSection "chart/trend/distribution/visualization"
Timeline "timeline/progress/flow/steps"
Modal "modal/dialog/confirmation"
Tabs "tabs/switch/categories"
SearchBar "search/filter/filtering"

Planning Method

  1. Extract functional keywords from user description → match corresponding modules
  2. Arrange modules in layout order (top to bottom, left to right)
  3. Generate individual component files for each module
  4. Main page component composes all modules

Examples:

  • "A dashboard with sidebar, stats cards, and a data table" → Sidebar + StatsCards + DataTable
  • "A login page with email/password inputs and gradient background" → FormSection(login) + background decoration
  • "A product showcase with top nav and card grid" → TopNav + CardGrid + Footer

Generation Guidelines

Style Conventions

  • All Tailwind CSS 4 utility classes, customize palette via @theme in index.css
  • Default theme: indigo/violet
  • Border radius: cards rounded-xl, buttons rounded-lg, inputs rounded-lg
  • Shadows: cards shadow-sm
  • Icons: all from lucide-react

Code Standards

  • Functional components, JSX syntax
  • Comment annotations for module sections
  • Placeholder images: https://images.unsplash.com/photo-{id} or picsum.photos

Responsive

  • Sidebar: 240-280px fixed on desktop, hidden/hamburger on mobile
  • Content: responsive, max-w-7xl centered
  • Card grid: grid-cols-1 md:grid-cols-2 lg:grid-cols-3

Notes

  • Do not generate node_modules/
  • Start command: npm install && npm run dev
  • Tailwind CSS 4 does not use tailwind.config.js or postcss.config.js
  • All icons from lucide-react, no external paid icon libraries
  • Use mock data, no real API calls
安全使用建议
Installers should still review generated app code before running npm install, but this skill itself is a disclosed UI-building guide with no artifact-backed sensitive access or hidden behavior.
能力评估
Purpose & Capability
The stated purpose is to generate React/Vite/Tailwind/lucide frontend page code from UI descriptions or image references, and the SKILL.md content stays within that UI scaffolding scope.
Instruction Scope
Instructions cover project structure, dependencies, components, styling, responsiveness, and start commands; there are no prompt overrides, covert role changes, unrelated data access requests, or unsafe automatic actions.
Install Mechanism
The artifact contains only SKILL.md and no executable scripts, install hooks, bundled binaries, clawpack URL, or declared package dependencies for the skill itself.
Credentials
The generated projects may use npm install and placeholder images from Unsplash or picsum.photos, which is expected for frontend scaffolding and disclosed in the skill.
Persistence & Privilege
No persistence, privilege escalation, background workers, credential/session/profile use, local indexing, or destructive file operations are present.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install web-ui-builder
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /web-ui-builder 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of Web UI Builder. - Generates complete React 19 + Vite 8 + Tailwind CSS 4 + lucide-react UI page code from descriptions or images. - Outputs project structure, start commands, and component files based on functional modules. - Uses new CSS-driven Tailwind CSS 4 configuration—no tailwind.config.js or postcss.config.js needed. - Follows a component-driven strategy: maps keywords to functional and content modules, then composes the full page. - Provides generation guidelines for styling, code standards, and responsiveness.
元数据
Slug web-ui-builder
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Web UI Builder 是什么?

Generate complete frontend page code using React 19 + Vite 8 + Tailwind CSS 4 + lucide-react from UI descriptions or images. Outputs project structure, compo... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 42 次。

如何安装 Web UI Builder?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install web-ui-builder」即可一键安装,无需额外配置。

Web UI Builder 是免费的吗?

是的,Web UI Builder 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Web UI Builder 支持哪些平台?

Web UI Builder 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Web UI Builder?

由 OpenLark(@openlark)开发并维护,当前版本 v1.0.0。

💬 留言讨论