Best for
- Eloquent/Query Builder queries (use eloquent or database skill)
- Schema design (use database skill)
event4u-app/agent-config/src/skills/sql-writing/SKILL.md
Use when writing raw SQL — MariaDB/MySQL syntax, parameterization, raw migrations, seeders with `DB::statement`; fires even on a pasted query asking 'why is this slow'.
Decision brief
Grounded corpus: tuning decisions (indexes, keyset pagination, N+1, trigram search, lock contention) ground via the database corpus — ./scripts-run /corpus-grounding/scripts/ground search --manifest /database/data/manifest.json "".
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/sql-writing"Inspect the Agent Skill "sql-writing" from https://github.com/event4u-app/agent-config/blob/0adf49a8ae84b0ff6e2de8759eea43257e020eff/src/skills/sql-writing/SKILL.md at commit 0adf49a8ae84b0ff6e2de8759eea43257e020eff. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Inspect call site & choose approach — identify every dynamic value flowing into the query, then pick: query builder when possible. Raw SQL only when query builder can't express the query. 2. Parameterize — Every variable must use ? binding or named :param. Never interpolate P…
Use when writing or reviewing raw SQL queries, migrations with raw statements, or seeders with raw SQL.
→ See guideline php/sql.md for parameterization patterns, common mistakes, MariaDB syntax reference.
1. Verify every variable in SQL uses parameter binding (? or named :param). 2. Confirm MariaDB/MySQL syntax — not PostgreSQL or MSSQL. 3. Run EXPLAIN on complex queries to check index usage. 4. Check that no PHP variable interpolation ("$var", '{$var}') appears in SQL strings.
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 94/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 7 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Grounded corpus: tuning decisions (indexes, keyset pagination, N+1, trigram search, lock contention) ground via the
databasecorpus —./scripts-run <skills-root>/corpus-grounding/scripts/ground search --manifest <skills-root>/database/data/manifest.json "<symptom>".
Use when writing or reviewing raw SQL queries, migrations with raw statements, or seeders with raw SQL.
Do NOT use when:
eloquent or database skill)database skill)? binding or named :param. Never interpolate PHP variables into SQL strings.php/sql.md for MariaDB-specific patterns."$var", '{$var}') appears in SQL.NEVER build SQL strings with PHP variable interpolation or concatenation.
ALWAYS use parameterized queries or query builder.
→ See guideline php/sql.md for parameterization patterns, common mistakes, MariaDB syntax reference.
// ✅ Safe
DB::select('SELECT * FROM users WHERE email = ?', [$email]);
// ❌ SQL injection
DB::select("SELECT * FROM users WHERE email = '{$email}'");
? or named :param)."$var", '{$var}') appears in SQL strings.$variable in SQL strings instead of ? placeholders.GROUP BY with ONLY_FULL_GROUP_BY requires all non-aggregated columns.NULL, 1/0, JSON_ARRAY()) — not PHP equivalents.Alternatives
K-Dense-AI/scientific-agent-skills
Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.
K-Dense-AI/scientific-agent-skills
Query and download public cancer imaging data from NCI Imaging Data Commons using idc-index. Use for accessing large-scale radiology (CT, MR, PET) and pathology datasets for AI training or research. No authentication required. Query by metadata, visualize in browser, check licenses.
github/awesome-copilot
Use this skill whenever the user mentions IP geolocation feeds, RFC 8805, geofeeds, or wants help creating, tuning, validating, or publishing a self-published IP geolocation feed in CSV format. Intended user audience is a network operator, ISP, mobile carrier, cloud provider, hosting company, IXP, or satellite provider asking about IP geolocation accuracy, or geofeed authoring best practices. Helps create, refine, and improve CSV-format IP geolocation feeds with opinionated recommendations beyon
K-Dense-AI/scientific-agent-skills
Analyze Neuropixels extracellular recordings end-to-end with SpikeInterface. Covers loading SpikeGLX/Open Ephys/NWB data, preprocessing, drift/motion correction, Kilosort4 (and CPU) spike sorting, quality metrics, and unit curation (threshold-based, model-based UnitRefine, and AI-assisted visual review). Use when working with Neuropixels 1.0/2.0 recordings, spike sorting, or extracellular electrophysiology analysis.