Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

product-data-modelingproduct 数据 modeling

Agent Skill

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

总安装

449

周安装

18

GitHub Stars

19

下载量

145
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill product-data-modeling

简介

用于辅助数据整理、表格处理和指标计算。

  • 适合让 Agent 清洗字段、product-data-modeling 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 汇总数据、发现异常或生成统计口径。
  • 使用时需确认数据来源和时间范围, 涉及敏感数据应先确认脱敏边界。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Product Data Modeling

Overview

Every platform has its own product data model — Shopify uses products with variants and metafields, WooCommerce uses products with attributes and custom fields, and BigCommerce uses products with options and custom fields. Understanding your platform's model and fitting your catalog into it correctly prevents data quality problems and import failures. Only build a custom data model if you're building a headless storefront from scratch.

When to Use This Skill

  • When designing a product catalog structure for a new store on an existing platform
  • When adding variant support (size, color, material) to existing products
  • When implementing custom attributes for faceted filtering
  • When modeling product relationships (bundles, cross-sells, accessories)
  • When importing products from a PIM or ERP into the platform's model

Core Instructions

Step 1: Understand your platform's core data model

PlatformProductVariantsCustom AttributesRelationships
ShopifyProduct + up to 3 Options, up to 100 VariantsPer-variant: price, SKU, inventory, weight, imageMetafields (standard or custom namespaces)Collections, cross-sell via apps
WooCommerceProduct (Simple, Variable, Grouped, External)Per-variation: price, SKU, stock, attributesCustom product attributes + WooCommerce custom fieldsUpsells, cross-sells (built-in), grouped products
BigCommerceProduct with Options and Option SetsPer-variant (modifier/option combination): price, SKU, stockCustom fields per productRelated products, bundled products
Custom / HeadlessDesign from scratch with PostgreSQL/MongoDBFull control over schemaEAV or JSONB for flexible attributesJunction tables for relationships

Step 2: Platform-specific modeling


Shopify

Core structure:

  • Product: title, description, vendor, product_type, tags, images
  • Options: up to 3 (e.g., Size, Color, Material) — defines the axes of variation
  • Variants: one per combination of option values — each has its own price, SKU, inventory, weight
  • Metafields: custom data per product or variant (e.g., care instructions, sizing guide URL, technical specs)

Modeling decisions:

  1. Product vs. Variant: Put a product into a single product record if customers compare the options side-by-side on one page. Create separate product records for fundamentally different products that happen to share a name.
  2. Option naming: Shopify limits you to 3 options per product. If you need more (e.g., Size + Color + Material + Length), consider combining two options (e.g., "Size/Width") or using metafields for the 4th dimension.
  3. Metafields for custom attributes: Go to Settings → Custom data → Products to create metafield definitions. Use metafields for attributes that:

- Don't affect price or inventory (those belong on variants) - Are product-specific custom data (care instructions, certifications, dimensions) - Need to be displayable in your theme or filterable via a search app

  1. Product types and tags: Use product_type for the primary merchandise category (e.g., "Dress", "Running Shoe") and tags for cross-cutting attributes (e.g., color-navy, occasion-formal, material-cotton).

Example product structure for a shirt:

  • Product: "Organic Cotton T-Shirt"
  • Options: Size (XS, S, M, L, XL), Color (White, Black, Navy)
  • Variants: 15 combinations (5 sizes × 3 colors), each with SKU and inventory
  • Metafields: care_instructions, material_weight_gsm, sustainability_cert

Bulk field updates via Matrixify:

  • Export products to see all supported columns
  • Edit in spreadsheet, re-import to update any field in bulk including metafields

WooCommerce

Product types:

  • Simple: one SKU, one price — use for products with no variants
  • Variable: multiple variations based on attributes — use for products with size, color, etc.
  • Grouped: a collection of simple products shown together — use for product families
  • External/Affiliate: linked to an external URL — for affiliate products
  • Virtual: no shipping — for services, subscriptions
  • Downloadable: digital products

