← Back to Skills Marketplace
0xsegfaulted

claw2ui

by 0xsegfaulted · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ Security Clean
377
Downloads
0
Stars
1
Active Installs
10
Versions
Install in OpenClaw
/install claw2ui
Description
Generate interactive web pages (dashboards, charts, tables, reports) and serve them via public URL. Use this skill when the user explicitly asks for data vis...
README (SKILL.md)

Claw2UI - Agent-to-UI Bridge

Generate interactive web pages from TypeScript DSL specs and serve them via a public URL. Pages include Tailwind CSS, Alpine.js, and Chart.js out of the box, with pluggable themes, type checking, and mobile-responsive layouts.

Source: GitHub · npm · HF Space · License: MIT

Data Safety & User Confirmation

Every published page is accessible via a public URL. Never publish without explicit user approval.

  • Always confirm with the user before publishing — describe what will be published and wait for explicit "yes"/"go ahead". Silent publishing is never acceptable
  • Never include secrets, credentials, API keys, tokens, PII, or internal endpoints in page content
  • Sanitize all user-provided data before embedding — the html component is sanitized server-side, but avoid passing raw untrusted input to other components
  • Use TTL for ephemeral or sensitive data so pages auto-expire: --ttl 3600000 (1 hour)
  • Review content before publishing — check that no sensitive information leaks through table rows, stat values, or chart labels

Setup

Claw2UI uses the public server at https://0xsegfaulted-claw2ui.hf.space by default. No local server needed.

npm install -g claw2ui
claw2ui register --server https://0xsegfaulted-claw2ui.hf.space
# Done! Token saved to ~/.claw2ui.json automatically.

Self-hosting: To run your own Claw2UI server (local, Docker, or HF Space), see the self-hosting guide.

Workflow

Step 1: Ensure Connection

# Register once (token saved to ~/.claw2ui.json)
claw2ui register --server https://0xsegfaulted-claw2ui.hf.space

Step 2: Write a TypeScript DSL Spec

Write a .ts file. Always wrap content in a container. The file is type-checked automatically.

cat > /tmp/claw2ui_page.ts \x3C\x3C 'SPECEOF'
import { page, container, header, row, stat, card, chart, dataset } from "claw2ui/dsl"

export default page("Page Title", [
  container(
    header("Title", "Description"),
    row(3,
      stat("Metric 1", "100", { change: 5.2, icon: "trending_up" }),
      stat("Metric 2", "200"),
      stat("Metric 3", "300"),
    ),
    card("Trend",
      chart("line", {
        labels: ["Jan", "Feb", "Mar"],
        datasets: [dataset("Value", [10, 20, 15], { borderColor: "#3b82f6", tension: 0.3 })],
      }),
    ),
  ),
], { style: "anthropic" })
SPECEOF

Step 3: Confirm with User

Before publishing, tell the user what will be published and confirm they want to proceed. The page will be accessible via a public URL. Example:

"I've prepared a dashboard with [summary of content]. Ready to publish it to a public URL? (Use --ttl 3600000 for auto-expiry in 1 hour.)"

Step 4: Publish

Only after user confirmation:

claw2ui publish --spec-file /tmp/claw2ui_page.ts --title "Dashboard"
# For sensitive/temporary data, always set a TTL:
claw2ui publish --spec-file /tmp/claw2ui_page.ts --title "Dashboard" --ttl 3600000
# Skip type checking for faster publish (not recommended):
claw2ui publish --spec-file /tmp/claw2ui_page.ts --title "Dashboard" --no-check

Outputs the public URL.

Step 5: Share the URL

Include the URL in your response to the user.

CLI Commands

# Connection
claw2ui register --server \x3Curl>         # Self-service registration
claw2ui init --server \x3Curl> --token \x3Ct> # Manual config

# Publish
claw2ui publish --spec-file \x3Cfile.ts> --title "Title"    # From TS DSL (type-checked)
claw2ui publish --spec-file \x3Cfile.ts> --no-check         # Skip type checking
claw2ui publish --spec-file \x3Cfile.json> --title "Title"  # From JSON spec (legacy)
claw2ui publish --html "\x3Ch1>Hi\x3C/h1>" --title "Test"      # Raw HTML
claw2ui publish --spec-file \x3Cfile> --style anthropic     # With theme
claw2ui publish --spec-file \x3Cfile> --ttl 3600000         # With TTL (ms)

