community-automations/sql-schema-to-query

リサーチ&インテリジェンス

PublicClaude サブエージェント

スキーマ → SQL

サンプル行をモデルに渡してSQLを生成する方法では、データが漏洩するうえ、カラム名のハルシネーションも防げません。このオートメーションはスキーマ情報だけで動作します。

sonnet3日以内PostgresOpenAISQLGlotPython
ClaudeClaude
ROI for
README.md

このサブエージェントを選ぶ理由

サンプル行をモデルに渡してSQLを生成する方法では、データが漏洩するうえ、カラム名のハルシネーションも防げません。このオートメーションはスキーマ情報だけで動作します。

テーブルとカラムの定義を受け取り、クエリを生成したうえで、参照されているすべてのフィールドが実際に存在するかをパースして検証してから結果を返します。行データがモデルに渡ることは一切ありません。クリーンで有効なクエリと、それが依存するテーブル・JOINの一覧が手に入ります。

動作の流れ

    • Read

      Used at step 01 to kick off the pipeline.

    • Write

      Used at step 01 to kick off the pipeline.

    • WebFetch

      Used at step 01 to kick off the pipeline.

    • WebSearch

      Used at step 01 to kick off the pipeline.

出力サンプル

json
// Sample output
// (generated when the pipeline finishes)

Given only a database schema, produce a syntactically valid SQL query that references existing columns and no invented fields.

Unlock the rest

The full agent definition, install snippet, and starter task are gated for community members.

Members get the full `.md` agent file, the npm / pnpm install one-liners, a starter prompt that we've tuned against real runs, and the open-source repo when this automation ships there. One email, magic link, done.