Attributes and variations:

  1. Go to Products → Attributes to define global attributes (shared across all products):

- Add attribute: Color with values: Red, Blue, Black, White - Add attribute: Size with values: XS, S, M, L, XL - Check Enable archives to make the attribute browseable

  1. On a Variable product, go to Attributes tab:

- Select your global attributes and check which values apply to this product - Go to Variations tab → Generate variations from all combinations

  1. Per-variation settings: set a unique price, SKU, stock, image, and weight for each variation

Custom fields (product metadata):

For attributes that aren't variants (e.g., technical specs, certifications):

  • Use WooCommerce's built-in Custom Attributes on the Attributes tab (non-variation attributes)
  • Install Advanced Custom Fields (ACF) for more structured custom field management
  • Install Product Add-Ons for customer-input fields (engraving, personalization)

Product relationships (built-in):

  • Upsells: Go to Linked Products tab → Upsells — shown on the product page
  • Cross-sells: listed in the cart — add under Linked Products tab → Cross-sells
  • Grouped products: use the Grouped product type to link related simple products

BigCommerce

Core structure:

  • Product: title, description, brand, categories, weight, images
  • Options: define the axes of variation (Size, Color, Material)
  • Option Sets: reusable groups of options assigned to multiple products
  • Variants (SKUs): combinations of options — each has a unique SKU, price adjustment, weight, and stock
  • Custom fields: free-form name/value pairs for additional product data

