Source github.com · Published · Open the original ↗
Capability
Schema-guard, stop AI agents from inventing column names in SQL
Stop AI agents from writing SQL against tables and columns that do not exist. Schema snapshot + Claude Code hook + MCP server + CI check. 0 false blocks on 1,034 Spider queries. - idk-arsh/schema-g...
Coding agents write SQL against the schema they think you have, based on your README, an old query, or a naming convention. Then it fails in CI, in a dashboard, or at 2am. Snowflake's own developer blog ran a whole post on this in September 2026 ( My coding agent won't stop hallucinating table columns ).
schema-guard keeps a snapshot of your real tables and columns in the repo (names and types only, no data, no credentials) and checks the agent's SQL against it before it runs or lands in a file :
That's a real denial from the eval below: Claude Haiku 4.5 writing models/revenue_by_country.sql from a README that describes last year's schema. The agent reads the denial, fixes its SQL and moves on. You never see the broken version.
The opening of the report, quoted unchanged from github.com. The full text continues at the source.