Audit Legacy Controller
Developmentaudit-legacy-controllerAudit Legacy Controller is an Agent Skill for development published in the PrestaShop/PrestaShop repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Read the legacy `Admin{Domain}sController.php` without modifying it. Extract every field rendered, every action method, and every `Hook::exec()` call.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/PrestaShop/PrestaShop/blob/HEAD/.ai/Component/Migration/skills/audit-legacy-controller/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/audit-legacy-controller, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
audit-legacy-controller
Instructions
- Open
controllers/admin/Admin{Domain}sController.php— read the full file. - List every public action method:
renderList,renderForm,postProcess,ajaxProcess*, any custom method. - For each form field in
renderForm(), record: field name, type (text/select/checkbox/file), whether it is translatable, whether it is required. - Record every DB column accessed in
getList()orrenderList()— these map to grid columns. - Record every filter defined in
renderList()— these map to grid filter types. - List every
Hook::exec()call with the hook name and arguments passed. - Note any multistore-specific branches (
if (Shop::isFeatureActive())). - Record whether the controller handles file uploads (logo, image).
- Output: a structured field map grouped by (form fields, list columns, filters, hooks, actions).
Rules
- Never modify the controller file — this is a read-only audit
- Note every
ObjectModelmethod called (save(),update(),delete()) to inform handler implementation - Flag any field that uses
Tools::getValue()directly without validation — these need ValueObject wrapping - Record position/sort fields explicitly — they trigger
create-position-column(G)