/prestashop-upgrade-toolbox:prestashop-upgrade-toolbox-themefrom prestashop-upgrade-toolbox
Recreates a PrestaShop 1.6/1.7 storefront as a hummingbird child theme on PrestaShop 9. Captures old pages as HTML specs, validates with the merchant, then builds Smarty templates and CSS with fidelity checks against the original shop.
Ships in prestashop-upgrade-toolbox. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Shared context and conventions: prestashop-upgrade-toolbox-core. The audit's workstream D (the
theme actually served, diffed against vanilla, and "what the new front must reproduce") is the
input of this skill; the modules decisions (02-modules.md) say which blocks still exist.
Dossier: write as you go in migration/03-theme.md, and what a reader must know in
migration/page/03-theme.html (prestashop-upgrade-toolbox-core, "The migration dossier").
Scope: PrestaShop 9 and hummingbird. The new front is a child theme of hummingbird, the default theme of PrestaShop 9 (Bootstrap 5.3). A 1.6 or 1.7 theme cannot be ported: its templates, its hooks and its JavaScript belong to the old core. It is read, never copied.
The old shop is the merchant's own. What it shows is reproduced, not reinterpreted:
| What | Rule |
|---|---|
| Structure and chrome: header, menu, footer, home sections, category, product and CMS layouts | faithful to the validated HTML template, itself faithful to the old shop |
| Palette and fonts | taken from the old shop (identity.json), verbatim; a derived shade is written as derived |
| Content: products, categories, CMS pages, logo, images | already there — the transplant brought the data, the images follow the files. Never rewritten |
| Texts the old theme hard-coded (reassurance, footer blocks, labels) | carried word for word, in every selling language |
| A behaviour the new core does differently (cart, checkout, faceted search, account) | the new core's, restyled — never a rewrite of the buy funnel |
03-theme.md.On the staging, after the transplant and the modules: the theme renders what the modules hook,
so it is reproduced on the shop that has them. The theme's files are code: a folder of the
shop's project (themes/<name>/), versioned, deployed like the rest. Its database state — the
shop's theme_name — is replaced by every reload of the database: child_theme.py enable is a
replay step of the day (cutover-runbook.md), run after the transplant on the rehearsal and on
the new production. Nothing of the theme is set by hand in the back office.
Light by default. One shop, one theme: the path below. Heavier only when the old shop is a
multistore whose shops have different themes: one capture, one HTML template set and one child
theme per theme, and the trigger written in 03-theme.md.
From the reference environment — the local copy that runs (prestashop-upgrade-toolbox-audit) —
never the production. Pick one page per template, the same names on every capture: home, a
category with products and facets, a product with combinations, a cms page; add the ones
the audit's workstream D lists (a manufacturer page, a landing page, the contact form).
python3 scripts/browser.py check # a local Chrome or Chromium answers
python3 scripts/capture.py --base <reference URL> --out migration/theme/reference \
--pages "home=/ category=/3-… product=/1-….html cms=/content/4-…"
A shop for professionals hides prices and the add-to-cart button from visitors: capture its pages
logged in as a test customer of the reference copy (--cookie-file, a *.local.* file holding the
session's Cookie header), and check the staging the same way. A home built with a page builder is a
decision before the templates (references/reproduction-method.md).
Full-page screenshots, desktop and mobile; measures.json (the form of each page) and
identity.json (background colours by area, text, link and button colours, header and footer
colours, fonts by characters and the web fonts loaded). A page that answers an error or holds
almost no text is marked not ok — the capture ends incomplete, never taken as the spec. A
capture is never written over.
Then write, in 03-theme.md, the signature list: what makes these pages this shop's — header
bars and their order, logo position, menu style, the home's sections in order, the product page's
layout, the footer's columns, the corner radius, the button style. Each later step is checked
against it. Method: references/reproduction-method.md.
One self-contained HTML file per captured page (migration/theme/templates/home.html, …):
header, menu and footer included, everything inline, the palette and fonts as --v-* tokens
taken from identity.json, the shop's real texts. Cheap to change, nothing of Smarty yet.
python3 scripts/capture.py --base file://$PWD/migration/theme/templates/ \
--out migration/theme/templates-r1 --pages "home=home.html category=category.html …"
python3 scripts/measure_page.py compare --reference migration/theme/reference/measures.json \
--target migration/theme/templates-r1/measures.json
Fidelity loop, three rounds at most: look at each template's render next to the old page,
list what differs from the signature list, fix at most three things, capture again
(templates-r2…). Then show the merchant the old page and the template side by side, page by
page. The validated templates are the spec; the merchant's approval is dated in
03-theme.md. A layout the merchant wants changed is changed here, never during the restitution.
python3 scripts/child_theme.py scaffold --dir themes/<name> --display-name "<Shop name>"
The skeleton: config/theme.yml (top-level keys only), assets/css/custom.css with the two
colour levels hummingbird needs, one template per page carrying its marker data-mt-page. Read
the parent's templates on the target before overriding a block (block names move between
hummingbird versions), then transpose the validated templates:
{widget name='…'}, {hook h='…'}), each guarded so an empty module folds its whole section;{block … append|prepend}); the buy block is never rewritten;product_list_header owned whole if the layout differs;_partials/ overrides, module templates under
themes/<name>/modules/<module>/…;{$urls…}, {url entity=…}), assets relative, fonts self-hosted
in the theme.Details, and the traps that cost a 500 or an invisible element: references/restitution.md, references/hummingbird-gotchas.md, references/palette.md.
python3 scripts/child_theme.py lint --dir themes/<name> --palette "#…,#…"
clean before every deploy: no absolute URL to another host (the old domain, the reference copy,
a localhost), every palette colour in custom.css verbatim, the button colours set at component
level.
python3 scripts/child_theme.py deploy --dir themes/<name> --root <staging root> \
--shell-cmd "<SHELL_CMD of the staging profile>" [--owner www-data]
python3 scripts/child_theme.py enable --name <name> --php-cmd "<PHP_CMD>" --root <staging root>
deploy replaces the theme's folder and purges the compiled templates; enable switches the shop,
with the ThemeManager fallback when the console dies on the language context, and re-hooks the
modules by the theme's hook map (global_settings of theme.yml): a child that keeps
hummingbird's map moves the old shop's menu, reassurance or category tree wherever hummingbird
puts them. What the front needs in the database — menu entries, footer link blocks, a module's
display settings — is one idempotent replay script, run after enable. All three are the commands
the runbook replays on the day (references/restitution.md).
Capture the staging with the same page names (migration/theme/staging-r1, …), then:
measure_page.py compare against the old shop's measures: the hierarchy of
titles, the rhythm of the bands, the corner radius, the image ratios, no horizontal scroll, one
<h1>. At most three changes per round, a round that makes the comparison worse is reverted,
and a clean comparison ends the loop: no change is made to look busy.Then the blind review: write your own review first, ask the merchant's impression without
showing it, then confront both. The quality bar every page must clear (contrast, one <h1>,
375 px, recolour reaching the native modules):
references/quality-bar.md. Method of both loops and of the review:
references/polish.md. Each round is a line of 03-theme.md.
dossier.py run --step 03-theme runs the two rows of 03-theme.md, once their … are filled
with this theme's values:
child_theme.py lint → clean;verify_theme.py on the staging → ok: the child theme served, every page's marker, one
<h1>, no asset loaded from the old domain or the reference copy, the logo and favicon answering
(and not the target's defaults when a vanilla install is given), the palette in the served CSS,
the add-to-cart button in a palette colour, no sideways scroll at 375 px. An asset of the
content served by the old domain (a blog feed, a CMS image) fails with its folder: the theme
cannot change it. Decide it with the merchant — it keeps working if the domain stays — write it
in 03-theme.md, and allow that folder only (--allow-asset). The theme's paths in the gate
rows are relative to the dossier (../themes/<name>).Screenshots are the merchant's material, not a proof (prestashop-upgrade-toolbox-core): the merchant's
approval of the rendered staging is dated in 03-theme.md, next to the gate.
captured, the signature list written, the purchased-theme question
answered;lint clean, deployed and enabled on the
staging by the scripts, never by hand;measure_page.py compare result cited, every gap decided;verify_theme.py at STATUS: ok on the staging, its log cited, the merchant's approval of the
staging dated;deploy and enable listed as replay steps of the runbook;dossier.py check at STATUS: consistent, with 03-theme marked done.references/hummingbird-gotchas.md (opens in a new tab)references/palette.md (opens in a new tab)references/polish.md (opens in a new tab)references/quality-bar.md (opens in a new tab)references/reproduction-method.md (opens in a new tab)references/restitution.md (opens in a new tab)scripts/browser.py (opens in a new tab)scripts/capture.py (opens in a new tab)scripts/child_theme.py (opens in a new tab)scripts/measure_page.py (opens in a new tab)scripts/verify_theme.py (opens in a new tab)tests/test_browser.py (opens in a new tab)tests/test_capture.py (opens in a new tab)tests/test_child_theme.py (opens in a new tab)tests/test_verify_theme.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub prestashopcorp/prestashop-upgrade-toolbox --plugin prestashop-upgrade-toolbox7 skills in this plugin
/prestashop-upgrade-toolbox-auditAudit a legacy PrestaShop shop (1.6 or 1.7) before migrating it to PrestaShop 9, starting with a reference copy running locally. Use when the user wants to start a migration (the first questions, the dossier), audit an old shop (core files, overrides, modules, theme, data, integrations, direct scripts, multistore and markets, scheduled jobs, accounting and legal perimeter, cutover and performance baseline), run a legacy shop on modern PHP/MySQL (MAMP or Docker), debug one that fails there (504/FastCGI timeout, blank page, mcrypt removed in PHP 7.2, Smarty cache, nginx ignoring .htaccess, MySQL 8 caching_sha2_password), inventory the SEO URLs while production is live, or decide between an in-place upgrade and a clean reinstall with the data carried over. Covers phases 0 to 2 and ends at the decision. NOT for moving the data (prestashop-upgrade-toolbox-data), the modules' port (prestashop-upgrade-toolbox-modules), verifying or going live (prestashop-upgrade-toolbox-integrity), or installing a brand-new shop.
/prestashop-upgrade-toolbox-coreShared reference for the prestashop-upgrade-toolbox skills — the source / clone / target topology, the neutrality rule that keeps these skills reusable, the "measure, never assume" conventions, the containment guardrails that stop a working copy from reaching production or third parties, and the rules that make a control able to fail. Read this when building or editing any prestashop-upgrade-toolbox-* skill, or when you need the shared context behind prestashop-upgrade-toolbox-audit, -data, -modules, -module-rewrite, -theme and -integrity. This is a reference, not a task: it installs nothing and migrates nothing.
Other plugins' skills for the same job