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-problem-solvernpx skills add pekral/cursor-rules --skill mysql-problem-solvergit 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.00029 | $0.01805 |
| Opus 5 | $0.00015 | $0.00903 |
| Sonnet 5 | $0.00006 | $0.00361 |
| Haiku 4.5 | $0.00003 | $0.00180 |
Grade A, and why
mysql-problem-solver 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 — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MySQL Problem Solver
Purpose
Investigate real MySQL performance or query design problems in existing applications.
Focus on:
- the actual query
- real schema and index usage
- EXPLAIN-based diagnosis when possible
- safe, justified optimizations
Constraints
- Apply @rules/sql.mdc
- If the current project uses Laravel, also apply
@rules/laravel/laravel.mdc,@rules/laravel/architecture.mdc,@rules/laravel/filament.mdc, and@rules/laravel/livewire.mdc - Be practical and direct
- Prefer investigation over assumptions
- Do not invent schema, indexes, or runtime behavior
- Do not recommend index changes without explaining why they help
- Apply
@rules/sql/optimalize.mdc"Performance Non-Regression on Query Changes" — every proposed query rewrite must be at least as fast as the original (ideally faster); a proposal that is slower must carry the documented reason and the remaining optimization options - If DB access is unavailable, continue with static analysis and state the limitation clearly
Execution
1. Identify the Query
- Find the actual SQL or reconstruct it from Laravel/Eloquent/query builder code
- Include filters, joins, ordering, grouping, pagination, and subqueries
2. Inspect Schema
- Inspect relevant tables and indexes using:
- schema output
- migrations
- model relationships
- DB tools when available
3. Run EXPLAIN
- If MySQL access is available, run
EXPLAIN - Review:
- table
- type
- possible_keys
- key
- rows
- filtered
- Extra
4. Diagnose the Problem
Look for:
- full scans
- weak join strategy
- existing index bypassed — query could hit a covering index already in the schema but the column order, a wrapping function, or extra projected columns prevent it. Preferred fix is a query rewrite (column re-ordering, SARGable rewrite, covering projection), not a new index (see
@rules/sql/optimalize.mdc"Reuse existing indexes first"). - missing or ineffective indexes
- non-SARGable filters
- poor sort/group plans
- offset pagination on large datasets
- N+1 behavior from application code
- per-row queries inside loops — per-row
update()/create()/delete()or single-row reads driven by aforeach(distinct from N+1 eager-loading: this is application code intentionally writing or reading row-by-row when a single batch query would suffice) - redundant or overlapping indexes
- charset / collation mismatch between compared or joined columns — the implicit conversion makes the converted side non-SARGable (its index is skipped), and an
asciicolumn compared against a non-ASCII value raisesERROR 1267instead of returning no rows - schema-level causes of a slow plan (see
@rules/sql/optimalize.mdc"Schema Design"): an oversized primary key copied into every secondary index, an unjustifiedVARCHAR(255)inflating sort buffers and temporary tables,TIMESTAMPcolumns converting per row by session time zone, orFLOAT/DOUBLEwhereDECIMALbelongs
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 143 lines · 29 tokens per session scan A 93ed5f83d1c7
mysql-problem-solver is a skill published in the GitHub repository pekral/cursor-rules (6 stars, last pushed 8d ago), licensed MIT. It adds 29 tokens to every session and 1,805 once invoked, about $0.0001 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-gain
Show ponytail measured impact as a scoreboard: less code, less cost, more speed, from the benchmark medians. One-shot display.
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…
module:assistant
Add an AI assistant chat panel to any Laravel project — with tool calling, streaming, and MCP support.