/prestashop-upgrade-toolbox:prestashop-upgrade-toolbox-module-rewritefrom prestashop-upgrade-toolbox
Rewrites legacy PrestaShop behaviours (overrides, 1.6 modules, direct scripts, custom integrations) as PrestaShop 9 modules during migration. Use when a module decision says 'rewrite'.
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: prestashop-upgrade-toolbox-core. The decision that sends a module here is taken
and written in prestashop-upgrade-toolbox-modules (migration/02-modules.md, one row per module);
this skill does the rewrite, and writes its progress in the same file.
The founding rule: never touch the core. Not a file of classes/, controllers/ or src/, not
the override/ folder. Every behaviour the old shop got from an override becomes a module + hook.
The old shop's behaviour is the specification, never its code: legacy code is read to
understand what it did, not copied.
A payment or shipping module is never rewritten. It is kept or updated to the vendor's
version for the target, or replaced by a module from the PrestaShop Marketplace or the
provider's official module. That decision belongs to prestashop-upgrade-toolbox-modules. When no such
module exists for the target, the merchant chooses another provider or an integrator: this skill
does not write one. The same holds for anything the Marketplace already sells (connectors,
tracking): buying is the default, a rewrite needs a written reason.
Write it in 02-modules.md, under the module's row, before the first line of code:
prestashop-upgrade-toolbox-audit/scripts/override-map.py): each business rule, condition,
hard-coded id or URL, third party.access_surfaces.py) for a script served directly.python3 scripts/scaffold_module.py <name> "<Display name>" --dest <project>/modules \
[--author "<who maintains it>"] [--admin-controller]
A blank, valid PrestaShop 9 module: main class, _PS_VERSION_ guards, index.php in every
folder, the PSR-4 autoloader its src/ needs, config/services.yml, and with --admin-controller
a Symfony back-office controller stub (PrestaShopAdminController, #[AdminSecurity]). It
refuses a folder that already exists. Then write the real
logic into it, following references/module-standards.md.
references/porting-legacy.md holds the method and the version
facts: an override method → the hook or service that replaces it; a 1.6 hook → its name on the
target, or its alias, or no successor (a design choice, written in the decision); $this->l() →
the translation system; a script served directly → a module front controller with the access
control the script lacked; the PHP the target runs.
install() with _DB_PREFIX_ — never a hard-coded prefix, the target's is
random — and dropped in uninstall() only when the merchant agreed the data can go.upgrade/upgrade-<version>.php) and a bumped version, so the day's database gets the same
structure.php bin/console prestashop:module install <name> (as the web
server's user, --env=prod), then the front answers 200 and the back office does not 500.install() and uninstall() are symmetric.02-modules.md — the
journey the gate of 02-modules asks for. Each assertion prints how many cases it checked, and
zero fails: a query that broke, a session that was not open, a filter that matched nothing make
a test that passes on nothing (prestashop-upgrade-toolbox-core/references/control-self-audit.md).git diff outside modules/ and the theme is empty.The rewritten module ships with the site's files: its code is already on the server. Its state — rows, hooks, settings — comes with the staging carry-over; it is not reinstalled. Only its day-J data script, if it has one, runs on the reloaded database (runbook).
02-modules.md;What SKILL.md sets; muted values are Claude Code's defaults
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