Token导航 LogoToken导航

Agent Skill · 前端设计

wix-cli-site-plugin(WIX CLI site plugin CLI)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

wix-cli-site-plugin 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 1,253。

总安装 6,705周安装 288GitHub Stars 9下载 2,350核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:wix-cli-site-plugin(WIX CLI site plugin CLI)
来源仓库:https://github.com/wix/skills
仓库路径:skills/wix-cli-site-plugin
安装命令:
npx skills add https://github.com/wix/skills --skill wix-cli-site-plugin
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/wix/skills --skill wix-cli-site-plugin

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于辅助前端页面、组件和样式开发。适合生成或审查 React、Vue、Tailwind CSS 等相关代码。通过 npx skills add 命令从指定仓库安装并使用。需结合项目现有设计系统和路由方式,避免生成孤立片段。wix-cli-site-plugin 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/wix-cli-site-plugin

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/wix/skills --skill wix-cli-site-plugin;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

wix-cli-site-plugin 怎么安装?

在终端执行 npx skills add https://github.com/wix/skills --skill wix-cli-site-plugin。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

wix-cli-site-plugin 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

wix-cli-site-plugin 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

wix-cli-site-plugin 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

wix-cli-site-plugin 用的人多吗?

公开数据是累计安装 6,705 次,近一周安装 288 次,下载 2,350 次,GitHub 9 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

wix-cli-site-plugin 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
wix-cli-site-plugin

WIX CLI site plugin CLI · 本页

6,7059需要联网MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Wix Site Plugin Builder

Creates site plugin extensions for Wix CLI applications. Site plugins are custom elements that integrate into predefined slots within Wix business solutions (like Wix Stores, Wix Bookings, Wix eCommerce), extending their functionality and user experience.

Site owners can place site plugins into UI slots using the plugin explorer in Wix editors.

Quick Start Checklist

Follow these steps in order when creating a site plugin:

  1. Create plugin folder: src/extensions/site/plugins/<plugin-name>/
  2. Create <plugin-name>.tsx extending HTMLElement with observedAttributes
  3. Create <plugin-name>.panel.tsx with WDS components and widget.getProp/setProp
  4. Create <plugin-name>.extension.ts with extensions.sitePlugin() and unique UUID
  5. Update src/extensions.ts to import and use the new extension

Architecture

Site plugins consist of three required files:

1. Plugin Component (<plugin-name>.tsx)

Custom element component that renders in the slot using native HTMLElement:

  • Extend HTMLElement class
  • Define observedAttributes for reactive properties
  • Implement connectedCallback() and attributeChangedCallback() for rendering
  • Use inline styles via template strings
  • Attributes use kebab-case (e.g., display-name)

2. Settings Panel (<plugin-name>.panel.tsx)

Settings panel shown in the Wix Editor sidebar:

  • Uses Wix Design System (@wix/design-system) components — see wds-docs for component reference
  • Manages plugin properties via @wix/editor widget API
  • Loads initial values with widget.getProp('kebab-case-name')
  • Updates properties with widget.setProp('kebab-case-name', value)
  • Widget properties are bound to custom element attributes — any property change automatically updates the corresponding attribute
  • Wrapped in WixDesignSystemProvider > SidePanel > SidePanel.Content

3. Extension Configuration (<plugin-name>.extension.ts)

Defines the plugin's placement configuration:

  • Specifies which slots the plugin can be added to
  • Configures auto-add behavior on app installation
  • Sets the tag name and file paths

Plugin Component Pattern

Site plugins use native HTMLElement custom elements:

// my-site-plugin.tsx
class MyElement extends HTMLElement {
  static get observedAttributes() {
    return ['display-name'];
  }

  constructor() {
    super();
  }

  connectedCallback() {
    this.render();
  }

  attributeChangedCallback() {
    this.render();
  }