Modeling decisions:

  1. Go to Products → Option Sets to create reusable option sets (e.g., "Clothing Sizes" with XS–3XL) — assign the same set to multiple products instead of recreating options per product.
  2. For products with large variant counts: BigCommerce supports up to 600 SKUs per product. Use Bulk Pricing to set price rules that apply to variant groups rather than pricing each variant individually.
  3. Custom fields: Go to Products → [Product] → Custom Fields tab to add structured attributes like Material, Care Instructions, Warranty Period. These display in the product detail page and can be used for search.
  4. Modifier options (customer-configurable at purchase): Use for personalization (engraving text, color choice that doesn't affect stock). Different from variants — modifiers don't generate separate SKUs.

Custom / Headless

For headless storefronts, design the core schema around the product-options-variants pattern:

-- Core product tables (PostgreSQL)
CREATE TABLE products (
  id            UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  slug          VARCHAR(255) UNIQUE NOT NULL,   -- URL-safe handle
  title         VARCHAR(500) NOT NULL,
  description   TEXT,
  vendor        VARCHAR(255),
  product_type  VARCHAR(255),
  status        VARCHAR(20) DEFAULT 'draft' CHECK (status IN ('active', 'draft', 'archived')),
  tags          TEXT[] DEFAULT '{}',
  created_at    TIMESTAMPTZ DEFAULT now(),
  updated_at    TIMESTAMPTZ DEFAULT now()
);

-- Variants — one per purchasable combination
CREATE TABLE product_variants (
  id            UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  product_id    UUID NOT NULL REFERENCES products(id) ON DELETE CASCADE,
  sku           VARCHAR(255) UNIQUE,
  title         VARCHAR(500) NOT NULL,  -- e.g., "Red / Large"
  price         NUMERIC(10,2) NOT NULL,  -- Use NUMERIC, not FLOAT, to avoid rounding errors
  compare_at_price NUMERIC(10,2),
  cost_price    NUMERIC(10,2),
  weight        NUMERIC(8,2),
  inventory_quantity INTEGER DEFAULT 0,
  track_inventory BOOLEAN DEFAULT true,
  option1_value VARCHAR(255),  -- Denormalized for query performance
  option2_value VARCHAR(255),
  option3_value VARCHAR(255),
  position      INTEGER DEFAULT 0
);

-- Options and values — define the variation axes
CREATE TABLE product_options (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  product_id  UUID NOT NULL REFERENCES products(id) ON DELETE CASCADE,
  name        VARCHAR(255) NOT NULL,  -- "Color", "Size"
  position    INTEGER DEFAULT 0,
  UNIQUE(product_id, name)
);

-- Flexible attributes via JSONB (alternative to EAV for custom attributes)
ALTER TABLE products ADD COLUMN attributes JSONB DEFAULT '{}';
-- Query example: SELECT * FROM products WHERE attributes->>'material' = 'cotton';
-- Index for common attribute lookups:
CREATE INDEX idx_products_attributes ON products USING GIN(attributes);

-- Product relationships
CREATE TABLE product_relationships (
  source_product UUID NOT NULL REFERENCES products(id) ON DELETE CASCADE,
  target_product UUID NOT NULL REFERENCES products(id) ON DELETE CASCADE,
  relationship   VARCHAR(50) NOT NULL CHECK (relationship IN ('cross_sell', 'upsell', 'related', 'accessory')),
  position       INTEGER DEFAULT 0,
  UNIQUE(source_product, target_product, relationship)
);

TypeScript types matching this schema:

interface Product {
  id: string;
  slug: string;          // URL handle — stable identifier
  title: string;
  description: string;
  vendor: string;
  productType: string;
  status: 'active' | 'draft' | 'archived';
  tags: string[];
  attributes: Record<string, string | number | boolean>;  // Flexible custom attributes
  variants: ProductVariant[];
  images: ProductImage[];
}

interface ProductVariant {
  id: string;
  sku: string;
  title: string;         // Auto-generated: "Red / Large"
  price: number;         // In cents to avoid floating-point errors
  compareAtPrice?: number;
  costPrice?: number;
  inventoryQuantity: number;
  trackInventory: boolean;
  option1Value?: string;
  option2Value?: string;
  option3Value?: string;
}

Step 3: Plan for product relationships

Every platform supports product relationships for cross-selling and upselling. Configure them to increase AOV:

Upsells: Higher-value alternatives to the product the customer is viewing — shown on the PDP

  • "You're looking at the standard version — upgrade to Pro for $20 more"

Cross-sells: Complementary products — shown in the cart

  • "Customers also bought these accessories with this product"

Related products: Similar products at similar price points — shown at the bottom of the PDP

  • "You might also like these"

For Shopify: configure under Products → [Product] → More details section; or use a cross-sell app for automated suggestions.

For WooCommerce: configure under the Linked Products tab on each product.

Best Practices

  • Store prices as integers (cents) in custom builds — $29.99 stored as 2999 eliminates floating-point rounding errors
  • Always separate products from variants — even single-variant products should have one variant row for consistent cart and order logic
  • Use slugs for URLs, IDs for internal references — slugs are human-readable for SEO; UUIDs prevent enumeration attacks
  • Use product type and tags for filtering, not separate products — "Blue Dress" and "Red Dress" should be variants, not separate products
  • Metafields/custom fields for non-variant data — attributes that don't affect price or stock belong in metafields, not as variants
  • Test variant combinations before going live — verify that all purchasable combinations appear correctly in the storefront variant selector

Common Pitfalls

ProblemSolution
Variant explosion (5 colors × 8 sizes × 3 materials = 120 variants)Shopify caps at 100 variants per product; consider using metafields for the third option axis if most combinations aren't stocked separately
Custom attributes not appearing in product searchIn Shopify: make metafields searchable in your theme or search app settings; in WooCommerce: enable "Used for variations" on attributes you want indexed
Product type and tags inconsistent across the catalogEstablish a controlled vocabulary for product types and tags before importing; use Matrixify or WP All Import to standardize in bulk
Variant images not switching when size/color is selectedAssign variant-specific images in the platform admin; variants need their own image, not just the product-level image, to trigger the swap

Related Skills

  • @variant-matrix
  • @catalog-import-export
  • @product-categorization
  • @product-content-enrichment

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.72%
按下载量换算50

Claude

28.39%
按下载量换算41

Cursor

19.75%
按下载量换算29

Gemini CLI

9.23%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills