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 skills add saifoelloh/golang-best-practices-skill --skill query-performancegit clone --depth 1 https://github.com/saifoelloh/golang-best-practices-skillWrote 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/saifoelloh/golang-best-practices-skill/query-performance)<a href="https://agentmods.dev/skills/saifoelloh/golang-best-practices-skill/query-performance"><img src="https://agentmods.dev/badge/skills/saifoelloh/golang-best-practices-skill/query-performance/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/saifoelloh/golang-best-practices-skill/query-performance"><img src="https://agentmods.dev/badge/skills/saifoelloh/golang-best-practices-skill/query-performance.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00061 | $0.00628 |
| Opus 5 | $0.00030 | $0.00314 |
| Sonnet 5 | $0.00012 | $0.00126 |
| Haiku 4.5 | $0.00006 | $0.00063 |
Grade A, and why
gorm-sql-query-performance 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 12d 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.
What it actually says
Query Performance
Expert-level performance review for GORM + PostgreSQL queries. Detects N+1 patterns, missing indexes, connection pool misconfigurations, and memory-inefficient data fetching.
When to Apply
Use this skill when:
- An endpoint is slow or degrading under load
- Reviewing repository code for N+1 query patterns
- Designing indexes for new tables or query patterns
- Investigating connection pool exhaustion
- Processing large datasets in background jobs
Rule Categories
| Priority | Count | Focus |
|---|---|---|
| Critical | 2 | N+1 queries, unindexed foreign keys |
| High | 3 | EXPLAIN ANALYZE, connection pool, batch processing |
| Medium | 2 | COUNT vs len(), partial indexes |
Rules Covered (7 total)
Critical Issues (2)
critical-n-plus-one— Detect and eliminate N+1 query patterns using Preloadcritical-unindexed-fk— Index foreign keys and all WHERE clause columns
High-Impact Patterns (3)
high-explain-analyze— Use EXPLAIN (ANALYZE, BUFFERS) before declaring a query optimizedhigh-connection-pool— Configure connection pool parameters explicitly for productionhigh-find-in-batches— Use FindInBatches for large dataset processing
Medium Improvements (2)
medium-count-query— Use db.Count instead of len() on full fetchmedium-partial-index— Use partial indexes for filtered queries on large tables
Trigger Phrases
- "Why is this query slow?"
- "Optimize this query"
- "Check for N+1"
- "Add an index"
- "EXPLAIN output"
- "Performance issue"
- "Connection pool"
- "Process large dataset"
Related Skills
- gorm-query-patterns — For ORM patterns that cause N+1
- postgresql-syntax — For ILIKE and index-aware SQL syntax
- migration-safety — For
CREATE INDEX CONCURRENTLYin migrations
What ships with it
7 files 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.
- 12d ago First seen · 68 lines · 61 tokens per session scan A 9c07c0c4f8e3
gorm-sql-query-performance is a skill published in the GitHub repository saifoelloh/golang-best-practices-skill (15 stars, last pushed 6mo ago), licensed MIT. It adds 61 tokens to every session and 628 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-30.
Other skills, from other repositories
multitenant
Architecture multitenant avec approche tiered (Shared/Dedicated Schema/DB), RBAC/ABAC, field-level encryption. Use when working with multitenant applications, tenant isolation, data segregation.
postgres-drizzle
Proactively apply when creating APIs, backends, or data models. Triggers on PostgreSQL, Postgres, Drizzle, drizzle-orm, drizzle-kit, database, schema, pgTable, tables, columns, indexes, queries, migrations, ORM, relations, relational queries, joins, transactions, SQL, connection pooling, PgBouncer, N+1, JSONB, RLS…
testing-paperclip
Paperclip-Testing-Strategie — Vitest, Plugin-Test-Harness aus @paperclipai/plugin-sdk/testing, echte Postgres-Integration-Tests, Cross-Tenant-Isolation. Verwenden Sie dies beim Schreiben oder Reviewen von Paperclip-Tests.
database-management
Standards for SQLAlchemy async models, PostgreSQL indexing, UTC datetimes, and Alembic migrations.
postgres-patterns
PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.
alloydb-basics
Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.