Token导航 LogoToken导航

Agent Skill · 前端设计

wix-cli-context-provider(WIX CLI context provider 命令行)

wix-cli-context-provider 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

wix-cli-context-provider 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 7,374。

总安装 380周安装 16GitHub Stars 9下载 133核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/wix/skills --skill wix-cli-context-provider

这个 Skill 是做什么的

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

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或代码变更进行整理。通过 npx skills add 命令从指定仓库安装并使用。建议确认权限范围和维护状态,避免触发联网或文件读写。

wix-cli-context-provider 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/wix-cli-context-provider

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

wix-cli-context-provider 怎么安装?

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

wix-cli-context-provider 支持哪些 AI 工具?

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

wix-cli-context-provider 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

wix-cli-context-provider 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

wix-cli-context-provider 用的人多吗?

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

wix-cli-context-provider 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 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-context-provider

WIX CLI context provider 命令行 · 本页

3809接触敏感数据未明确通过

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

SKILL.md 原文

Wix Context Provider Builder

Creates production-quality context provider components for Wix CLI applications. Context providers are logical components (no UI) that can be added to any page, container, or section in the Editor. They expose shared state and functionality that child components consume via a React hook.

You MUST read CONTEXT_PROVIDER_SPEC.md before implementing a context provider. It contains the complete manifest structure, all data types, and type constraints.

Consumer Constraint

⚠️ Only site components (wix-cli-site-component) can consume context provider extensions. Site widgets, site plugins, and all other extension types are NOT supported as consumers.

⚠️ Consumer site components require valid manifests. When creating a site component to consume this context provider, you MUST follow the wix-cli-site-component skill, including its Hard Constraints.

Quick Start Checklist

Follow these steps in order when creating a context provider:

  1. Ask the user for the app's code identifier (<codeIdentifier>) — this is configured in the Wix Dev Center and cannot be derived from the code. It is used as the namespace in the type field (e.g., <codeIdentifier>.CounterContext)
  2. Install @wix/public-schemas as a devDependency
  3. Install @wix/services-manager-react and @wix/services-definitions if not already present
  4. Create provider folder: src/extensions/{provider-name}/
  5. Create provider.tsx with React context, hook export, provider component, and RichText support for all text/number values
  6. Create extensions.ts in the provider folder with experimentalExtensions.contextProvider() — include both plain and richText context items
  7. Import and register the extension in src/extensions.ts using .use()
  8. Ensure consumer components are site components with contextDependencies in their registration

Hard Constraints

  • Import experimentalExtensions from @wix/astro/builders/experimental, NOT from @wix/astro/builders
  • Do NOT invent or assume new types, modules, or imports
  • The type field must be namespaced: <codeIdentifier>.ComponentName
  • Generate a fresh UUID v4 for each new context provider id
  • Do NOT use disallowed data types (UNKNOWN_DataType, schema, container, onClick, onChange, onKeyPress, onKeyUp, onSubmit)
  • All context items must have a dataType
  • The hook name in contextSpecifier.hook must match the exported hook in provider.tsx
  • NEVER use mocks, placeholders, or TODOs in any code
  • ALWAYS implement complete, production-ready functionality
  • ALWAYS expose RichText versions ({text, html}) of all text and number context values — this is mandatory, not optional

Architecture

Context providers consist of two required parts:

1. Provider Component (provider.tsx)

A React component that:

  • Creates a React context using createContext
  • Exports a hook for child components (e.g., useCounterContext)
  • Exports the provider component as the default export
  • Accepts configuration props defined in the data field of the registration
  • Provides state and functions to child components via context
  • Optionally exports injectAccessTokenGetter for access token injection

2. Extension Registration (in src/extensions.ts)

Registers the context provider with the app builder using experimentalExtensions.contextProvider(), defining:

  • The context model (what values/functions are exposed)
  • The data model (what configuration props the provider accepts)
  • The resource URLs (where to load the component bundle)
  • The context specifier (hook name and optional module specifier)

Provider Component Pattern

import React, { createContext, useContext, useMemo, useCallback } from 'react';
import { useService } from '@wix/services-manager-react';
import { SignalsServiceDefinition } from '@wix/services-definitions/core-services/signals';
import type { Text } from '@wix/public-schemas';

// 1. Define the context type interface (use @wix/public-schemas types, not plain primitives)
export interface MyContextType {
  someValue: Text;
  someAction: () => void;
}

// 2. Define the provider props interface (matches `data` in registration)
export interface MyProviderProps {
  children?: React.ReactNode;
  initialValue: Text;
}

// 3. Create the context (use null, not undefined)
const MyContext = createContext<MyContextType | null>(null);
MyContext.displayName = 'MyContext';

// 4. Export the hook
export function useMyContext(): MyContextType {
  const context = useContext(MyContext);
  if (!context) {
    throw new Error('useMyContext must be used within a MyProvider');
  }
  return context;
}

