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 makifbaysal/tasktrooper --skill sql-query-performancegit clone --depth 1 https://github.com/makifbaysal/tasktrooperWrote 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/makifbaysal/tasktrooper/sql-query-performance)<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/sql-query-performance"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/sql-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/makifbaysal/tasktrooper/sql-query-performance"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/sql-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.00035 | $0.01085 |
| Opus 5.5 | $0.00014 | $0.00434 |
| Sonnet 5.5 | $0.00007 | $0.00217 |
| Haiku 4.5 | $0.00003 | $0.00109 |
Grade A, and why
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 1mo 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 — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SQL Query Performance (Go)
Overview
Go has no ORM to blame for an N+1 — it's a loop you wrote yourself, calling the repository once per item instead of once for the batch. This skill is the Go-side half of query performance; java-persistence covers the JPA/Hibernate side.
Core principle: one round trip per request-shaped operation, not one per row.
N+1 in Go
// ❌ one query per item: N+1
for _, id := range ids {
task, err := repo.Get(ctx, id) // round trip per id
...
}
// ✅ one query for the batch
tasks, err := repo.GetMany(ctx, ids) // SELECT ... WHERE id = ANY($1)
SELECT id, title, status FROM tasks WHERE id = ANY($1);
Bind ids as a []uuid.UUID (pgx encodes a Go slice as a Postgres array directly — no manual IN (...) string building). For a write-side batch, use pgx.Batch to pipeline multiple statements over one round trip instead of looping with individual Exec calls.
Database hygiene
- Every call takes a
context.Context—QueryContext/ExecContext(database/sql) or pgx'sctxparameter — so a slow query is cancelable and traceable. defer rows.Close()immediately after a successfulQuery, and checkrows.Err()after the loop — aQuerythat returns rows can still fail mid-stream, and an unclosedRowsleaks the connection.- Use
Exec, notQuery, for statements that return no rows (INSERT/UPDATE/DELETEwithoutRETURNING) —Queryleaves a result set open that must still be drained. - No
SELECT *in application code — name the columns, so an added column doesn't silently change scan order or payload size.
Reading EXPLAIN
psql "$DATABASE_URL" -c "EXPLAIN (ANALYZE, BUFFERS) <query with literal values, not placeholders>"
Run it against realistically seeded data, not an empty table — an empty-table plan hides the index Postgres would actually need. Read for:
Seq Scanon a table bigger than a few thousand rows → missing index.- Estimated vs actual row counts far apart → stale statistics (
ANALYZE <table>) or a predicate the planner can't estimate well. - A
Sortthat spills to disk (Sort Method: external merge) → needswork_memtuning or an index that avoids the sort.
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.
- 1mo ago First seen · 87 lines · 35 tokens per session scan A 99f01c675ee7
sql-query-performance is a skill published in the GitHub repository makifbaysal/tasktrooper (123 stars, last pushed today), licensed Apache-2.0. It adds 35 tokens to every session and 1,085 once invoked, about $0.0001 per session on Opus 5.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-10-05.
sql-query-performance compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| sql-query-performancemakifbaysal/tasktrooper | Skill | 123 | today | Apache-2.0 | A | 35 | Claude Code, Codex |
| go-add-migrationJotJunior/cstk | Skill | 24 | today | MIT | A | 17 | Claude Code |
| cudf-query-engine-builderNVIDIA/skills | Skill | 4.2k | 2d ago | Apache-2.0 | A | 99 | Claude Code, Codex |
| go-data-persistenceexistential-birds/beagle | Skill | 91 | 4d ago | Apache-2.0 | A | 56 | Claude Code, Codex |
| encore-go-databaseencoredev/skills | Skill | 31 | 10d ago | Apache-2.0 | A | 37 | Claude Code |
| mfdvmkteam/claude-plugins | Skill | 8 | 25d ago | MIT | A | 99 | Claude Code |
| go-data-persistenceedheltzel/Do-Skills | Skill | 2 | yesterday | none | A | 56 | Claude Code, Codex |