Skip to content

Aetheria-Labs1/storefront-skills / skills/optimize

optimize

Flagged

Score an existing Lexsis page against the same page-type, design, proof, offer, asset and copy rules used to build pages, propose improvements as a strict optimization plan with real replacement copy and asset decisions, wait for approval, then apply the approved changes with version protection and hosted QA.

FileKindSize
SKILL.mdskill md13.6 KB
agents/openai.yamlconfig499 B
references/ab-testing.mdmarkdown6.3 KB
references/ad-to-page.mdmarkdown1.3 KB
references/animation-system.mdmarkdown11.1 KB
references/anti-patterns/copy-anti-patterns.mdmarkdown12.2 KB
references/anti-patterns/cro-anti-patterns.mdmarkdown17.8 KB
references/anti-patterns/dark-patterns.mdmarkdown23.9 KB
references/anti-patterns/design-anti-patterns.mdmarkdown9.3 KB
references/anti-patterns/mobile-anti-patterns.mdmarkdown9.7 KB
references/asset-prep.mdmarkdown6.9 KB
references/assets/asset-sourcing-sequence.mdmarkdown12.2 KB
references/assets/generation-policy.mdmarkdown25.9 KB
references/assets/image-jobs-by-page-type.mdmarkdown31.8 KB
references/assets/imagery-by-vertical.mdmarkdown24.8 KB
references/assets/slot-spec.mdmarkdown20.2 KB
references/assets/video-rules.mdmarkdown17.6 KB
references/authoring/css-and-styling.mdmarkdown4.0 KB
references/authoring/source-authoring.mdmarkdown9.0 KB
references/blob-shapes.mdmarkdown1018 B
references/cart-composition.mdmarkdown7.2 KB
references/cart-profile-management.mdmarkdown17.1 KB
references/consumer-behavior-cro.mdmarkdown12.7 KB
references/conversion-psychology.mdmarkdown403 B
references/copy/copy-frameworks.mdmarkdown20.5 KB
references/copy/headline-and-cta-rules.mdmarkdown12.9 KB
references/copy/message-match.mdmarkdown9.2 KB
references/copy/voice-of-customer-mining.mdmarkdown10.9 KB
references/design-assets.mdmarkdown366 B
references/design-enrichment.mdmarkdown334 B
references/design-rules.mdmarkdown15.5 KB
references/evidence-led-cro.mdmarkdown1.2 KB
references/generate-bundle-page.mdmarkdown303 B
references/generate-collection.mdmarkdown555 B
references/generate-editorial.mdmarkdown366 B
references/generate-homepage.mdmarkdown280 B
references/generate-landing-page.mdmarkdown335 B
references/generate-listicle.mdmarkdown295 B
references/generate-pdp.mdmarkdown312 B
references/generation-protocol.mdmarkdown3.2 KB
references/industry-cro.mdmarkdown433 B
references/island-patterns.mdmarkdown380 B
references/islands/collection-grid/index.mdmarkdown5.4 KB
references/islands/collection-swipe/index.mdmarkdown4.1 KB
references/lexsis-design-capabilities.mdmarkdown6.2 KB
references/lexsis-mcp-contract.mdmarkdown14.2 KB
references/merchant-templates.mdmarkdown2.6 KB
references/module-authoring.mdmarkdown9.0 KB
references/offers/aov-levers.mdmarkdown17.0 KB
references/offers/campaign-calendar.mdmarkdown21.4 KB
references/offers/funnel-stages.mdmarkdown17.6 KB
references/offers/offer-ledger.mdmarkdown5.1 KB
references/offers/offer-stacking.mdmarkdown3.5 KB
references/offers/offer-strategy.mdmarkdown9.6 KB
references/offers/offer-types.mdmarkdown36.6 KB
references/offers/price-presentation.mdmarkdown18.0 KB
references/offers/urgency-scarcity.mdmarkdown17.5 KB
references/page-editing.mdmarkdown9.7 KB
references/page-files.mdmarkdown2.7 KB
references/page-types/_checklist-format.mdmarkdown11.1 KB
references/page-types/_index.mdmarkdown21.9 KB
references/page-types/ad-landing-page.mdmarkdown29.0 KB
references/page-types/advertorial.mdmarkdown28.2 KB
references/page-types/brand-story-founder.mdmarkdown20.6 KB
references/page-types/bundle-kit.mdmarkdown27.4 KB
references/page-types/collection-landing.mdmarkdown21.9 KB
references/page-types/comparison-us-vs-them.mdmarkdown24.5 KB
references/page-types/faq-support-led.mdmarkdown20.4 KB
references/page-types/gift-guide.mdmarkdown22.0 KB
references/page-types/homepage.mdmarkdown23.6 KB
references/page-types/ingredient-science.mdmarkdown28.3 KB
references/page-types/launch-waitlist-preorder.mdmarkdown28.1 KB
references/page-types/lead-capture-giveaway.mdmarkdown22.6 KB
references/page-types/listicle.mdmarkdown27.2 KB
references/page-types/lookbook-shop-the-look.mdmarkdown19.6 KB
references/page-types/offer-page.mdmarkdown25.8 KB
references/page-types/pdp-hybrid-landing.mdmarkdown31.1 KB
references/page-types/pdp.mdmarkdown32.8 KB
references/page-types/quiz-funnel.mdmarkdown26.2 KB
references/page-types/referral-loyalty-vip.mdmarkdown18.4 KB
references/page-types/restock.mdmarkdown23.3 KB
references/page-types/retargeting-warm.mdmarkdown24.9 KB
references/page-types/sale-clearance-flash.mdmarkdown25.0 KB
references/page-types/seasonal-gifting.mdmarkdown26.9 KB
references/page-types/seo-buyers-guide.mdmarkdown23.9 KB
references/page-types/subscription.mdmarkdown26.5 KB
references/page-types/thank-you-post-purchase.mdmarkdown19.7 KB
references/page-types/trial-sample.mdmarkdown24.4 KB
references/page-types/ugc-creator-collab.mdmarkdown27.5 KB
references/page-types/video-sales-page.mdmarkdown25.1 KB
references/page-types/wholesale-b2b.mdmarkdown24.2 KB
references/plan-page.mdmarkdown9.7 KB
references/product-grid.mdmarkdown2.0 KB
references/proof/before-after-and-claims.mdmarkdown19.2 KB
references/proof/numbers-and-counts.mdmarkdown16.0 KB
references/proof/press-and-media-mentions.mdmarkdown12.5 KB
references/proof/proof-ledger.mdmarkdown8.3 KB
references/proof/reviews-sourcing.mdmarkdown24.8 KB
references/proof/trust-badges-certifications.mdmarkdown21.8 KB
references/proof/ugc-rights-and-display.mdmarkdown16.0 KB
references/publishing.mdmarkdown2.4 KB
references/qa-recipe.mdmarkdown4.3 KB
references/quiz-authoring.mdmarkdown14.5 KB
references/resource-templates.mdmarkdown7.7 KB
references/scroll-patterns.mdmarkdown1.2 KB
references/source-artifact-workflow.mdmarkdown3.7 KB
references/styling-hooks.mdmarkdown7.8 KB
references/traffic-source-google.mdmarkdown1.6 KB
references/traffic-source-meta.mdmarkdown1.5 KB
references/traffic-source-tiktok.mdmarkdown1.5 KB
references/vertical-beauty.mdmarkdown1.8 KB
references/vertical-fashion.mdmarkdown1.7 KB
references/vertical-food.mdmarkdown1.6 KB
references/vertical-home.mdmarkdown1.7 KB
references/vertical-luxury.mdmarkdown1.6 KB
references/vertical-supplements.mdmarkdown1.7 KB
references/workflow-intent.mdmarkdown2.0 KB
references/workflows/_how-to-read.mdmarkdown2.7 KB
references/workflows/copy-workflow.mdmarkdown1.5 KB
references/workflows/island-selection-workflow.mdmarkdown4.8 KB
references/workflows/section-asset-workflow.mdmarkdown5.8 KB

references/cart-composition.md

View on GitHub
# Cart Profile Composition

A cart profile is a renderer-managed surface backed by a published profile.
Custom cart interactions, batch add flows, and controls selecting multiple
products use the documented `lx:cart:add-items` renderer command.

## Page contract

Cart V2 is enabled by default for every storefront. New source omits the
deprecated `use_cart_v2` compatibility field. Existing `true` values remain
valid; `false` fails validation because Cart V2 cannot be disabled.

The page must not contain `CartDrawer`, `DrawerShell`, or cart child islands.
The renderer resolves and injects the cart after the page sections.

Resolution order:

```text
page assignment > campaign assignment > store default > legacy fallback
```

Page metadata does not select a profile.

## Profile modules

The profile snapshot owns:

- Cart mode and responsive behavior
- Ordered layout modules
- Cart sections and rules
- Free-shipping progress
- Shopify selling-plan presentation
- Manual and Shopify-powered offers
- Checkout behavior
- Cart design settings and scoped CSS

Cart lines, order summary, and checkout are required. Optional modules include
shipping progress, purchase options, payment methods, and product offers.

## Offers and subscriptions

Offer placements:

- `header`
- `after_line`
- `after_lines`
- `before_checkout`

Manual offers use Shopify product GIDs. Recommendation offers use Shopify
`RELATED` or `COMPLEMENTARY` intent.

Selling-plan options are line-item capabilities. A profile can choose cards or
a select menu, but it cannot make an ineligible product subscribable.

## Trigger protocol

Add-to-cart controls and the site header emit `cart:open`. The hydrator bridges
DOM events into the cart event bus. The injected `DrawerShell` listens for the
event and lazily hydrates its children on first open.

Use the selected island's supported cart trigger for normal product controls.
For a custom interaction that owns a dynamic product selection, use the
renderer-managed `lx:cart:add-items` command instead of hidden BuyBoxes,
programmatic clicks, or a parallel Shopify/cart mutation. This is the custom
cart and batch add contract for controls that select multiple products.

See `references/module-authoring.md` for a complete compiler-tested upsell,
including its registered add control and request-scoped state handling.
Dispatch from `section`, the `[data-cart-custom-module="<id>"]` wrapper.
Responses return to that wrapper and bubble: `lx:cart:add-items:pending`,
`:accepted`, `:confirmed`, `:success`, and `:error`. Listen on the wrapper and
filter by requestId; a listener on an authored child section will not receive
an event dispatched from its parent.

No trigger should carry or infer a profile ID.

## Styling

Page `theme_css` provides brand defaults. Cart profile design values and
`custom_css` apply only under the cart profile root.

Custom CSS is sanitized and scoped at render time. Do not put profile CSS in
page sections or page metadata. See `references/styling-hooks.md` for the full
part map and inline-style exceptions.

## Patch and module identity contract

- `custom_css` replaces all CSS, including named blocks; null clears it.
  Use `css_ops` to upsert/remove named blocks without resending other blocks.
- `design_patch` is JSON Merge Patch: omitted fields remain, null removes a
  stored override, arrays replace arrays. Removing an override can expose a default.
- `composition_ops.upsert` with source replaces the whole module source.
  Omit source to preserve it during visibility/placement changes.
  New modules honour `before_module_id` or `after_module_id` on the first upsert.
  Without an explicit region, the module inherits its anchor's region,
  including header and before-checkout offer placements.
- `data-module` equals the layout ID, including `offer-<uuid>` and custom IDs.
  `data-module-type` equals the layout type, such as `product_offer` or `custom`.
  Generated sections before `default@13` used `data-module="product-offer"`;
  recompile a draft to get consistent IDs. After-line offers repeat their slot
  ID under each qualifying line; use the line group to distinguish instances.
- Layout enabled flags are authoritative; offer-slot enabled flags are mirrored.
  Disabled optional modules are absent. `visible_when` keeps a module mounted
  with `hidden` while its cart-state predicate is false.

Built-in module DOM is identical in the sandbox and published renderer:
`[data-module="cart-lines"] [data-lx-island-runtime] > [data-part="root"]`.
The island can share its module frame or sit inside it. Use a module descendant
selector, or explicitly include the runtime wrapper in child
selectors. Gift rows follow paid rows.

Reward messages accept `{remaining}`, `{next_title}`, `{threshold}`,
`{unlocked_title}` and `{unlocked_list}`. Amounts are formatted money; unlocked
titles describe applied rewards and are empty before the first application.
`{reward_title}` is the triggering reward's title in `toast.template` only.
Use `{unlocked_title|Your rewards}` for a literal fallback, or
`{#if unlocked}{unlocked_title} unlocked. {/if}{remaining} more gets you {next_title}.`
for an optional clause. Conditional blocks cannot nest.

`compact_bar` applies state `text_color` to icons and labels and state
`border_color`/`background` to dots. Labels, icons and dots expose `data-state`.
Summary copy exposes separate `subtotal-label` and muted `subtotal-hint` spans.

Celebration particles start at the unlocked dot (or panel top). Cart scope
stays in the panel; viewport scope renders above the sheet and overlay.
Toasts fit the panel and clear close controls. Positions are `top` (below the
header), `bottom`, `above_header` (falls below the header when no space).
`toast.duration_ms` overrides the inherited celebration duration.

## Current cart workflow

The recent cart changes include paid-price reward eligibility/readiness,
page-to-cart CSS isolation, typed settings that reach the DOM, custom module
snapshots/commands/conditions, approved MCP lifecycle and promotion writes,
and compact edits with signed sample carts. The type-only component cleanup
adds no authoring API. Local source support does not upgrade an immutable
published runtime: verify the deployed capability/schema and preview.

Read `references/cart-profile-management.md` for the create, design, promotion,
preview, approved publish and rollback flow. `lexsis_cart.promotions` accepts a
profile ID alone and infers the store. Use `lexsis_discover` with
`query:"publish cart"` for up to 10 ranked results (schemas for the top 3), or
exact router/action discovery for an authoritative schema.

## Anti-patterns

| Anti-pattern | Correct behavior |
|---|---|
| Inline `DrawerShell` on a storefront page | Remove it and configure the effective profile |
| Cart selected through title or SEO metadata | Use a page assignment |
| Agent publishes a draft automatically | Review the exact draft; publish through approved `lexsis_live_ops.cart_publish` or the app |
| Fabricated products or selling plans | Use real store catalog data |
| Page-wide selectors in cart CSS | Use profile-scoped CSS |
| Hidden BuyBox plus `.click()` for a custom selection | Dispatch `lx:cart:add-items` from the registered section control |
| Direct `/cart/add.js` or Storefront API request | Let the renderer perform the managed GraphQL cart mutation |
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall