Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/jeffsenso/prestashop-skills/write-upgrade-sql-scriptnpx skills add jeffsenso/prestashop-skills --skill write-upgrade-sql-scriptgit clone --depth 1 https://github.com/jeffsenso/prestashop-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/jeffsenso/prestashop-skills/write-upgrade-sql-script)<a href="https://agentmods.dev/skills/jeffsenso/prestashop-skills/write-upgrade-sql-script"><img src="https://agentmods.dev/badge/skills/jeffsenso/prestashop-skills/write-upgrade-sql-script.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00041 | $0.01005 |
| Opus 5 | $0.00020 | $0.00502 |
| Sonnet 5 | $0.00008 | $0.00201 |
| Haiku 4.5 | $0.00004 | $0.00101 |
Grade A, and why
write-upgrade-sql-script scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.
write-upgrade-sql-script
Heads-up — cross-repo
Since PrestaShop 9.x, upgrade SQL scripts are not in the core repository. They live in the autoupgrade module: https://github.com/PrestaShop/autoupgrade (see upgrade/sql/{version}.sql). This skill describes what to write; the file lands in autoupgrade. Agents working in core should hand the change off to a maintainer or open the PR against autoupgrade directly.
When to use this skill
Whenever a change merged into core needs an existing shop to apply a database modification at upgrade time. Common cases:
- Schema change — new table, new column, new index, type change.
- Default fixtures / configuration update — a new row in
ps_configuration, a new row inps_feature_flag, etc., that newly-installed shops get from the XML/install fixtures but existing shops do not. - Feature-flag state transition — promoting a flag from beta to stable and enabling it for existing installs.
A new install reads the install fixtures directly; only upgrading shops need this script.
Instructions
- Determine the target PrestaShop version (e.g., 9.1.0).
- Open or create
upgrade/sql/{version}.sqlin theautoupgrademodule repo. - Append the SQL needed for your change. Use the section that matches your case below.
- Make every statement idempotent — the script may be run more than once and must not error or corrupt data on re-run.
Case (a) — schema change
-- Add column only if it doesn't exist (MySQL 8.0+ supports IF NOT EXISTS on ALTER TABLE ADD COLUMN)
ALTER TABLE `PREFIX_xxx`
ADD COLUMN IF NOT EXISTS `new_field` INT(11) NOT NULL DEFAULT 0;
-- Create table only if it doesn't exist
CREATE TABLE IF NOT EXISTS `PREFIX_xxx_yyy` (
`id_xxx` INT(11) UNSIGNED NOT NULL,
`id_yyy` INT(11) UNSIGNED NOT NULL,
PRIMARY KEY (`id_xxx`, `id_yyy`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8mb4;
Case (b) — default fixtures / configuration update
-- Insert configuration row only if not present (preserves merchant overrides)
INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`)
SELECT 'PS_NEW_OPTION', '1', NOW(), NOW()
WHERE NOT EXISTS (SELECT 1 FROM `PREFIX_configuration` WHERE `name` = 'PS_NEW_OPTION');
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 79 lines · 41 tokens per session scan A 249c1fbe1491
write-upgrade-sql-script is a skill published in the GitHub repository jeffsenso/prestashop-skills (5 stars, last pushed 10d ago), licensed MIT. It adds 41 tokens to every session and 1,005 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
dotnet-testing-advanced-testcontainers-nosql
Testcontainers NoSQL 整合測試完整指南。當需要對 MongoDB 或 Redis 進行容器化整合測試時使用。涵蓋 MongoDB 文件操作、Redis 五種資料結構、Collection Fixture 模式。包含 BSON 序列化、索引效能測試、資料隔離策略與容器生命週期管理。 Make sure to use this skill whenever the user mentions Testcontainers MongoDB, Testcontainers Redis, NoSQL integration test, BSON serialization, or Redis data structure…
postgres-commit-history-article
Analyze PostgreSQL git commit history between two commit ids and, when valuable DBA/application-developer changes exist, write a Chinese Markdown article for WeChat/公众号 readers with examples checked against SQL tests, docs, or relevant source. Use when the user is inside a PostgreSQL source checkout and provides two…
worktree
How to do feature work in this repo with git worktrees via pnpm worktree. Each worktree gets its own branch, its own block of app ports, its own nodemodules, and by default shares the primary checkout's standard local Supabase DB for fast setup; pass --db only when a separate Supabase project/data plane is needed.…
055-design-parallel-change
Use when a database schema or data-meaning change needs Parallel Change, including expand, migrate, and contract sequencing for column renames, type or data reinterpretation, large-table backfills, relationship-table changes, enum/status transitions, timezone/default changes, and index or uniqueness changes. This…
b2c-custom-objects
Store and query custom business data using CustomObjectMgr, OCAPI Data API, and Shopper Custom Objects API. Use this skill whenever the user needs to create, read, update, or search custom object instances, build processing queues with status fields, choose between site-scoped and organization-scoped storage, or query…
b2c-querying-data
Write efficient data queries in B2C Commerce for products, customers, and orders. Use this skill whenever the user needs to search products on a storefront page, look up customer profiles, query orders, paginate search results, or fix slow category pages. Also use when they ask about performance problems with data…