# Themes
claw2ui themes                          # List available themes

# Manage pages
claw2ui list                            # List all pages
claw2ui delete \x3Cpage-id>               # Delete a page
claw2ui status                          # Check server status

DSL Function Reference

All functions are imported from "claw2ui/dsl".

Page Entry

page(title, components[], opts?)  // opts: { theme?: "light"|"dark"|"auto", style?: "anthropic"|"classic" }

Layout (accept ...children)

container(...children)              // Outermost wrapper, always use this
row(cols, ...children)              // Grid row: row(3, stat(...), stat(...), stat(...))
column(span, ...children)           // Grid column within a row
card(title, ...children)            // Card with border/shadow
list(direction, ...children)        // "vertical" or "horizontal"
modal(title, ...children)           // Dialog popup

Special Containers

tabs(                               // Tabbed sections
  tab("id", "Label", ...children),
  tab("id2", "Label 2", ...children),
)

accordion(                          // Collapsible sections
  section("Title", ...children),
  section("Title 2", ...children),
)

Data Display

stat(label, value, opts?)           // opts: { change?: number, icon?: string }
chart(chartType, data, opts?)       // opts: { height?, options?, legendPosition?, title? }
table(columns, rows, opts?)         // opts: { searchable?, perPage? }

Helpers (for chart/table)

dataset(label, data[], opts?)       // Chart.js dataset: dataset("Rev", [1,2,3], { borderColor: "red" })
col(key, label?, format?)           // Column def: col("name", "Name", "currency")
badge(key, label, badgeMap)         // Badge column: badge("status", "Status", { Active: "success" })
months(n)                           // Month labels: months(6) → ["Jan","Feb","Mar","Apr","May","Jun"]

Input

button(label, variant?)             // variant: "primary"|"secondary"|"danger"|"outline"
textField(label?, opts?)            // opts: { placeholder?, value?, inputType? }
select(label, options)              // options: [{ value: "a", label: "Option A" }]
checkbox(label, value?)
choicePicker(label, options, opts?) // opts: { value?, variant?, displayStyle? }
slider(label, opts?)                // opts: { min?, max?, value? }
dateTimeInput(label, opts?)         // opts: { value?, enableDate?, enableTime?, min?, max? }

Media & Text

markdown(content)                   // Renders markdown to styled HTML (preferred for rich text)
text(content, opts?)                // opts: { size?, bold?, class? }
code(content, language?)            // Code block with syntax highlighting
html(content)                       // Raw HTML (sanitized server-side)
icon(name, size?)                   // Material Icon: icon("settings", 24)
image(src, alt?)
video(url, poster?)
audioPlayer(url, description?)
divider()
spacer(size?)

Navigation

header(title, subtitle?)            // Page header
link(href, label?, target?)         // Hyperlink

Available Themes (style field)

Theme Description
anthropic (default) Warm editorial aesthetic — Newsreader serif headings, terracotta accents, cream backgrounds
classic Original Tailwind look — blue accents, system fonts, gray surfaces

Best Practices

Always use TypeScript DSL, not JSON

The DSL is type-checked, uses ~60% fewer tokens, and supports logic. JSON specs are still supported but considered legacy.

Use loops and conditionals

// Generate stats from data
const metrics = [
  { label: "CPU", value: "42%", icon: "monitor" },
  { label: "Memory", value: "6.2 GB", icon: "memory" },
  { label: "Disk", value: "120 MB/s", icon: "storage" },
]
row(3, ...metrics.map(m => stat(m.label, m.value, { icon: m.icon })))

// Conditional rendering
container(
  header("Report"),
  data.length > 0
    ? card("Trend", chart("line", chartData))
    : text("No data available"),
)

// Filter falsy values
container(
  header("Dashboard"),
  showMetrics && row(3, stat("A", "1"), stat("B", "2"), stat("C", "3")),
  card("Details", table(cols, rows)),
)

Prefer col() / badge() / dataset() helpers

