community-automations/sql-schema-to-query

Nghiên cứu & Thông tin tình báo

PublicSubagent Claude

Schema → SQL

Việc tạo SQL bằng cách đưa các hàng mẫu cho model vừa làm rò rỉ dữ liệu vừa khiến model bịa ra tên cột. Automation này chỉ làm việc với schema.

sonnet3 ngàyPostgresOpenAISQLGlotPython
ClaudeClaude
ROI for
README.md

Tại sao chọn subagent này

Việc tạo SQL bằng cách đưa các hàng mẫu cho model vừa làm rò rỉ dữ liệu vừa khiến model bịa ra tên cột. Automation này chỉ làm việc với schema.

Nó nhận định nghĩa bảng và cột của bạn, viết nháp query, rồi phân tích để xác nhận mọi trường được tham chiếu thực sự tồn tại trước khi trả về bất cứ thứ gì. Không có dữ liệu hàng nào đến được model. Bạn nhận được một query sạch, hợp lệ, kèm danh sách các bảng và join mà nó dựa vào.

Cách vận hành

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

Ví dụ đầu ra

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.