Supported SQL Dialects for the Data Plugin's write-query Skill

The write-query skill supports ten major SQL dialects—PostgreSQL, Snowflake, BigQuery, Redshift, Databricks SQL, MySQL, SQL Server, DuckDB, and SQLite—plus an "Other" option for edge cases, ensuring each generated query uses engine-specific syntax and best practices.

The write-query skill is a core component of the open-source anthropics/knowledge-work-plugins repository that generates optimized SQL tailored to specific database engines. Understanding the supported SQL dialects for the data plugin's write-query skill is essential for receiving accurate queries that leverage dialect-specific functions, date handling, and performance hints. When the skill detects ambiguity or an unspecified engine, it prompts users to select from the official list defined in the skill configuration.

Complete List of Supported SQL Dialects

The skill recognizes nine primary database engines and one catch-all category, as documented in the "Determine SQL Dialect" section of data/skills/write-query/SKILL.md (lines 36–44):

  • PostgreSQL – Includes variants such as Amazon Aurora, RDS, Supabase, and Neon
  • Snowflake – Cloud data warehouse with specific syntax for semi-structured data
  • BigQuery – Google Cloud’s analytics engine with Standard SQL support
  • Redshift – Amazon’s columnar MPP database
  • Databricks SQL – Unity Catalog and Delta Lake optimized queries
  • MySQL – Includes Amazon Aurora MySQL and PlanetScale
  • SQL Server – Microsoft’s T-SQL implementation
  • DuckDB – In-process analytical database with specialized window functions
  • SQLite – Serverless, file-based SQL engine
  • Other – Fallback option that prompts for manual dialect specification when working with unsupported engines like Oracle or Presto

Each selection triggers dialect-specific logic that affects identifier quoting, date arithmetic, and function availability.

How Dialect Selection Works

When you invoke the skill without specifying a target database, the system references data/skills/write-query/SKILL.md to present the dialect menu. According to the source code analysis, the skill checks its configuration matrix (lines 36–44) to validate supported engines before generating SQL.

If your connected data warehouse is already indexed via data/CONNECTORS.md, the skill may auto-detect the dialect. Otherwise, it explicitly asks: "Which SQL dialect are you using?" and presents the enumerated options. This prevents syntax errors such as using PostgreSQL’s DATE_TRUNC in a MySQL context or Snowflake’s IFF() in standard SQL.

Usage Examples

Specify the Dialect Up Front

Explicit declaration ensures immediate generation of optimized SQL:

/write-query PostgreSQL – Show the total revenue per product for the last 90 days

Use Analytical Engines (BigQuery/DuckDB)

For columnar or in-process analytics, specify engines that support advanced window functions:

/write-query DuckDB – Return the top 10 customers by total spend, including their latest purchase date
/write-query BigQuery – Compute rolling 7-day averages for event streams

Handle Unknown Dialects

When the engine is unclear, the skill prompts for clarification:

/write-query Count of orders by status for the last 30 days

Skill response:

"Which SQL dialect are you using? (PostgreSQL, Snowflake, BigQuery, …)"

Switch Dialects Within a Session

The skill maintains session context but allows explicit overrides for multi-database workflows:

/write-query MySQL – List all active users with their last login timestamp
/write-query Snowflake – Compute month-over-month growth for the sales table

Key Implementation Files

The dialect support is defined across three critical files in the repository:

File Role
data/skills/write-query/SKILL.md Contains the canonical list of supported dialects (lines 36–44) and the "Determine SQL Dialect" logic
data/README.md Indexes the write-query skill and provides high-level capability descriptions
data/CONNECTORS.md Defines how the skill discovers and validates connected data warehouses, influencing default dialect selection
data/skills/sql-queries/README.md (If present) Documents dialect-specific function mappings that the skill injects into generated queries

Summary

  • The write-query skill explicitly supports PostgreSQL, Snowflake, BigQuery, Redshift, Databricks SQL, MySQL, SQL Server, DuckDB, and SQLite.
  • Configuration lives in data/skills/write-query/SKILL.md lines 36–44, ensuring generated SQL respects engine-specific syntax.
  • Users can specify dialects inline with /write-query <dialect> – <query> or let the skill prompt when unspecified.
  • The "Other" category accommodates unsupported engines via manual specification.
  • Context switching between dialects is supported within the same session without restarting the plugin.

Frequently Asked Questions

What happens if my SQL dialect is not in the supported list?

The skill provides an "Other" option that triggers a manual input prompt. When selected, you can specify your engine (such as Oracle or Presto), and the skill will attempt to generate generic ANSI SQL or ask follow-up questions about specific syntax requirements, as implemented in the fallback logic of data/skills/write-query/SKILL.md.

Can I switch between different SQL dialects in the same conversation?

Yes. The skill respects inline dialect declarations on a per-query basis. You can issue /write-query MySQL followed by /write-query Snowflake in the same session, and each query will generate syntax optimized for the respective engine according to the parameters defined in the skill configuration.

How does the skill handle dialect-specific functions like date arithmetic?

The skill references its internal dialect matrix—documented in data/skills/write-query/SKILL.md—to map generic intent to engine-specific implementations. For example, it translates "last 30 days" into PostgreSQL’s CURRENT_DATE - INTERVAL '30 days' versus SQL Server’s DATEADD(day, -30, GETDATE()), ensuring the generated SQL executes correctly on the target platform.

Where is the definitive list of supported dialects maintained?

The authoritative source is data/skills/write-query/SKILL.md in the anthropics/knowledge-work-plugins repository, specifically lines 36 through 44. This file defines the "Determine SQL Dialect" enumeration that drives the skill’s prompting behavior and syntax generation logic.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →