query-writing

query-writing is a skill for Claude Code, Codex from Idun-Group/idun-agent-platform. It costs 57 tokens per session (521 once invoked), scanned A, original, GPL-3.0.

A tool for writing and running SQL, the language used to retrieve and analyze data in databases.

In plain words
What is it for?
Use it for SELECT queries, filtering data, multi-table JOINs, totals and other aggregations, subqueries, and reports.
Why use it?
It turns plain requests for database information into queries, including requests that require combining tables or summarizing records.

Skill for Claude CodeCodex

Which agent this was written for is unclear — body not stored (licence); the path alone says nothing.

Good fit Use it for SELECT queries, filtering data, multi-table JOINs, totals and other aggregations, subqueries, and reports.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/idun-group/idun-agent-platform/query-writing
Install

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.

Any agent
npx skills add Idun-Group/idun-agent-platform --skill query-writing
Clone the repo
git clone --depth 1 https://github.com/Idun-Group/idun-agent-platform

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for query-writing

README.md
[![agentmods](https://agentmods.dev/badge/skills/idun-group/idun-agent-platform/query-writing/github.svg)](https://agentmods.dev/skills/idun-group/idun-agent-platform/query-writing)
Your own site
<a href="https://agentmods.dev/skills/idun-group/idun-agent-platform/query-writing"><img src="https://agentmods.dev/badge/skills/idun-group/idun-agent-platform/query-writing/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.

agentmods 80×15 button for query-writing

Your own site · 80×15
<a href="https://agentmods.dev/skills/idun-group/idun-agent-platform/query-writing"><img src="https://agentmods.dev/badge/skills/idun-group/idun-agent-platform/query-writing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 521 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin unknown No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.00521
Opus 5 $0.00028 $0.00260
Sonnet 5 $0.00011 $0.00104
Haiku 4.5 $0.00006 $0.00052

Measured 9d ago against content hash b88865cfc75c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

query-writing 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 9d 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.

examples/tutorials/text-to-sql-deep-agent/skills/query-writing/SKILL.md · 69 lines

The source is not reproduced here

Licensed GPL-3.0

The repository is licensed GPL-3.0, which this catalogue does not treat as permission to reproduce the file. Read it at the source.

Read it on GitHub

Changes

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.

  1. 9d ago First seen · 69 lines · 57 tokens per session scan A b88865cfc75c

Subscribe to this mod's changes

query-writing is a skill published in the GitHub repository Idun-Group/idun-agent-platform (199 stars, last pushed 1mo ago), licensed GPL-3.0. It adds 57 tokens to every session and 521 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.

Related

Other skills, from other repositories

sqlmind

SQLMind solves five root causes of LLM SQL failure.

VeloceAI/sqlmind · 0 tokens

schema-exploration

Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database. Use when the user asks about database schema, table structure, column types, what tables exist, ERD, foreign keys, or how entities relate.

langchain-ai/deepagents · 57 tokens

deepagents-thread-inspector

Inspect and explain conversations in the local Deep Agents Code SQLite session store. Use as a fallback when LangSmith trace tooling is unavailable, for offline or untraced sessions, or when asked to identify or summarize a local dcode thread, inspect checkpoint metadata, list recent local threads, or parse…

langchain-ai/deepagents · 82 tokens

query-writing

Writes and executes SQL queries from simple SELECTs to complex multi-table JOINs, aggregations, and subqueries. Use when the user asks to query a database, write SQL, run a SELECT statement, retrieve data, filter records, or generate reports from database tables.

langchain-ai/deepagents · 57 tokens

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

wshobson/agents · 37 tokens

sql-optimization-patterns

Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.

wshobson/agents · 44 tokens