store-add-product

Installation
SKILL.md

Store Catalog Management (add / edit / delete products)

Playbook for managing any store repo's catalog through its committed CLI scripts/add-product.mjs. All store specifics (language, sizes, collections, image conventions, tone) are discovered at runtime — never trust remembered values. Never mutate the catalog file, funnel config, or product images by hand; every change goes through the CLI.

1. Detect the store

  • The target repo must contain scripts/add-product.mjs; verify with ls.
  • If absent: stop, explain the add-product CLI convention, and offer to bootstrap the store's script from this skill's reference/ directory (copy add-product.mjs + catalog/ and follow reference/ADAPTATION.md). Once bootstrapped (verified with --help and capabilities --json), resume below.
  • If the script predates the management commands (nothing under scripts/catalog/, no capabilities support), treat it as add-only: do not mutate the catalog any other way — explain the limitation and offer to upgrade the store's script from the bundled reference (section 8).

2. Discover the contract (always first)

  • Run node scripts/add-product.mjs --help then node scripts/add-product.mjs capabilities --json (cwd = repo). capabilities is authoritative: schemaVersion, supported commands and flags, editable fields, collections, tags, the product list, upsell status, and the current catalog revision (SHA-256).
  • list --json gives ids/slugs/names with colors and sizes; show <id-or-slug> --json gives the full current product JSON.
  • Read the store's types file (commonly lib/types.ts) for collection slugs and the size model, and the catalog file (commonly lib/data/products.ts) for insertion style and brand tone. Never assume baby sizes, French, or any store-specific detail (a shoe store: sizes 39-45, different collections).
  • Record the revision reported by show/capabilities — it is the --expected-revision value for guarded writes.

3. Command and flag contract

Installs
2
Repository
aammo1/sk
First Seen
6 days ago