Aetheria-Labs1/storefront-skills / skills/optimize
optimize
FlaggedScore 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.
references/generation-protocol.md
View on GitHub# Compile and draft protocol
House rules in `references/design-rules.md` govern the
presentation. The source contract is `references/authoring/source-authoring.md`;
`references/source-artifact-workflow.md` owns artifact and manifest state.
Choose section order from the page-type contract, not from this protocol.
## Fast draft (new page)
1. Reuse the saved setup: workspace, store and `theme_id`; do not re-ask.
2. Resolve products with `lexsis_catalog.list` (query) then
`lexsis_catalog.get` (`product_ids`), and assets from the bound library.
3. Compose complete source, compile it with `lexsis_pages.compile`, and fix
every `validation_issues` entry (`section_id` names the offending section).
4. Create exactly one unpublished draft with `lexsis_page_create.create`
(`compile_id`, `publish: false`) and return its preview URL and version
as `DRAFT_CREATED`.
Changes to a page that already exists never create a new page: follow
`references/page-editing.md`.
## Compile exact inputs
1. Reuse the bound workspace, store and theme; read current page context for
edits through `lexsis_pages.edit_context` and editable source through
`lexsis_pages.source` or `lexsis_pages.section_source`.
2. Prepare complete source and any page-wide theme CSS as values, not
mandatory files. Resolve only the interactive
decisions through `references/workflows/island-selection-workflow.md`.
3. Call `lexsis_pages.compile` with the exact `source`, `head`, `theme_css`
and optional `scripts` inputs. `lexsis_pages.compile_artifact` retrieves
an existing result by `compile_id` for inspection; it does not compile.
4. Read all `validation_issues` (check + section id), `validation_errors`,
publish validation and missing utility candidates. Repair the source rather than mutating compiled JSON.
5. Save the successful response and input hashes as compile evidence.
## Create or edit one draft
Create a new draft in the write mode from `lexsis-mcp-contract.md` (Write
Path): `npx @lexsis/cli new` in CLI mode, `lexsis_build.commit` with `create`
inline. `lexsis_page_create.create` with `compile_id` and `publish: false` is
the fallback only when `lexsis_build` is unavailable. Every later change goes
through `lexsis_build` (CLI `pull`/`push`, or inline `get` then `patch` or
`commit` with only the changed files and `base_version`), as
`references/page-editing.md` describes. The V1
`lexsis_drafts` section actions are a fallback for servers without
`lexsis_build`; `page_update_head` still owns `theme_css`.
On a version conflict, read the latest context and reconcile; do not overwrite
blindly. Return the hosted draft URL and exact version as `DRAFT_CREATED`.
## Review and release boundary
A clean compile is structural evidence, not a visual pass. Hosted design
review and commerce checks follow `references/qa-recipe.md`. `DRAFT_CREATED`
may leave review pending; `DESIGN_APPROVED` cannot be claimed without hosted
review evidence. Publication follows `references/publishing.md` and requires
explicit authorization. Report the exact state and do not equate draft
creation, approval, publication, and live HTTP verification.
The exact mutually exclusive creation inputs and hosted verification
are owned by `references/source-artifact-workflow.md`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |