You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add schemagate-sql skill: text-to-SQL with ~91% fewer schema tokens and per-user scope (#1 BIRD Mini-Dev) - #6162
My contribution adds a new instruction, prompt, agent, skill, workflow, or canvas extension file in the correct directory.
The file follows the required naming convention.
The content is clearly structured and follows the example format.
I have tested my instructions, prompt, agent, skill, workflow, or canvas extension with GitHub Copilot.
I have run npm start and verified that README.md is up to date.
I am targeting the main branch for this pull request.
Description
Adds skills/schemagate-sql: a skill for answering questions about data in a large SQL database through the schemagate MCP server (Apache-2.0, open source, no paid service).
This is not another database connector. The existing PostgreSQL / MySQL / SQL Server / Data API builder servers give the model the whole schema, or let it browse table by table, and leave the hard part to the model: choosing the few tables that matter out of hundreds, and never touching the ones this user must not see. schemagate is the selection layer that does that part, and this skill teaches Copilot to use it: select the schema for the question, write one SELECT against only that DDL, run it through the checked query path, and report out-of-scope refusals as refusals.
What that gets you, with the proof:
About 91% fewer schema tokens. Median schema-token saving on Spider 2.0-lite databases with 50+ tables: 91.1% (BENCHMARKS.md).
BIRD hidden test set, scored by the BIRD team: 74.34 EX (simple 81.03 / moderate 72.25 / challenging 56.14; leaderboard row pending), dev 84.03 EX.
Enterprise warehouses: 31-39% execution accuracy on MIT's BEAVER (100-question samples), against 11.4% for the paper's best setup. Not yet an official leaderboard entry.
Per-user scope: the model only sees tables and columns the caller may read (a policy file or the database's own GRANTs); PostgreSQL row-level-security policies are checked per role.
Checked queries:run_query refuses writes, multiple statements and any object outside the caller's scope. Every selection and query can go to a signed audit log.
Used in agent frameworks: listed in LangChain's retriever integrations (langchain-schemagate, works from LangChain and LangGraph), a LlamaIndex retriever on PyPI, the official MCP Registry (io.github.ashishsinha1602/schemagate), Glama and awesome-duckdb. 34.5k PyPI downloads (pepy.tech); releases carry SLSA provenance.
One server for every engine: PostgreSQL, MySQL, SQLite, SQL Server, Oracle, Snowflake, BigQuery and DuckDB.
The skill's setup block pins schemagate[mcp]==1.15.4 and points at demo, a bundled sample schema, so it connects to nothing and needs no credentials until the user configures a real database in their own MCP config.
Type of Contribution
New instruction file.
New prompt file.
New agent file.
New plugin.
New skill file.
New agentic workflow.
New canvas extension.
Update to existing instruction, prompt, agent, plugin, skill, workflow, or canvas extension.
Other (please specify):
Additional Notes
The same tool is also submitted as an external plugin through the review workflow in [External Plugin]: schemagate #6160 (intake passed). This PR adds only the skill; it does not edit plugins/external.json.
I could not run npm start locally, so I added the docs/README.skills.md row by hand in the generated format (alphabetical, after scaffolding-...). Happy to regenerate if CI wants different output.
Name and description are within skill:validate limits (description 423 of 1,024 characters); the folder name matches the skill name.
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.
Risk tier:merge-risk:high — Privileged execution, automation, or review-policy change Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access, including a maintainer with admin or maintain permission.
Why this tier
Label needs-review:HIGH flags a high contributor-risk signal
✓ [spec-compliance] All 1 skill(s) are spec-compliant.
ℹ️
✓ spec-compliance: All spec checks passed.
ℹ️
✓ [valid-refs] All file references across 1 skill(s) are valid.
ℹ️
✓ valid-refs: All file references resolve to existing files within the skill directory.
ℹ️
1 skill(s) linted, 1 passed
Full linter output
### Linting skills/schemagate-sql
✅ schemagate-sql (2/2 checks passed)
✓ [spec-compliance] All 1 skill(s) are spec-compliant.
✓ spec-compliance: All spec checks passed.
✓ [valid-refs] All file references across 1 skill(s) are valid.
✓ valid-refs: All file references resolve to existing files within the skill directory.
1 skill(s) linted, 1 passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.mainbranch for this pull request.Description
Adds
skills/schemagate-sql: a skill for answering questions about data in a large SQL database through the schemagate MCP server (Apache-2.0, open source, no paid service).This is not another database connector. The existing PostgreSQL / MySQL / SQL Server / Data API builder servers give the model the whole schema, or let it browse table by table, and leave the hard part to the model: choosing the few tables that matter out of hundreds, and never touching the ones this user must not see. schemagate is the selection layer that does that part, and this skill teaches Copilot to use it: select the schema for the question, write one SELECT against only that DDL, run it through the checked query path, and report out-of-scope refusals as refusals.
What that gets you, with the proof:
run_queryrefuses writes, multiple statements and any object outside the caller's scope. Every selection and query can go to a signed audit log.langchain-schemagate, works from LangChain and LangGraph), a LlamaIndex retriever on PyPI, the official MCP Registry (io.github.ashishsinha1602/schemagate), Glama and awesome-duckdb. 34.5k PyPI downloads (pepy.tech); releases carry SLSA provenance.The skill's setup block pins
schemagate[mcp]==1.15.4and points atdemo, a bundled sample schema, so it connects to nothing and needs no credentials until the user configures a real database in their own MCP config.Type of Contribution
Additional Notes
plugins/external.json.npm startlocally, so I added thedocs/README.skills.mdrow by hand in the generated format (alphabetical, afterscaffolding-...). Happy to regenerate if CI wants different output.skill:validatelimits (description 423 of 1,024 characters); the folder name matches the skill name.By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.