Localized reading guide
write-queryPurpose, usage and source
Write optimized SQL for your dialect with best practices. Use when translating a natural-language data need into SQL, building a multi-CTE query with joins and aggregations, optimizing a query against a large partitioned table, or getting dialect-specific syntax for Snowflake, BigQuery, Postgres, etc.
Source retrieved:
- Source repository
- anthropics/knowledge-work-plugins
- SKILL.md
data/skills/write-query/SKILL.md- Repository stars
- 34,049
- Repository updated
- 2026-10-30
- Categories
- Data
- Last collected
License: License file needs review
Workflow excerpts are reading aids, not executable instructions from Codez. No third-party Skill was run to produce this page.
The purpose and workflow passages below are upstream material, organized and translated for reading. They are distinct from the separately labeled Codez editorial analysis.
What this Skill does
Write optimized SQL for your dialect with best practices. Use when translating a natural-language data need into SQL, building a multi-CTE query with joins and aggregations, optimizing a query against a large partitioned table, or getting dialect-specific syntax for Snowflake, BigQuery, Postgres, etc.
How the upstream workflow works
/write-query - Write Optimized SQL
> If you see unfamiliar placeholders or need to check which tools are connected, see CONNECTORS.md. Write a SQL query from a natural language description, optimized for your specific SQL dialect and following best practices.
Upstream passage · L7 ↗1. Understand the Request
Parse the user's description to identify: Output columns: What fields should the result include?
Upstream passage · L21 ↗2. Determine SQL Dialect
If the user's SQL dialect is not already known, ask which they use: PostgreSQL (including Aurora, RDS, Supabase, Neon)
Upstream passage · L32 ↗/write-query <description of what data you need>Requirements and setup
No short requirements passage was selected from this file. This does not mean the Skill has no dependencies. Check the repository setup instructions and referenced files.
Limits and quality checks
No separate limits passage was selected from this file. This does not mean the Skill is safe for every input or environment. Review the complete source and validate your own result.
Start with a safe trial
- Check the supported host and the repository installation instructions. Keep the Skill directory and its referenced scripts, assets and documentation together; SKILL.md alone may omit dependencies.
- Give the agent your real input, desired output and acceptance criteria. Invocation syntax and available tools depend on the host; this site does not assume a universal install command.
- Try the source workflow in a disposable project or on a copy. Review operations that change files, remote services or billable resources before allowing them.
- Validate the output against the source quality checks and your own requirements. A successful trigger or a high repository Star count does not establish a correct result.
Read further in the source
Related Skills
Translation and scope
This reading guide selects passages from the pinned upstream SKILL.md. Translation is assisted. It is not a complete manual or a claim of tested compatibility. Read the original and its referenced files before use.
This introduction refers to the pinned version below; current repository activity and collection time are shown separately.
- Pinned source
- Read the original ↗
- Source retrieved
- Source commit
2574e29377c7173d0cecffef29a6ecbd7f8ccb5d- Source SHA-256
4c7ef791db1f23504c457cc52de0d8855d26f176d5acf037260deb1b98e5e34e