site-management

작성자: wix

Wix 사이트 선택 및 전환을 관리합니다. 액세스 토큰 권한에 따라 Wix API에서 사이트를 동적으로 가져옵니다.

npx skills add https://github.com/wix/wix-ecom-cowork --skill site-management

Site Management Skill

Purpose

Dynamically fetch and manage Wix sites that the user's access token has permission for. No pre-configuration needed!

Core Concepts

One Token, All Sites

A single WIX_ACCESS_TOKEN (from app installation) can access ALL sites in that Wix account. No need to configure sites manually!

Dynamic Site Discovery

On first use, call the Wix API to get all sites the token has access to. Cache this list for the conversation.

In-Chat Site Selection

User can switch sites anytime by saying "connect to site 3" - no restart needed!

API: List User's Sites

Endpoint: GET https://www.wixapis.com/v1/sites

Headers:

Authorization: {ACCESS_TOKEN}
Content-Type: application/json

Full curl command:

curl -X GET "https://www.wixapis.com/v1/sites" \
  -H "Authorization: ${WIX_ACCESS_TOKEN}" \
  -H "Content-Type: application/json"

Response:

{
  "sites": [
    {
      "siteId": "331d0c05-2ab0-4edb-91a6-4078c7e500b9",
      "siteName": "Joe's Surf Shop",
      "url": "https://joesurfshop.com",
      "namespace": "wix",
      "isActive": true
    },
    {
      "siteId": "d3942804-aa4a-4d96-909b-57867c27e8ff",
      "siteName": "Jane's Boutique",
      "url": "https://janesboutique.com",
      "namespace": "wix",
      "isActive": true
    }
  ]
}

Workflow

First Time Use

  1. Check if site selected (read from ~/.claude/wix-selected-site.json)
  2. If no site: Automatically fetch and display site list
  3. User selects: "connect to site 2"
  4. Save selection to ~/.claude/wix-selected-site.json
  5. Proceed with the user's original request

Switching Sites

User can switch anytime:

User: "Show me my sites"
Claude: [Calls API, displays numbered list]

User: "Connect to site 3"
Claude: [Saves selection] ✓ Connected to: Jane's Boutique

User: "Show me products"
Claude: [Uses site 3 for API calls]

Site Selection Storage

File: ~/.claude/wix-selected-site.json

Format:

{
  "siteId": "d3942804-aa4a-4d96-909b-57867c27e8ff",
  "siteName": "Jane's Boutique",
  "selectedAt": 1708598400000,
  "url": "https://janesboutique.com"
}

Functions:

const { getSelectedSite, saveSelectedSite } = require('../lib/site-storage');

// Get current selection
const site = getSelectedSite();

// Save new selection
saveSelectedSite(siteId, siteName, url);

Display Format

When showing sites to user:

Your Wix Sites:

1. Joe's Surf Shop
   ID: 331d0c05-2ab0-4edb-91a6-4078c7e500b9
   URL: joesurfshop.com
   Status: Active

2. Jane's Boutique
   ID: d3942804-aa4a-4d96-909b-57867c27e8ff
   URL: janesboutique.com
   Status: Active

3. Test Store
   ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890
   URL: teststore.com
   Status: Active

To connect to a site, say: "connect to site 2"

Always Show Active Site

CRITICAL: Before ANY response involving store data, display:

[Site: Jane's Boutique]

This ensures user always knows which store they're working with.

Error Handling

No access token configured

Error: WIX_ACCESS_TOKEN not found.

Please configure in Claude Desktop:
1. Settings → Browse Plugins → wix-store-optimizer
2. Click "Customize"
3. Add: WIX_ACCESS_TOKEN = (your token from app installation)
4. Save and restart Claude

API call fails

Unable to fetch sites. Please check:
- Access token is valid
- Token hasn't expired
- You have permission to view sites

Create a new API key: https://manage.wix.com/account/api-keys

No sites found

No sites found for this access token.

Make sure:
- You installed the app on at least one site
- The token is from the correct Wix account

Common Patterns

Check if Site Selected

# Read selection file
cat ~/.claude/wix-selected-site.json 2>/dev/null

If empty/missing → Show site list

Get Site Name for Display

# Extract site name from selection
SITE_NAME=$(cat ~/.claude/wix-selected-site.json | jq -r '.siteName')
echo "[Site: $SITE_NAME]"

Save User's Selection

# After user says "connect to site 2"
# Get site 2 from the fetched list, then save:
echo '{"siteId":"d3942804...","siteName":"Jane's Boutique","selectedAt":...}' > ~/.claude/wix-selected-site.json

Integration with Commands

Every command should:

  1. Check selection:

    SELECTED_SITE=$(cat ~/.claude/wix-selected-site.json 2>/dev/null)
    
  2. If empty: Run site selection flow

  3. Extract site ID:

    SITE_ID=$(echo "$SELECTED_SITE" | jq -r '.siteId')
    SITE_NAME=$(echo "$SELECTED_SITE" | jq -r '.siteName')
    
  4. Display site name:

    [Site: $SITE_NAME]
    
  5. Use in API calls:

    curl ... -H "wix-site-id: $SITE_ID"
    

Benefits

✅ No manual site configuration - Fetched automatically ✅ Works with unlimited sites - Not limited to 3 ✅ Easy switching - "connect to site 5" ✅ Always up-to-date - Fetches latest site list ✅ One token - Access all sites in account ✅ No restart needed - Switch sites in chat

This is MUCH better UX than pre-configuring sites! 🎉

wix의 다른 스킬

wds-docs
wix
Wix 디자인 시스템 컴포넌트 참조. @wix/design-system으로 UI를 구축하거나, 컴포넌트를 선택하거나, props와 예제를 확인할 때 사용합니다. "what…"에서 트리거됩니다.
rp-source-wordpress
wix
WordPress 및 WooCommerce 소스 어댑터: REST 캡처, 인증, 페이지네이션 및 코드 생성을 위한 읽기 계약. 소스 플랫폼이 WordPress 또는...인 경우 사용합니다.
rp-execute-setup
wix
가져오기 전에 필요한 Wix 측 설정을 확인하고 프로비저닝합니다. setup-requirements.md를 대상에 대해 검증하거나 실행해야 할 때 코드 생성 후에 사용합니다…
wix-manage
wix
Wix 비즈니스 솔루션 관리 레시피 — Wix 비즈니스 솔루션을 구성하고 관리하기 위한 REST API 작업입니다. 스토어, 예약, 결제, CMS 등으로 연결됩니다.
rp-orchestration
wix
RePlatform 소스에서 Wix로의 마이그레이션을 마이그레이션 프로젝트 아티팩트를 검사하여 다음 워크플로 단계로 라우팅합니다. 마이그레이션을 시작, 계속 또는 복구할 때 사용합니다.
rp-mapper
wix
발견된 소스 엔티티와 필드를 Wix 대상에 매핑하고 손실 정도를 문서화합니다. discovery 이후 mapping-plan.md와 mapping-summary.md를 작성할 때 사용합니다.
rp-target-wix
wix
Wix 타겟 어댑터로, 검증된 쓰기 프리미티브(wix-writers.js)와 계약 테스트를 포함합니다. Wix 라이터를 벤더링하거나, API 형태를 검증하거나, Wix…
interactor
wix
Interact — @wix/interact — 선언적 상호작용 라이브러리를 설치, 통합 및 구성하여 호버/클릭/뷰 트리거, 스크롤 기반 등을 추가하거나 편집합니다.