/prestashop-upgrade-toolbox:prestashop-upgrade-toolbox-corefrom prestashop-upgrade-toolbox
Shared reference for PrestaShop migration skills: defines source/clone/target topology, neutrality rules, containment guardrails, and conventions. Read before editing any prestashop-upgrade-toolbox-* skill.
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.
The six task skills rely on this one — it holds what they share, the dossier among it — so none
of them restates it. The plugin is self-contained and covers PrestaShop to PrestaShop only. Where a step needs PrestaShop itself (install, module
commands), the skills name the official way to do it: the release archive or Docker image pinned
to the target version, php bin/console prestashop:module, the back office.
You do not migrate to keep the legacy — the old stack is rarely worth reusing. You migrate to start clean: a fresh install of the target, and the data treated as a high-risk ETL project. That is the default to demonstrate, not presume: build the case both ways, and challenge your own recommendation (a second, neutral reviewer is worth the detour).
A migration skill is written from real shops, and a real shop leaves fingerprints: its name, its custom and third-party module names, its providers, its volumetry, the titles of its pages and products. None of that belongs in a skill. State the mechanism and the check; the anecdote belongs in the client's own dossier, where it has real value.
The shape to aim for, on the SEO example:
Not: "the SEO phase proved that none of the N indexed URLs were lost."
Generalising badly is the other failure. These items carry weight because each one is a failure that actually happened — keep the failure mode, drop the identifier, and do not flatten into bland advice. A worked example:
<the shop's real slug>; production linked the one carrying
<N> bytes of content while the new footer linked the other, a <n>-byte stub"The second is shorter, more actionable, and transposable. The mechanism is intact.
tools/check-neutrality.sh enforces this. It ships structural patterns only (shop volumetry
written with thousand separators, a shop-specific table prefix, absolute developer paths) and
takes identifying tokens from an untracked local deny-list — putting a client's name and its
payment or ERP providers in a public repo would be worse than the prose it removes. It scans the
metric declarations too: config.tsv says in so many words "extend this file per shop", so a
table prefix or a module table name lands there first.
Neutrality is about the shop, not about the product. Stripping the client is right; stripping
PrestaShop is how a method stops being executable. The upgrade tool's exact message, the native
row count of <prefix>_order_state, the version a column appeared in, the fact that the
newsletter table is renamed at module install — none of that names anyone, and a control built
without it cannot fire. Those facts live in
references/version-facts.md, each with where and when it was
verified, because they are the only part of these documents that rots.
Name them explicitly and never infer one from a find, a docker ps or a port. A machine that
hosts a migration usually hosts several shops, and picking the wrong one is the most common
accident of this work.
| Role | |
|---|---|
| Source | the legacy shop, read-only. The ETL reads a dump; the source is never modified by it. Its cookie keys are the lineage of every customer password — a 1.6-era shop hashes them with its own cookie key as the salt, so preserving that key is the only thing that keeps those hashes verifiable on the target (prestashop-upgrade-toolbox-data/references/landing-the-data.md). |
| Target | a fresh install of the modern version, where the data lands and the new front is built. |
| Upgrade clone | a disposable copy of the source used to run the schema-upgrade chain. Never the source — and, once the chain has run, its database is transplanted whole into a fresh install of the same version, renamed to that install's prefix, never copied table by table (prestashop-upgrade-toolbox-data/references/landing-the-data.md). The fresh install provides the code and nothing else. |
Write this topology down for the project at hand — container names, ports, database names, table prefixes, socket paths, credentials location — and keep the decoy shops on the same machine listed next to it. That list is a project artifact, not skill content.
And write down whether the shop is multistore, first. <prefix>_cms_lang,
<prefix>_hook_module, <prefix>_stock_available and <prefix>_configuration are all scoped by
shop; any control that ignores id_shop is either non-reproducible or a guaranteed false
positive. "Single shop" is a statement of coverage worth making explicitly, not an omission.
Measure, never assume. Any figure written in a document must be re-measurable by a command, and re-measured before it is quoted again. Line counts of a diff are misleading (whitespace) — measure without formatting. Re-run the measurement rather than trusting a plan, a screenshot or an earlier document: a screenshot is not evidence, and when the display contradicts the database it is the display that has a bug.
A control that cannot fail is a defect, not a convenience. Prefer a loud abort to a warning that lets things through. Every control must be shown failing at least once — see references/control-self-audit.md, which is the distilled result of auditing a full cutover toolkit on the controls themselves rather than on their results.
A control that cannot be quiet is the same defect wearing the opposite mask. One that is red on every correct run gets switched off, and a switched-off control costs as much as a missing one. When the two sides differ in bulk by design — a real shop's schema against a vanilla install — compare sets and report the difference; do not compare hashes and report a boolean.
Name the two sides of every comparison. If both come from the target, it is not a comparison, it is the control measuring itself. And distinguish what a configuration file says from what the runtime resolves: a cached parameters file or a timestamp-preserving restore makes those disagree while a file-level check stays green.
The oracle is the production that is served, never only a copy. A copy is frozen at a date,
its guardrails cut services, its server is not production's: an inventory made on it misses what
only production does. What a browser receives from production is captured
(prestashop-upgrade-toolbox-audit/scripts/served_fingerprint.py), the copy is compared with it before
serving as a reference, and the new shop is compared with production at the freeze.
Server configuration is advice, never the agent's work. DNS and its TTL, the document root, the crontab or the hosting panel's scheduler, backups, PHP settings: they differ from one host to the next, so the runbook carries them as advice and boxes for the merchant or the host, and the controls check only their effect from outside (HTTP, the database). The agent changes none of them on its own, and never a third party's settings either (a payment provider's mode, keys or notification URL): the merchant does it in the provider's interface. If the merchant gives the agent a shell on the server to go further, that access and what is done with it are the merchant's responsibility, written in the dossier.
Containment first. A working copy must never write to production, to third parties or to real
customers: e-mail, payments, trackers, feeds, SaaS connectors, stock/ERP synchronisation, catalogue
feeds, the shop domain itself — and the vendor's own APIs, which the upgrade tool calls with the
shop's module list during the hops. See
references/scope-containment.md, and apply it before the
first page view — a browser fires client-side trackers, curl does not.
Local fixes are not production fixes. Almost everything done to make a legacy shop run on a modern stack must never ship. Keep a running record of every local↔production divergence.
Every migration keeps one dossier, migration/ at the root of the shop's project, created once.
No dossier yet: run the intake first (references/intake.md) — read the
version, the shop and its perimeter from its files, confirm them in one summary, ask only what no
file holds, and draft the request to the host. Its values fill init and the README's Starting
point:
python3 scripts/dossier.py init --dir migration --lang <code> --shop <name> \
--source <version> --target <version>
The dossier is never served, never public. The shop's project is often its web root, and the
dossier holds captures with personal data and profiles
with credentials. init writes a .htaccess that denies every request (Apache); under nginx, the
host denies the folder in the server configuration, or the dossier lives outside the web root.
While findings are open, the dossier is not pushed to a repository others can read.
It holds a README stating each step, one file per step — 00-audit.md,
01-data.md, 02-modules.md, 03-theme.md, 04-integrity.md, 05-cutover.md — and a dated journal.md
(time spent, problems, solutions), one row of its table per entry: the page and the report read
only its rows, and check refuses a line written outside it (bad-journal). Templates: references/dossier/.
init. --lang takes that language's ISO 639-1 code (fr, en, es…), never its
name: the page of the dossier picks its labels from the code. The machine parts are language-neutral — the <!-- step: … · status: … -->
marker of each file, and the gate rows, recognised by the control they name.STATUS: line its
control printed, and the date. dossier.py check refuses a step marked done without that, a
gate that expects a failing status, and a README that no longer matches the step files; run it
with --write to refresh the README's step table.*.local.* file, which the dossier's
.gitignore keeps out of git, with captures/ and logs/. A secret printed once, by a command
or by showing a file, stays in the conversation: never show a *.local.* file whole, nor hand
it to a subagent; read the value you need by its name. A database password lives only in the
client's option file, <env>.local.cnf, which nothing prints (profile.example.env).migration/dossier.html, for the readers who never open Markdown:
the merchant, the agency, the host. check --write rewrites it. The step statuses, the gates,
the checks, J+1 and the journal are read from the step files the way check reads them — never
written by hand. Each skill adds its findings, figures, decisions and requests as an HTML
fragment, migration/page/<step>.html (and page/summary.html for the recommendation and what
blocks), when they change what a reader must know. Same rule as the step files: nothing from a
*.local.* file. Vocabulary and rules: references/dossier-page.md.
check reports drift while the page, or a report already written, is stale. Say where the
page is when the dossier is created, and again when a step changes status: the person follows
the migration there, not in the conversation.migration/audit-report.html, written by
dossier.py report: same style as the page, a fixed outline, the step table, the gate of 00
and the journal read from the files, every other section
a fragment the audit writes from a skeleton the command lays out (page/report/). A fragment
still holding <!-- report:skeleton --> is a form, not content: no page shows it. It is laid
out when the audit's phase 2 starts and filled workstream by workstream; the audit ends at
STATUS: reported.
The dossier runs the gates. A result copied into a gate by hand proves only that someone typed
it, so the gate rows carry the command itself and dossier.py executes it:cp migration/profile.example.env migration/production.local.env # one per environment
python3 scripts/dossier.py capture --dir migration --env production # snapshot → captures/
python3 scripts/dossier.py run --dir migration --step 05-cutover # gate rows → results
<env>.local.env, holds the database client, prefix, root, base
URL — written once, read by every command, never committed. One profile names ONE database or
copy: the live source, the clone the hops run on, the import dump the staging was built
from, the staging, the freeze, the production… (table in the dossier's README). A gate
command names its values as {production.SQL_CMD}, the dossier's files as {dossier}/… and
{captures}/…; reconciliations pass --sides source:target, so a profile pointed at the wrong
database is refused.run writes, for each row it can execute, the dated STATUS: line into the Result column and
the full output into logs/; a failing status is written too. A row whose command still holds
… is left to a human, a row whose profile value or input file is missing is reported, not
run. Profile values never reach the dossier: the log keeps the command as written in the gate.check counts a row as proven only when its result cites a log of logs/ whose last STATUS:
is the one written: a result typed by hand proves only that someone typed it. A command run by
hand saves its output under logs/ and the result cites it. A step keeps every control of its
template; a row that does not apply says n/a: <reason>.run never marks a step done: that stays a decision, which check then verifies.capture never overwrites a capture already there: the freeze snapshot is the cutover's
reference, and a runbook command run twice must not lose it. Take a new label, or pass
--replace — the journal records it.staging_delta.py final …, whose inputs are produced during the day). The files a gate
reads — audit/, surfaces.tsv, containment-reference.tsv,
containment.tsv,
payment-modules.expected, carriers.expected, routes.tsv… — are written by the step's skill
first; until they exist the row is reported not ready.| Phase | Skill |
|---|---|
| 0–1 Backup, git, reference copy running locally | prestashop-upgrade-toolbox-audit |
| 2 Audit and the upgrade-vs-fresh decision | prestashop-upgrade-toolbox-audit |
| 3 Target install (official archive or image, pinned, no demo data) | prestashop-upgrade-toolbox-data |
| 4 Upgrade chain, InnoDB before the hop to 9, then the transplant and its clean-up, then the files | prestashop-upgrade-toolbox-data |
| 5 Modules and overrides: inventory, decision, port, proof | prestashop-upgrade-toolbox-modules |
| 5 Rewrites the decision asks for (never payment or shipping) | prestashop-upgrade-toolbox-module-rewrite |
| 6 The old storefront reproduced as a child theme of hummingbird (PrestaShop 9) | prestashop-upgrade-toolbox-theme |
| 7 Integrity checks | prestashop-upgrade-toolbox-integrity |
| 8 Cutover | prestashop-upgrade-toolbox-integrity |
Phase 6 reproduces the old storefront: the same shop, with the same data and the same look, on
a sound version — never a new design. What the front must also prove whatever its theme —
historic URLs served, search index rebuilt, state replayable — sits in -data and -integrity.
references/containment-registry.example.tsv (opens in a new tab)references/control-self-audit.md (opens in a new tab)references/dossier-page.md (opens in a new tab)references/dossier/00-audit.md (opens in a new tab)references/dossier/01-data.md (opens in a new tab)references/dossier/02-modules.md (opens in a new tab)references/dossier/03-theme.md (opens in a new tab)references/dossier/04-integrity.md (opens in a new tab)references/dossier/05-cutover.md (opens in a new tab)references/dossier/README.md (opens in a new tab)references/dossier/journal.md (opens in a new tab)references/dossier/page.html (opens in a new tab)references/dossier/profile.example.env (opens in a new tab)references/dossier/report/a-core.html (opens in a new tab)references/dossier/report/b-overrides.html (opens in a new tab)references/dossier/report/c-modules.html (opens in a new tab)references/dossier/report/configuration.html (opens in a new tab)references/dossier/report/coverage.html (opens in a new tab)references/dossier/report/d-theme.html (opens in a new tab)references/dossier/report/decision.html (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
7 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-dataCarry a legacy PrestaShop shop's data onto PrestaShop 9 once the audit has decided — run the schema-upgrade chain on a disposable clone, transplant the upgraded database into a fresh install, carry the files, and make every later database step replayable. Use when the migration decision is made and the data has to move: products, customers, orders/invoices, CMS pages, configuration, product images; when customer passwords must keep working after the move (the cookie-key lineage); when a version-upgrade tool reports success without actually upgrading; when a rebuild step must be made idempotent and provably replayable. Covers phases 3 and 4. NOT for the pre-decision audit (see prestashop-upgrade-toolbox-audit), NOT for the modules (see prestashop-upgrade-toolbox-modules), NOT for integrity checks or going live (see prestashop-upgrade-toolbox-integrity).
npx claudepluginhub prestashopcorp/prestashop-upgrade-toolbox --plugin prestashop-upgrade-toolboxOther plugins' skills for the same job