// Good — concise and readable
table(
  [col("name", "Name"), col("rev", "Revenue", "currency"), badge("status", "Status", { Active: "success" })],
  rows,
)

// Avoid — verbose raw objects
table(
  [{ key: "name", label: "Name" }, { key: "rev", label: "Revenue", format: "currency" }, { key: "status", label: "Status", format: "badge", badgeMap: { Active: "success" } }],
  rows,
)

Use markdown() for rich text

card("About",
  markdown(`
## Features
- **Fast** — sub-second rendering
- **Secure** — sanitized HTML output
- **Responsive** — mobile-first layouts

> Built with Claw2UI
  `),
)

Use months() for chart labels

chart("bar", {
  labels: months(6),
  datasets: [dataset("Revenue", [100, 200, 150, 300, 250, 400])],
})

Design Patterns

Dashboard

import { page, container, header, row, stat, card, chart, table, col, badge, dataset } from "claw2ui/dsl"

export default page("Dashboard", [
  container(
    header("Dashboard", "Overview"),
    row(3,
      stat("Revenue", "$1.2M", { change: 15.3, icon: "payments" }),
      stat("Orders", "8,432", { change: 8.1, icon: "shopping_cart" }),
      stat("Customers", "2,847", { change: -2.5, icon: "group" }),
    ),
    card("Trend",
      chart("line", {
        labels: months(6),
        datasets: [dataset("Revenue", [320, 410, 380, 450, 480, 520], {
          borderColor: "#3b82f6", tension: 0.3, fill: true,
          backgroundColor: "rgba(59,130,246,0.1)",
        })],
      }, { height: 280 }),
    ),
    card("Details",
      table(
        [col("name", "Name"), col("value", "Value", "currency"), badge("status", "Status", { Active: "success", Inactive: "error" })],
        [
          { name: "Product A", value: 450000, status: "Active" },
          { name: "Product B", value: 320000, status: "Active" },
          { name: "Product C", value: 0, status: "Inactive" },
        ],
      ),
    ),
  ),
], { style: "anthropic" })

Report with Tabs

import { page, container, header, row, stat, card, chart, table, tabs, tab, text, markdown, col, dataset, months } from "claw2ui/dsl"

export default page("Monthly Report", [
  container(
    header("Monthly Report", "March 2026"),
    tabs(
      tab("overview", "Overview",
        row(3,
          stat("Users", "12,847", { change: 18.5, icon: "group" }),
          stat("Revenue", "$89K", { change: 24.3, icon: "payments" }),
          stat("Churn", "3.2%", { change: -1.1, icon: "trending_down" }),
        ),
        card("Growth",
          chart("line", {
            labels: months(6),
            datasets: [
              dataset("Users", [8000, 9200, 10100, 11000, 11800, 12847], { borderColor: "#3b82f6" }),
              dataset("Revenue", [52, 58, 65, 72, 81, 89], { borderColor: "#10b981", yAxisID: "y1" }),
            ],
          }),
        ),
      ),
      tab("details", "Details",
        table(
          [col("page", "Page"), col("views", "Views"), col("bounce", "Bounce", "percent")],
          [
            { page: "/", views: "23,456", bounce: 28 },
            { page: "/pricing", views: "12,567", bounce: 22 },
            { page: "/docs", views: "9,876", bounce: 18 },
          ],
        ),
      ),
      tab("notes", "Notes",
        markdown("## Key Takeaways\
\
- Revenue up **24.3%** MoM\
- Churn improved by 1.1pp\
- `/pricing` page has lowest bounce rate"),
      ),
    ),
  ),
], { style: "anthropic" })

Comparison

import { page, container, header, row, card, stat, text, table, col } from "claw2ui/dsl"

export default page("Plan Comparison", [
  container(
    header("Plan Comparison", "Choose the right plan"),
    row(3,
      card("Starter",
        stat("Price", "$9/mo"),
        text("5 users, 10 GB storage"),
      ),
      card("Pro",
        stat("Price", "$29/mo", { icon: "star" }),
        text("25 users, 100 GB storage"),
      ),
      card("Enterprise",
        stat("Price", "Custom", { icon: "business" }),
        text("Unlimited users, 1 TB storage"),
      ),
    ),
    card("Feature Matrix",
      table(
        [col("feature", "Feature"), col("starter", "Starter"), col("pro", "Pro"), col("enterprise", "Enterprise")],
        [
          { feature: "Users", starter: "5", pro: "25", enterprise: "Unlimited" },
          { feature: "Storage", starter: "10 GB", pro: "100 GB", enterprise: "1 TB" },
          { feature: "Support", starter: "Email", pro: "Priority", enterprise: "Dedicated" },
        ],
      ),
    ),
  ),
], { style: "anthropic" })
Usage Guidance
This skill appears to do what it says: generate TypeScript-based dashboard specs and publish them via the claw2ui service. Before installing: (1) Review the npm package and linked GitHub repo (npm global installs run code on your machine). (2) Ensure the agent asks you explicitly and shows the content before any publish — SKILL.md requires confirmation but cannot enforce it for you. (3) Never include secrets, API keys, or internal endpoints in page content; published pages are public unless you use TTL or a self-hosted server. (4) Be aware a token gets saved to ~/.claw2ui.json; treat that file as a secret and remove/regenerate it if compromised. (5) If you self-host or enable backups, follow the guide to keep backups private and protect CLAWBOARD/ HF tokens. If you cannot vet the npm package or the GitHub source, consider running the CLI in an isolated environment (container or dedicated VM) or avoiding installation.
Capability Analysis
Type: OpenClaw Skill Name: claw2ui Version: 1.1.0 The claw2ui skill bundle is a legitimate tool for generating and hosting interactive web dashboards and reports. The documentation (SKILL.md) is transparent about its operations, including writing a configuration file (~/.claw2ui.json) and publishing content to a public URL (defaulting to a Hugging Face Space). It includes robust safety instructions for the AI agent, explicitly requiring user confirmation before any data is published and prohibiting the inclusion of secrets or PII. The tool's behavior is well-aligned with its stated purpose, and the inclusion of a self-hosting guide (ref/self-hosting.md) with opt-in backup features further indicates a non-malicious, developer-focused utility.
Capability Assessment
Purpose & Capability
Name and description describe generating and publishing interactive pages. Required binaries (node, claw2ui) and optional cloudflared (for tunnels) are coherent with that purpose. No unrelated credentials or config paths are requested.
Instruction Scope
SKILL.md instructs the agent to create TypeScript DSL specs (written under /tmp), register/persist a token (~/.claw2ui.json), and publish to a server (default HF Space). The document repeatedly mandates explicit user confirmation before publishing and warns not to include secrets. This scope is appropriate, but the skill relies on the agent actually enforcing the confirmation step — that enforcement is not automatically guaranteed by this instruction-only skill.
Install Mechanism
Install options are npm (claw2ui) and optional brew (cloudflared). npm global installs are a moderate-risk install mechanism (untrusted packages can execute code on install); cloudflared via brew is a standard, lower-risk channel. The SKILL.md provides a GitHub link for verification which helps vetting.
Credentials
The skill declares no required env vars and no primary credential, which matches normal usage of a CLI that registers to a server and stores a token locally. The skill will write ~/.claw2ui.json (server URL + token) and can publish to an external HF Space by default — that behavior is expected but means published content (and the token if misused) can be exposed if mishandled. Self-hosting and optional backup introduce additional env vars (HF_TOKEN, CLAWBOARD_TOKEN, etc.), but these are optional and documented.
Persistence & Privilege
always:false (normal). The skill writes its own config (~/.claw2ui.json) and temp spec files (/tmp/*.ts), which is reasonable for a CLI that registers and publishes. It does not request system-wide changes or other skills' configs.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install claw2ui
  3. After installation, invoke the skill by name or use /claw2ui
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
Claw2UI 1.1.0 introduces a new TypeScript DSL for page specs and richer CLI integration. - Added support for authoring interactive web pages using a TypeScript DSL, with type checking by default. - CLI now accepts `.ts` spec files; type-checks before publishing unless `--no-check` is used. - Retains compatibility with legacy JSON specs, but TypeScript is now the recommended format. - Enhanced documentation of CLI options and DSL function reference. - Improved metadata including bin requirements and side effects. - No code file changes detected, this is a documentation and workflow update.
v1.0.9
- Enforces explicit user confirmation before publishing; silent publishing is now disallowed - Updated triggers: now suggests Claw2UI for appropriate content and waits for user confirmation - Clarified data safety section to emphasize confirmation and public availability - Refined description and removed mention of proactive usage without user approval - General wording and instruction improvements for clarity
v1.0.8
Claw2UI 1.0.8 - Expanded triggers in the skill description to include proactive use for any data visualization, rich layout, or analytics needs, even if not explicitly requested. - Added extensive English and Chinese trigger phrases for broader, multilingual detection (e.g., dashboards, charts, tables, reports, status pages). - Updated guidance to encourage more frequent and proactive suggestion of Claw2UI when web-based presentation is preferable over plain text. - Minor clarifications in CLI usage examples and documentation.
v1.0.7
Claw2UI 1.0.7 Changelog - Added self-hosting documentation: new file `ref/self-hosting.md` now included - Simplified and clarified SKILL.md, with public server as the default setup - Removed Cloudflare tunnel and local server setup instructions from main documentation - Installation steps and CLI workflow streamlined for typical/public server usage - For advanced deployment options, users are directed to the self-hosting guide
v1.0.6
- Added support for page theming via the `style` field in specs, enabling custom page appearances (e.g., “anthropic” and “classic” themes). - Updated documentation and CLI examples to include theme-related options (`--style`, `claw2ui themes`). - Improved spec examples and workflow steps to reflect styling options. - No functional changes to code detected in this version.
v1.0.5
- Remote registration and token instructions updated to use https://0xsegfaulted-claw2ui.hf.space as the new default remote server. - All references to the previous server URL replaced with the new Hugging Face Spaces server. - No changes in code or functionality; documentation update only.
v1.0.3
- Added "Remote Mode" setup instructions for connecting to a shared Claw2UI server without local server/tunnel setup. - Documented self-service registration (claw2ui register) and manual token setup for remote connections. - Clarified distinction between remote and local modes, including updated workflow steps. - Added new CLI commands for remote registration and server admin token management. - Improved overall organization and guidance on setup and connection.
v1.0.2
Claw2UI v1.0.2 - Added license, metadata, and install instructions to SKILL.md for improved clarity and compatibility. - Declared skill requirements: required and optional binaries (node, claw2ui, cloudflared) and environment variables for tunnel support. - Included install steps for npm (Claw2UI CLI) and Homebrew (cloudflared) directly in metadata. - No changes to core usage, CLI commands, or features.
v1.0.1
## Claw2UI 1.0.0 Changelog - Clarified that publishing creates a public URL; now requires explicit user confirmation before publishing any page. - Stronger user data and privacy guidance: never publish PII, secrets, or sensitive data, and always sanitize user inputs. - Updated skill triggers: only suggest Claw2UI for web-based/output-presented content, and wait for user approval before publishing. - Added setup, workflow, and data safety instructions referencing official sources (GitHub, npm). - No functional or API changes; documentation and behavioral guidance improved.
v1.0.0
Initial release of Claw2UI skill enabling interactive web page generation from AI outputs. - Instantly generate and serve dashboards, charts, tables, and rich reports via public URLs. - Triggers automatically for any request better served as a web page or when users ask for charts, dashboards, visualizations, or reports. - Supports rich interactive layouts: containers, rows, cards, tabs, accordions, tables, and multiple chart types (line, bar, pie, etc.). - Includes flexible input forms, text/media components, and KPI/stat widgets for business and analytics use cases. - Provides clear workflow and usage details for integration with Claw2UI's CLI and cloud deployment.
Metadata
Slug claw2ui
Version 1.1.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 10
Frequently Asked Questions

What is claw2ui?

Generate interactive web pages (dashboards, charts, tables, reports) and serve them via public URL. Use this skill when the user explicitly asks for data vis... It is an AI Agent Skill for Claude Code / OpenClaw, with 377 downloads so far.

How do I install claw2ui?

Run "/install claw2ui" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is claw2ui free?

Yes, claw2ui is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does claw2ui support?

claw2ui is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created claw2ui?

It is built and maintained by 0xsegfaulted (@0xsegfaulted); the current version is v1.1.0.

💬 Comments