// 5. Export the provider component (also as default)
export function MyContextProvider({
  children,
  initialValue,
}: MyProviderProps): React.ReactNode {
  const signalsService = useService(SignalsServiceDefinition);
  const signal = useMemo(() => {
    return signalsService.signal(initialValue || '');
  }, [initialValue]);

  const someAction = () => {
    signal.set('updated');
  };

  const api: MyContextType = {
    someValue: signal.get(),
    someAction,
  };

  return (
    <MyContext.Provider value={api}>{children}</MyContext.Provider>
  );
}

MyContextProvider.displayName = 'MyContextProvider';
export default MyContextProvider;

Key Rules for Provider Components

  • Always create a displayName for both the context and the provider component — for human readability
  • Always export the hook as a named export — the manifest's contextSpecifier.hook field references it by name, and consumers import it from the moduleSpecifier
  • Always export the provider as both a named export and default — the Wix runtime loads the context provider via its default export
  • Always throw an error in the hook if used outside the provider — this surfaces a clear message when a consumer component is rendered outside the provider tree, rather than silently returning null
  • Always accept children as a prop — the provider wraps child components in the React tree; the Wix editor places consumer components as children of the provider
  • Always use types from @wix/public-schemas (e.g., NumberType, Text, BooleanType) instead of plain TypeScript primitives — these types match the actual runtime format Wix provides to components as props, so using plain primitives creates a type mismatch
  • Provider props correspond to the data entries in the extension registration
  • Use @wix/services-manager-react with SignalsServiceDefinition from @wix/services-definitions/core-services/signals for reactive state management
  • Always expose RichText versions of all text and number context values (see RichText Support below)

RichText Support (Mandatory)

Every context provider MUST expose RichText versions of all text and number context values. This ensures both native hook consumers and Editor Binding consumers can connect values to rich text components (like Wix's built-in text elements). This is NOT optional — always provide both the plain value and its RichText equivalent.

RichText Helper

Add a toRichText helper in the provider:

type RichTextType = { text: string; html: string };

const toRichText = (value: string | number): RichTextType => ({
  text: `${value}`,
  html: `<div>${value}</div>`,
});

Provider API

Expose both plain and richText versions in the context API object:

const api = {
  count: signal.get(),
  richTextCount: toRichText(signal.get()),
  // ...other context items
};

Registration

Register both the plain value and the richText version in context.items:

context: {
  items: {
    count: {
      dataType: 'number',
      displayName: 'Counter Value',
    },
    richTextCount: {
      dataType: 'data',
      displayName: 'Counter Value (Rich Text)',
      data: {
        items: {
          text: { dataType: 'text' },
          html: { dataType: 'text' },
        },
      },
    },
  },
}

Context Type Interface

Include both versions in the context type:

export interface MyContextType {
  count: NumberType;
  richTextCount: { text: string; html: string };
  // ...functions, other values
}

Exposing both gives consumers maximum flexibility — native hook consumers use the plain value directly, while Editor Binding consumers can connect the richText version to text elements.

Extension Registration

Extension registration is MANDATORY.

Import Requirements

Context providers use the experimental extensions builder:

import { extensions as experimentalExtensions } from '@wix/astro/builders/experimental';

This is different from standard extensions which use import {extensions} from '@wix/astro/builders'.

Registration Pattern

Per-extension file (src/extensions/{provider-name}/extensions.ts):

import { extensions as experimentalExtensions } from '@wix/astro/builders/experimental';

export const contextproviderMyContext = experimentalExtensions.contextProvider({
  id: '{{GENERATE_UUID}}',
  type: '<codeIdentifier>.ContextTypeName',
  context: {
    items: {
      // Context values exposed to children
    },
  },
  data: {
    // Configuration props for the provider
  },
  resources: {
    client: {
      url: './extensions/{provider-name}/provider.tsx',
    },
    contextSpecifier: {
      hook: 'useMyContext',
      moduleSpecifier: 'my-package-name',
    },
  },
});

Main app file (src/extensions.ts):

import { app } from '@wix/astro/builders';
import { contextproviderMyContext } from './extensions/{provider-name}/extensions.ts';

export default app()
  .use(contextproviderMyContext);

Registration Fields

FieldTypeRequiredDescription
idstring (UUID v4)YesUnique identifier. Generate a fresh UUID for each provider
typestringYesNamespaced component type: <codeIdentifier>.ComponentName (max 100 chars)
contextobjectYesThe context model — what values/functions are exposed
dataobjectYesConfiguration props the provider accepts in the Editor
resourcesobjectYesRuntime bundles and context specifier
displayNamestringNoHuman-friendly name (max 50 chars)
descriptionstringNoPublic description (max 300 chars)

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.

Context Items

The context.items map defines what the provider exposes to child components. Each item requires a dataType. See CONTEXT_PROVIDER_SPEC.md for all ContextItem fields and constraints.

⚠️ CRITICAL: context vs data Array Format Difference

The context section and data section use different types for array items. Mixing them up causes the runtime error arrayItems is missing arrayItems.item or arrayItems.dataItem with dataType.

SectionTypeArray item keyExample
contextContextArrayItemsitemarrayItems: {item: {dataType: 'text'}}
dataArrayItemsdataItemarrayItems: {dataItem: {dataType: 'text'}}

In context arrays — use arrayItems.item (a ContextItem):

context: {
  items: {
    myList: {
      dataType: 'arrayItems',
      arrayItems: {
        item: { dataType: 'text' },  // ← "item" for context
      },
    },
  },
}

In data arrays — use arrayItems.dataItem (a DataItem):

data: {
  initialList: {
    dataType: 'arrayItems',
    arrayItems: {
      dataItem: { dataType: 'text' },  // ← "dataItem" for data
    },
  },
}

Context with Functions

context: {
  items: {
    addItem: {
      dataType: 'function',
      displayName: 'Add Item',
      function: {
        parameters: [
          { dataType: 'text', displayName: 'Item ID', description: 'The ID of the item to add' },
          { dataType: 'number', displayName: 'Quantity', description: 'Number of items to add', optional: true },
        ],
        async: false,
      },
    },
    checkout: {
      dataType: 'function',
      displayName: 'Checkout',
      function: {
        parameters: [{ dataType: 'text', displayName: 'Payment Method' }],
        returns: {
          dataType: 'data',
          data: {
            items: {
              success: { dataType: 'booleanValue' },
              orderId: { dataType: 'text' },
            },
          },
        },
        async: true,
      },
    },
  },
}

Context with Arrays

context: {
  items: {
    products: {
      dataType: 'arrayItems',
      displayName: 'Product List',
      arrayItems: {
        item: {
          dataType: 'data',
          data: {
            items: {
              name: { dataType: 'text', displayName: 'Name' },
              price: { dataType: 'number', displayName: 'Price' },
            },
          },
        },
      },
    },
  },
}

Arrays can be nested — use dataType: 'arrayItems' inside another array's item to create multi-dimensional structures (e.g., a 2D grid).

Context with TextEnum

context: {
  items: {
    tier: {
      dataType: 'textEnum',
      displayName: 'Subscription Tier',
      textEnum: {
        options: [
          { value: 'basic', displayName: 'Basic' },
          { value: 'premium', displayName: 'Premium' },
          { value: 'enterprise', displayName: 'Enterprise' },
        ],
      },
    },
  },
}

Context Implementor

Delegates part of the context to a separate component. Useful for item-level contexts with scoped functions (e.g., setAsCurrentItem).

data: {
  items: {
    id: { dataType: 'text', displayName: 'Item ID' },
    name: { dataType: 'text', displayName: 'Name' },
  },
  contextImplementor: {
    componentType: '<codeIdentifier>.lineItemContext',
    propKey: 'lineItemData',
  },
},

The implementor component must be part of the same application and is rendered inside the parent's tree, giving it access to the parent context.

Resources

FieldTypeRequiredDescription
resources.client.urlstringYesPath to the ESM bundle (provider component)
resources.editor.urlstringNoPath to editor-specific bundle (mock/default data)
resources.contextSpecifier.hookstringYesThe exported hook name (e.g., useMyContext)
resources.contextSpecifier.moduleSpecifierstringNoAn identifier for the context module. Does not have to be an NPM package. Consumers import the hook from this name and declare it in contextDependencies

Child Component Dependencies

Consumer site components must declare the dependency (see Consumer Constraint above):

extensions.siteComponent({
  // ...
  resources: {
    client: {
      componentUrl: './extensions/my-component/component.tsx',
    },
    dependencies: {
      contextDependencies: ['my-package-name'],
    },
  },
});

The contextDependencies array references the moduleSpecifier from the context provider's contextSpecifier.

Complete Example

For a full working example including provider component, registration, consumer component, and consumer component rules, see EXAMPLES.md.

Editor Binding (Alternative Consumption)

Context can also be consumed via Editor Binding, where components receive context data as props without importing the hook. For details, examples, and manifest format, see EDITOR_BINDING.md.

Output Structure

src/extensions/{provider-name}/
├── extensions.ts         # Extension registration (exported, imported by src/extensions.ts)
└── provider.tsx          # Context provider component with hook

Code Quality Requirements

  • Strict TypeScript with no any types
  • Explicit return types for all functions
  • Proper null/undefined handling with optional chaining
  • Functional components with hooks
  • Use @wix/services-manager-react and @wix/services-definitions/core-services/signals for reactive state
  • SSR-safe code (no browser APIs at module scope)
  • Always set displayName on context and provider
  • No @ts-ignore comments. @ts-expect-error is only allowed for the generated moduleSpecifier import in consumer components
  • Use const/let (no var)

Troubleshooting

Error: arrayItems is missing arrayItems.item or arrayItems.dataItem with dataType

Cause: Mixed up the context array format with the data array format. The context section and data section use different types for array items.

Solution:

  • In context arrays — use arrayItems.item (a ContextItem)
  • In data arrays — use arrayItems.dataItem (a DataItem)

See the context vs data Array Format Difference section above and CONTEXT_PROVIDER_SPEC.md for full type definitions.

Reference Documentation

平台分布

Codex

33.92%
按下载量换算45

Claude

31.15%
按下载量换算41

Cursor

18.39%
按下载量换算24

Gemini CLI

9.95%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills