Prestashop Upgrade Toolbox Core
ASecurityShared 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, -...
- 6 stars
- 0 votes
- 0 copies
- 0 views
- Added December 1, 2026
Works with
Security analysis
100/100Pro scans all 20 files and shows the line behind each finding
npx -y skills add PrestaShopCorp/PrestaShop-Upgrade-Toolbox --skill prestashop-upgrade-toolbox-core --agent claude-codeAre you the author of Prestashop Upgrade Toolbox Core?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/prestashopcorp-prestashop-upgrade-toolbox-core)---
name: prestashop-upgrade-toolbox-core
description: >
Shared 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.
---
# PrestaShop migration core (shared reference)
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.
## Guiding principle
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).
## Neutrality — the rule that keeps these skills usable
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:
- derive an inventory of URLs **before**;
- derive the same inventory **after**, by the same rule;
- compare the two sets, and treat every difference as a regression until proven otherwise.
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:
- ✗ "two pages shared the slug `<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"
- ✓ "two CMS pages can share a slug, and the new template may link the stub while the content
lives on the other id. Both answer 200 and the slug inventories match, so no URL-level or
slug-level check can see it: compare the **id the template actually links** and the **content
length**."
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](references/version-facts.md), each with where and when it was
verified, because they are the only part of these documents that rots.
## The three environments
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.
## Conventions
**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](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](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.
## The migration dossier
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](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:
```bash
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/](references/dossier/).
- **Write the dossier in the merchant's language**, headings included: translate the templates
right after `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.
- **Every skill writes in its own step file as it goes**: findings with their evidence, decisions
with who and when, workarounds with their consequence. Not at the end — a dossier written after
the fact records what people remember.
- **A step is done only when its gate is proven**: each gate row carries the `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.
- Anything holding a secret or a personal datum goes in a `*.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`).
- **The dossier has a page**, `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](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.
- **The audit has a report**, `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:
```bash
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
```
- A **profile** per environment, `<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.
- Every step's gate is runnable. One row stays with a human: the staging carry-over of the
cutover (`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 map
| 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`.
Files in this skill
- SKILL.md
- references/containment-registry.example.tsv
- references/control-self-audit.md
- references/dossier-page.md
- references/dossier/00-audit.md
- references/dossier/01-data.md
- references/dossier/02-modules.md
- references/dossier/03-theme.md
- references/dossier/04-integrity.md
- references/dossier/05-cutover.md
- references/dossier/README.md
- references/dossier/journal.md
- references/dossier/page.html
- references/dossier/profile.example.env
- references/dossier/report/a-core.html
- references/dossier/report/b-overrides.html
- references/dossier/report/c-modules.html
- references/dossier/report/configuration.html
- references/dossier/report/coverage.html
- references/dossier/report/d-theme.html
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.