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/pekral/cursor-rules/mysql-patternsnpx skills add pekral/cursor-rules --skill mysql-patternsgit clone --depth 1 https://github.com/pekral/cursor-rulesWhat 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.00053 | $0.03346 |
| Opus 5 | $0.00026 | $0.01673 |
| Sonnet 5 | $0.00011 | $0.00669 |
| Haiku 4.5 | $0.00005 | $0.00335 |
Grade A, and why
mysql-patterns 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 2d 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 — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MySQL Patterns
Constraints
- Apply
@rules/sql/optimalize.mdc— it already owns indexing, SARGable WHERE, seek/keyset pagination, EXPLAIN, transactions/locking basics, batch-over-per-row, CTE/window/recursive queries, schema basics, DB-level caching, and the Performance Non-Regression on Query Changes gate. Do not re-explain those here; defer to it. When a pattern in this skill changes an existing query (e.g. swappingLIKEfor a FULLTEXT match, moving a filter onto a generated column, introducing partition pruning), capture the original query's baseline and confirm the new shape is equal or faster — if it is slower, document the reason and the remaining optimization options per that gate. - For diagnosing an existing slow query, use
@skills/mysql-problem-solver/SKILL.md. This skill is for designing features, not investigating regressions. - If the project uses Laravel, also apply
@rules/laravel/laravel.mdcand@rules/laravel/architecture.mdc. - Apply
@rules/security/backend.md— parameterized queries / ORM only, least-privilege DB users, never hardcode credentials. finalclasses,declare(strict_types=1), Pest tests for any data-access code added.- Verify the engine/version before using a version-specific feature (
SELECT VERSION();). MySQL 8 and MariaDB diverge on JSON,ON DUPLICATE KEYaliases, andSKIP LOCKED.
Use when
- Adding upserts, JSON columns, full-text search, generated columns, or partitioning to a Laravel app.
- Writing a migration that creates a new table and needs the schema standard expressed in Blueprint.
- Setting up read/write splitting against replicas, or hardening against deadlocks and connection exhaustion.
- Reviewing a migration that introduces any of the above on a large table.
These topics complement the query-tuning rules; they are not covered there.
Schema Standard in Laravel Migrations
@rules/sql/optimalize.mdc Schema Design owns the standard (singular names, NOT NULL defaults, _at / _date suffixes, DATETIME over TIMESTAMP, adjective booleans, justified VARCHAR widths, DECIMAL money, ON DELETE by relation nature, CHECK invariants, utf8mb4_0900_*, PK width). This section only maps it onto Blueprint, where several defaults contradict it.
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.
- 2d ago First seen · 232 lines · 53 tokens per session scan A aacaae7bd44f
mysql-patterns is a skill published in the GitHub repository pekral/cursor-rules (6 stars, last pushed 7d ago), licensed MIT. It adds 53 tokens to every session and 3,346 once invoked, about $0.0003 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
migrate-radix-to-base
Migrates React projects and components from Radix UI to Base UI. Use when asked to migrate from radix, move to base-ui, convert radix primitives, or switch a shadcn project's base library. Handles single components ("migrate accordion") and whole projects.
ponytail-help
Quick reference for ponytail's modes, skills, and commands. One-shot display.
laravel-best-practices
Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization…
parse-table
Parse table definition to extract module name, model name, table name, and field definitions. First step of CRUD generation.
owl-admin-ops-commands
Use this skill for Owl Admin installation, publishing assets, upgrades, diagnostics, database inspection, menu maintenance, user creation, password reset, route generation, IDE helper, admin:publish, admin:install, admin:update, admin:doctor, admin:db, admin:menu, admin:create-user, or deployment troubleshooting.
octane-development
Use this skill when working with Laravel Octane, a long-running PHP worker server (Swoole, FrankenPHP, RoadRunner) where the application boots once and serves many requests instead of rebooting for each request like PHP-FPM. Trigger when installing Octane or starting its server; configuring or detecting the active…