  render() {
    const displayName = this.getAttribute('display-name') || "Your Plugin's Title";

    this.innerHTML = `
      <div style="font-size: 16px; padding: 16px; border: 1px solid #ccc; border-radius: 8px; margin: 16px;">
        <h2>${displayName}</h2>
        <hr />
        <p>
          This is a Site Plugin generated by Wix CLI.<br />
          Edit your element's code to change this text.
        </p>
      </div>
    `;
  }
}

export default MyElement;

Key Points:

  • Extend HTMLElement class directly
  • Define observedAttributes static getter to list reactive attributes
  • Attributes use kebab-case (e.g., display-name, bg-color)
  • Implement connectedCallback() for initial render
  • Implement attributeChangedCallback() to re-render when attributes change
  • Use inline styles via template strings
  • Use this.getAttribute('attribute-name') to read attribute values
  • Wix handles define() for you — do NOT call customElements.define() in your code

Settings Panel Pattern

// my-site-plugin.panel.tsx
import React, { type FC, useState, useEffect, useCallback } from 'react';
import { widget } from '@wix/editor';
import {
  SidePanel,
  WixDesignSystemProvider,
  Input,
  FormField,
} from '@wix/design-system';
import '@wix/design-system/styles.global.css';

const Panel: FC = () => {
  const [displayName, setDisplayName] = useState<string>('');

  useEffect(() => {
    widget.getProp('display-name')
      .then(displayName => setDisplayName(displayName || "Your Plugin's Title"))
      .catch(error => console.error('Failed to fetch display-name:', error));
  }, [setDisplayName]);

  const handleDisplayNameChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {
    const newDisplayName = event.target.value;
    setDisplayName(newDisplayName);
    widget.setProp('display-name', newDisplayName);
  }, [setDisplayName]);

  return (
    <WixDesignSystemProvider>
      <SidePanel width="300" height="100vh">
        <SidePanel.Content noPadding stretchVertically>
          <SidePanel.Field>
            <FormField label="Display Name">
              <Input
                type="text"
                value={displayName}
                onChange={handleDisplayNameChange}
                aria-label="Display Name"
              />
            </FormField>
          </SidePanel.Field>
        </SidePanel.Content>
      </SidePanel>
    </WixDesignSystemProvider>
  );
};

export default Panel;

Key Points:

  • Prop names in widget.getProp() and widget.setProp() use kebab-case (e.g., "display-name")
  • Always update both local state AND widget prop in onChange handlers
  • Widget properties are bound to custom element attributes — changes automatically update the corresponding attribute
  • Wrap content in WixDesignSystemProvider > SidePanel > SidePanel.Content
  • Use WDS components from @wix/design-system
  • Import @wix/design-system/styles.global.css for styles
  • Include aria-label for accessibility

Color & Font Picker Fields

Site plugin settings panels can use inputs.selectColor() and inputs.selectFont() from @wix/editor to open the native Wix Editor color and font picker dialogs.

ColorPickerField

Opens the Wix color picker with theme colors, gradients, and more — NOT a basic HTML <input type="color">.

import React, { type FC } from 'react';
import { inputs } from '@wix/editor';
import { FormField, Box, FillPreview, SidePanel } from '@wix/design-system';

interface ColorPickerFieldProps {
  label: string;
  value: string;
  onChange: (value: string) => void;
}

export const ColorPickerField: FC<ColorPickerFieldProps> = ({
  label,
  value,
  onChange,
}) => (
  <SidePanel.Field>
    <FormField label={label}>
      <Box width="30px" height="30px">
        <FillPreview
          fill={value}
          onClick={() => inputs.selectColor(value, { onChange: (val) => { if (val) onChange(val); } })}
        />
      </Box>
    </FormField>
  </SidePanel.Field>
);

FontPickerField

Opens the Wix font picker with font family, size, bold, italic, and other typography features.

import React, { type FC } from 'react';
import { inputs } from '@wix/editor';
import { FormField, Button, Text, SidePanel } from '@wix/design-system';

interface FontValue {
  font: string;
  textDecoration: string;
}

interface FontPickerFieldProps {
  label: string;
  value: FontValue;
  onChange: (value: FontValue) => void;
}

export const FontPickerField: FC<FontPickerFieldProps> = ({
  label,
  value,
  onChange,
}) => (
  <SidePanel.Field>
    <FormField label={label}>
      <Button
        size="small"
        priority="secondary"
        onClick={() => inputs.selectFont(value, { onChange: (val) => onChange({ font: val.font, textDecoration: val.textDecoration || "" }) })}
        fullWidth
      >
        <Text size="small" ellipsis>Change Font</Text>
      </Button>
    </FormField>
  </SidePanel.Field>
);

Important:

  • Always use inputs.selectColor() from @wix/editor with FillPreview — do NOT use <Input type="color">
  • Always use inputs.selectFont() from @wix/editor with the callback pattern inputs.selectFont(value, {onChange})
  • Import inputs from @wix/editor (not from @wix/sdk)

Attribute Naming Convention

Site plugins use kebab-case consistently for HTML attributes:

FileConventionExample
<plugin>.tsx (getAttribute)kebab-casethis.getAttribute('display-name')
<plugin>.tsx (observedAttributes)kebab-case['display-name', 'bg-color']
<plugin>.panel.tsx (widget API)kebab-casewidget.getProp('display-name')

Output Structure

Site plugins live under src/extensions/site/plugins. Each plugin has its own folder with files named after the plugin.

src/extensions/site/plugins/
└── {plugin-name}/
    ├── {plugin-name}.tsx           # Main plugin component (HTMLElement)
    ├── {plugin-name}.panel.tsx     # Settings panel component
    └── {plugin-name}.extension.ts  # Extension registration
public/
└── {plugin-name}-logo.svg          # Plugin logo (optional)

References

TopicReference
Complete ExamplesEXAMPLES.md
Slots (App IDs, multiple placements, finding slots)SLOTS.md
WDS Componentswds-docs

Available Slots

Site plugins integrate into predefined slots in Wix business solutions. Each slot is identified by:

  • appDefinitionId: The ID of the Wix app (e.g., Stores, Bookings)
  • widgetId: The ID of the page containing the slot
  • slotId: The specific slot identifier

Common placement areas include product pages (Wix Stores), checkout and side cart (Wix eCommerce), booking pages (Wix Bookings), service pages, event pages, and blog post pages.

For supported pages, common Wix App IDs, and how to find slot IDs, see SLOTS.md.

Extension Registration

Extension registration is MANDATORY and has TWO required steps.

Step 1: Create Plugin-Specific Extension File

Each site plugin requires an extension file in its folder:

// my-site-plugin.extension.ts
import { extensions } from '@wix/astro/builders';

export default extensions.sitePlugin({
  id: '{{GENERATE_UUID}}',
  name: 'My Site Plugin',
  marketData: {
    name: 'My Site Plugin',
    description: 'Marketing Description',
    logoUrl: '{{BASE_URL}}/my-site-plugin-logo.svg',
  },
  placements: [{
    appDefinitionId: 'a0c68605-c2e7-4c8d-9ea1-767f9770e087',
    widgetId: '6a25b678-53ec-4b37-a190-65fcd1ca1a63',
    slotId: 'product-page-details-6',
  }],
  installation: { autoAdd: true },
  tagName: 'my-site-plugin',
  element: './extensions/site/plugins/my-site-plugin/my-site-plugin.tsx',
  settings: './extensions/site/plugins/my-site-plugin/my-site-plugin.panel.tsx',
});

CRITICAL: UUID Generation

The id must be a unique, static UUID v4 string. Generate a fresh UUID for each extension - do NOT use randomUUID() or copy UUIDs from examples. Replace {{GENERATE_UUID}} with a freshly generated UUID like "95a28afd-7df1-4e09-9ec1-ce710b0389a0".

PropertyTypeDescription
idstringUnique static UUID v4 (generate fresh)
namestringInternal name for the plugin
marketData.namestringDisplay name in plugin explorer and app dashboard
marketData.descriptionstringDescription shown in plugin explorer and app dashboard
marketData.logoUrlstringPath to logo file ({{BASE_URL}} resolves to public folder)
placementsarrayArray of slot placements where plugin can be added
placements.appDefinitionIdstringID of the Wix app containing the slot
placements.widgetIdstringID of the page containing the slot
placements.slotIdstringID of the specific slot
installation.autoAddbooleanWhether to auto-add plugin to slots on app installation
tagNamestringHTML custom element tag (kebab-case, must contain a hyphen)
elementstringRelative path to plugin component
settingsstringRelative path to settings panel component

Step 2: Register in Main Extensions File

CRITICAL: After creating the plugin-specific extension file, you MUST read wix-cli-extension-registration and follow the "App Registration" section to update src/extensions.ts.

Without completing Step 2, the site plugin will not be available in the plugin explorer.

Checkout Plugins

If you are building a plugin for the checkout page, it may not support automatic addition upon installation. You must create a dashboard page to provide users with a way to add the plugin to their site. See EXAMPLES.md for the dashboard page pattern.

Examples

For complete examples with all three required files (plugin component, settings panel, extension configuration), see EXAMPLES.md.

Example use cases:

  • Best Seller Badge - Customizable badge on product pages with text and color settings
  • Booking Confirmation - Custom confirmation message for booking pages
  • Product Reviews Summary - Star rating and review count display
  • Data-Driven Plugin - Plugin with Wix Data API integration and editor environment handling

Best Practices

Implementation Guidelines

  • Use inline styles - CSS imports are not supported in custom elements
  • Handle editor environment - Show placeholders when in editor mode for data-dependent plugins
  • Do not call define() - Wix handles customElements.define() for you automatically
  • Validate all input - Check required props are present
  • Follow naming conventions - kebab-case for all attributes and widget API
  • Keep plugins focused - Each plugin should do one thing well
  • Test in multiple slots - If supporting multiple placements, test each one
  • Support both Stores versions - Include placements for both old and new Wix Stores product pages for maximum compatibility

Editor Sandboxing

Site plugins are sandboxed when rendered in the editor. This means they're treated as if they come from a different domain, which impacts access to browser storage APIs.

Restricted APIs in the editor:

  • localStorage and sessionStorage (Web Storage API)
  • document.cookie (Cookie Store API)
  • IndexedDB API
  • Cache API

How to handle sandboxing:

Use the viewMode() function from @wix/site-window to check the current mode before accessing restricted APIs:

import { window as wixWindow } from '@wix/site-window';

const viewMode = await wixWindow.viewMode();

if (viewMode === 'Site') {
  const item = localStorage.getItem('myKey');
} else {
  // Mock storage or modify API usage for editor mode
}

Using Wix SDK Modules in Site Plugins

Site plugins can import and use Wix SDK modules directly — you do NOT need createClient(). The Wix runtime provides the client context automatically.

// ✅ CORRECT — Import SDK modules directly
import { items } from "@wix/data";
import { currentCart } from "@wix/ecom";
import { products } from "@wix/stores";

class MyPlugin extends HTMLElement {
  async loadData() {
    // Call SDK methods directly — no createClient needed
    const result = await items.query("MyCollection").find();
    const cart = await currentCart.getCurrentCart();
    const productList = await products.queryProducts().limit(10).find();
  }
}
// ❌ WRONG — Do NOT use createClient in site plugins
import { createClient } from "@wix/sdk";
const wixClient = createClient({ modules: { items, products } });
await wixClient.items.query(...); // Wrong — API surface differs through client

Performance Considerations

  • Keep bundle size small - plugins load on user-facing pages
  • Avoid heavy computations on initial render
  • Lazy load data when possible
  • Use efficient re-rendering patterns

平台分布

Claude Code

29.06%
按下载量换算683

Cursor

24.37%
按下载量换算573

Antigravity

19.08%
按下载量换算448

OpenCode

14.1%
按下载量换算331

Gemini CLI

8.44%
按下载量换算198

windsurf

3.12%
按下载量换算73

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills