Safe SQL Execution
supabase/supabase
A skill your agent uses whenever code will build, return, fetch, or execute SQL that runs against a user's real Postgres database — even when the request reads like an ordinary feature or bug fix…
A skill your agent uses when writing or changing a query against PostgreSQL from Go — avoiding N+1 loops, reading EXPLAIN output, indexing, and keyset pagination
$ npx skills add makifbaysal/tasktrooper --skill sql-query-performance -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install makifbaysal/tasktrooper sql-query-performance --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/makifbaysal/tasktrooper.git skills-src && mkdir -p .claude/skills && cp -r skills-src/catalog/agents/backend-developer/skills/sql-query-performance .claude/skills/sql-query-performance && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "sql-query-performance" agent skill from https://github.com/makifbaysal/tasktrooper/tree/main/catalog/agents/backend-developer/skills/sql-query-performance into .claude/skills/sql-query-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sql-query-performance", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/makifbaysal/tasktrooper/tree/main/catalog/agents/backend-developer/skills/sql-query-performanceType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add makifbaysal/tasktrooper --skill sql-query-performance -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install makifbaysal/tasktrooper sql-query-performance --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/makifbaysal/tasktrooper.git skills-src && mkdir -p .agents/skills && cp -r skills-src/catalog/agents/backend-developer/skills/sql-query-performance .agents/skills/sql-query-performance && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "sql-query-performance" agent skill from https://github.com/makifbaysal/tasktrooper/tree/main/catalog/agents/backend-developer/skills/sql-query-performance into .agents/skills/sql-query-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sql-query-performance", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add makifbaysal/tasktrooper --skill sql-query-performance -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install makifbaysal/tasktrooper sql-query-performance --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/makifbaysal/tasktrooper.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/catalog/agents/backend-developer/skills/sql-query-performance .cursor/skills/sql-query-performance && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "sql-query-performance" agent skill from https://github.com/makifbaysal/tasktrooper/tree/main/catalog/agents/backend-developer/skills/sql-query-performance into .cursor/skills/sql-query-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sql-query-performance", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/makifbaysal/tasktrooper.git --path catalog/agents/backend-developer/skills/sql-query-performance--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add makifbaysal/tasktrooper --skill sql-query-performance -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install makifbaysal/tasktrooper sql-query-performance --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/makifbaysal/tasktrooper.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/catalog/agents/backend-developer/skills/sql-query-performance .gemini/skills/sql-query-performance && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "sql-query-performance" agent skill from https://github.com/makifbaysal/tasktrooper/tree/main/catalog/agents/backend-developer/skills/sql-query-performance into .gemini/skills/sql-query-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sql-query-performance", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install makifbaysal/tasktrooper sql-query-performanceInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add makifbaysal/tasktrooper --skill sql-query-performance -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/makifbaysal/tasktrooper.git skills-src && mkdir -p .github/skills && cp -r skills-src/catalog/agents/backend-developer/skills/sql-query-performance .github/skills/sql-query-performance && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "sql-query-performance" agent skill from https://github.com/makifbaysal/tasktrooper/tree/main/catalog/agents/backend-developer/skills/sql-query-performance into .github/skills/sql-query-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sql-query-performance", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add makifbaysal/tasktrooper --skill sql-query-performance -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install makifbaysal/tasktrooper sql-query-performance --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/makifbaysal/tasktrooper.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/catalog/agents/backend-developer/skills/sql-query-performance .opencode/skills/sql-query-performance && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "sql-query-performance" agent skill from https://github.com/makifbaysal/tasktrooper/tree/main/catalog/agents/backend-developer/skills/sql-query-performance into .opencode/skills/sql-query-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sql-query-performance", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
sql-query-performanceA skill your agent uses when writing or changing a query against PostgreSQL from Go — avoiding N+1 loops, reading EXPLAIN output, indexing, and keyset pagination
SQL Query Performance is an agent skill from makifbaysal/tasktrooper. Use when writing or changing a query against PostgreSQL from Go — avoiding N+1 loops, reading EXPLAIN output, indexing, and keyset pagination
Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Databases, covering SQL. It works with SQL and PostgreSQL. The repository describes itself as: Local-first agent platform: board + role agents + agent CLI runs (Claude Code, Cursor, Antigravity, OpenCode) or local and API models (Ollama, LM Studio), all on your own Mac. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 09f6258. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
psqlFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
SQL Query Performance loads about 1.1k tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 529 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from makifbaysal/tasktrooper at commit 09f6258, republished under its Apache-2.0 licence (© makifbaysal). 529 words, ~1,090 tokens.
.claude/skills/sql-query-performance/SKILL.md (or your agent's skills folder).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.
// ❌ 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.
context.Context — QueryContext/ExecContext (database/sql) or pgx's ctx parameter — so a slow query is cancelable and traceable.defer rows.Close() immediately after a successful Query, and check rows.Err() after the loop — a Query that returns rows can still fail mid-stream, and an unclosed Rows leaks the connection.Exec, not Query, for statements that return no rows (INSERT/UPDATE/DELETE without RETURNING) — Query leaves a result set open that must still be drained.SELECT * in application code — name the columns, so an added column doesn't silently change scan order or payload size.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 Scan on a table bigger than a few thousand rows → missing index.ANALYZE <table>) or a predicate the planner can't estimate well.Sort that spills to disk (Sort Method: external merge) → needs work_mem tuning or an index that avoids the sort.(a, b) serves queries filtering on a alone or a AND b, not b alone.WHERE status = 'open') for a hot subset of a much larger table.INCLUDE (col)) to let an index-only scan satisfy a query without a heap fetch.See postgres-migrations for how to add an index on a live table without locking it.
Wrap the pool/connection to count statements in a test, or use pg_stat_statements where the test DB has it enabled, and assert the count stays constant as the dataset grows — this is what catches an N+1 before it ships, the same way java-persistence's Hibernate-statistics assertion does on the Java side.
See api-design-conventions for the full pagination guidance; the query shape is:
SELECT ... FROM tasks
WHERE (created_at, id) < ($1, $2)
ORDER BY created_at DESC, id DESC
LIMIT $3 + 1; -- fetch one extra row to know has_more= ANY($1) query.rows.Close() missing or only deferred conditionally (e.g. after an early if err != nil { return } that skips the defer).rows.Err() never checked after the loop.EXPLAIN against an empty or tiny local table and concluding the query is fine.Seq Scan on a table expected to hold more than a few thousand rows.WHERE/JOIN column with no migration adding its index.© makifbaysal, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in catalog/agents/backend-developer/skills/sql-query-performance of makifbaysal/tasktrooper.
Open the folder on GitHubat commit 09f6258
SQL Query Performance next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| SQL Query Performance this skillmakifbaysal/tasktrooper | 109 | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Safe SQL Executionsupabase/supabase | 111k | — | ~4.2k | Automated safety check: Pass | Apache-2.0 | |
| Sql2erystemsrx/sql_to_ER | 188 | 1 repos | ~1.1k | Automated safety check: Pass | AGPL-3.0 | |
| SQL Database Support for pRESTprest/prest | 4.6k | — | ~1.6k | Automated safety check: Pass | MIT | |
| Chdb SQLvemetric/vemetric | 394 | 1 repos | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Mz BenchmarkMaterializeInc/materialize | 6.4k | — | ~2.8k | Automated safety check: Pass | Custom licence |
supabase/supabase
A skill your agent uses whenever code will build, return, fetch, or execute SQL that runs against a user's real Postgres database — even when the request reads like an ordinary feature or bug fix…
ystemsrx/sql_to_ER
A skill your agent uses when the user wants a Chen-model ER diagram from SQL CREATE TABLE statements or DBML, wants to rearrange or clean up an existing sql2er state, wants a skeleton-only overview…
prest/prest
Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.
vemetric/vemetric
A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…
MaterializeInc/materialize
Add/modify/debug Materialize perf benchmark scenarios. An agent skill from MaterializeInc/materialize.
timescale/pg-aiguide
Explore an existing PostgreSQL database before answering questions about its data or writing SQL.
makifbaysal/tasktrooper
A skill your agent uses when a task adds or changes an HTTP endpoint, its request/response shape, status codes, auth or error format - the request matrix, curl templates and what counts as a…
makifbaysal/tasktrooper
A skill your agent uses when writing acceptance criteria for a task - express each as an observable Given/When/Then that QA can execute, including negative cases
makifbaysal/tasktrooper
A skill your agent uses when a task changes any screen, form, dialog, menu or control - Lighthouse/axe scan of the changed screens, a keyboard walk, and the thresholds that fail a task
makifbaysal/tasktrooper
A skill your agent uses when deciding whether a request needs an analiz task before implementation - the conditions that require the architect's analysis versus going straight to implementation
makifbaysal/tasktrooper
A skill your agent uses when you write or revise the analiz deliverable - the ONE self-contained HTML report (spec and plan as sections) a human reviews passage by passage
makifbaysal/tasktrooper
A skill your agent uses when you finish an analiz report - the human must approve the analysis before any implementation task is created, via the analizreview column
Works with
Categories
A skill your agent uses when writing or changing a query against PostgreSQL from Go — avoiding N+1 loops, reading EXPLAIN output, indexing, and keyset pagination. SQL Query Performance is an agent skill from makifbaysal/tasktrooper.
SQL Query Performance fits situations like: changing a query against PostgreSQL from Go — avoiding N+1 loops; reading EXPLAIN output; keyset pagination.
Run `npx skills add makifbaysal/tasktrooper --skill sql-query-performance -a claude-code`. Or copy the skill folder (catalog/agents/backend-developer/skills/sql-query-performance in makifbaysal/tasktrooper) into .claude/skills/sql-query-performance in your project. Claude Code loads it when a task matches its description.
Run `npx skills add makifbaysal/tasktrooper --skill sql-query-performance -a codex`. Or copy the skill folder (catalog/agents/backend-developer/skills/sql-query-performance in makifbaysal/tasktrooper) into .agents/skills/sql-query-performance in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add makifbaysal/tasktrooper --skill sql-query-performance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sql-query-performance, .gemini/skills/sql-query-performance, .github/skills/sql-query-performance and .opencode/skills/sql-query-performance in your project.
Going by SKILL.md and its folder, SQL Query Performance needs the command-line tools its instructions call (psql).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
SQL Query Performance is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with SQL Query Performance: Safe SQL Execution (supabase/supabase, 111k stars), Sql2er (ystemsrx/sql_to_ER, 188 stars), SQL Database Support for pREST (prest/prest, 4.6k stars) and Chdb SQL (vemetric/vemetric, 394 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
makifbaysal (a GitHub user) maintains it in makifbaysal/tasktrooper, which has 109 GitHub stars. The repository holds 99 skills in this directory. The repository was last updated on October 7, 2026.
Source: makifbaysal/tasktrooper on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.