Official agent skill

Add Feature

by microsoft in microsoft/SqlScriptDOM

Add new T-SQL features to ScriptDOM parser. An agent skill from microsoft/SqlScriptDOM.

OfficialMITAuto-check passedDatabases

Install Add Feature

skills CLI
$ npx skills add microsoft/SqlScriptDOM --skill add-feature -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/SqlScriptDOM add-feature --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/SqlScriptDOM.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/add-feature .claude/skills/add-feature && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-feature
GitHub stars
279
Token cost
~2.8k tokens
SKILL.md length
1,049 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Add new T-SQL features to ScriptDOM parser. An agent skill from microsoft/SqlScriptDOM.

  • Works in 6 steps: Feature Discovery Interview → Determine Feature Type → Grammar Rule Development → …
  • Databases work in your project
  • SKILL.md covers Overview, Step 1: Feature Discovery…, Step 2: Determine Feature Type and Step 3: Grammar Rule Development, plus 5 more sections
  • Calls dotnet

What it does

Add Feature is an agent skill from microsoft/SqlScriptDOM, published by the product's own GitHub organization. Add new T-SQL features to ScriptDOM parser. Asks questions about SQL Server version and feature type, then guides through grammar changes, AST updates, script generation, and testing using existing instruction files. Handles syntax additions, new functions, data types, index types, and validation rules.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases. It works with Microsoft SQL Server, SQL and .NET. The repository describes itself as: ScriptDOM/SqlDOM is a .NET library for parsing T-SQL statements and interacting with its abstract syntax tree. The licence is MIT.

When your agent uses it

  • Databases work in your project

Example prompts

  • “/add-feature”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Feature Discovery Interview
  2. Determine Feature Type
  3. Grammar Rule Development
  4. Testing
  5. Debugging and Troubleshooting
  6. Implementation Checklist

What it can do on your machine

Read from SKILL.md and the folder at commit eaf3a6e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Feature loads about 2.8k tokens when it runs. Until then it costs about 79 tokens; SKILL.md has 1,049 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/SqlScriptDOM at commit eaf3a6e, republished under its MIT licence (© microsoft). 1,049 words, ~2,773 tokens.

Download SKILL.mdSave it as .claude/skills/add-feature/SKILL.md (or your agent's skills folder).
name
add-feature
description
Add new T-SQL features to ScriptDOM parser. Asks questions about SQL Server version and feature type, then guides through grammar changes, AST updates, script generation, and testing using existing instruction files. Handles syntax additions, new functions, data types, index types, and validation rules.
argument-hint
Feature description (e.g., 'Add VECTOR data type', 'Add JSON_OBJECT function')
user-invocable
true
platforms
SQL Server, Azure SQL DB, Fabric, Fabric DW, VNext

Overview

This skill helps add new T-SQL features to the ScriptDOM parser by:

  1. Interviewing you about the feature and target platform (SQL Server, Azure SQL DB, Fabric, Fabric DW, VNext)
  2. Determining the latest parser version from SqlVersionFlags.cs
  3. Routing you to the appropriate parser:
    • SQL Server → version-specific parser (TSql120-180)
    • Azure SQL DB/Fabric/VNext → latest parser version
    • Fabric DW → separate TSqlFabricDW parser
  4. Classifying the change type (grammar, validation, function, data type, etc.)
  5. Guiding through implementation and testing without duplicating existing documentation

Step 1: Feature Discovery Interview

Ask the user these questions to understand the feature:

Required Questions
  1. What T-SQL feature are you adding?

    • Example: "VECTOR data type", "JSON_OBJECT function", "RESUMABLE option for ALTER TABLE"
  2. Which platform is this feature for?

    • SQL Server (on-premises / standalone)
    • Azure SQL Database (uses latest parser version)
    • Fabric (uses latest parser version)
    • Fabric DW (uses separate TSqlFabricDW parser)
    • VNext (future version, uses latest parser version unless repo instructions say otherwise)
  3. If SQL Server, which version introduced this feature?

    • SQL Server 2014 (TSql120)
    • SQL Server 2016 (TSql130)
    • SQL Server 2017 (TSql140)
    • SQL Server 2019 (TSql150)
    • SQL Server 2022 (TSql160)
    • SQL Server 2025 (TSql170)
    • SQL Server vNext (TSql180)
    • (Skip if Azure SQL DB, Fabric, or VNext - these use TSql180 by default)
  4. Do you have example T-SQL syntax or Microsoft documentation links?

    • This helps verify the exact syntax requirements
Optional Context Questions
  1. Is this a new syntax element or enabling existing syntax in a new context?

    • New syntax: Requires grammar rules, AST nodes
    • Validation fix: May only need version checks in validation code
  2. Does similar syntax already work in other contexts?

    • Example: "RESUMABLE works for ALTER INDEX but not ALTER TABLE"
    • This indicates a validation issue rather than missing grammar

Step 2: Determine Feature Type

Based on the answers, classify the feature into one of these types:

Type A: Validation-Only Fix

Indicators:

  • Similar syntax already works elsewhere in SQL
  • Error message says "Option 'X' is not valid..." or "Feature 'Y' not supported..."
  • The grammar may already parse it, but validation blocks it

→ Route to: grammar_validation.guidelines.instructions.md

Type B: New Grammar/Syntax

Indicators:

  • Completely new statement, clause, or operator
  • Error says "Incorrect syntax near..." or "Unexpected token..."
  • Parser doesn't recognize the syntax at all

→ Route to: bug_fixing.guidelines.instructions.md

Type C: New System Function

Indicators:

  • Adding a new built-in T-SQL function (e.g., JSON_OBJECT, STRING_AGG)
  • May need special handling for RETURN statement contexts

→ Route to: function.guidelines.instructions.md

Type D: New Data Type

Indicators:

  • Adding a completely new SQL Server data type (e.g., VECTOR, GEOGRAPHY)
  • Requires custom parameter syntax (e.g., VECTOR(1536, FLOAT32))

→ Route to: new_data_types.guidelines.instructions.md

Type E: New Index Type

Indicators:

  • Adding a new CREATE INDEX variant (e.g., VECTOR INDEX, JSON INDEX)
  • Requires specialized syntax different from standard indexes

→ Route to: new_index_types.guidelines.instructions.md

Type F: Parser Predicate Recognition (Parentheses)

Indicators:

  • Identifier-based predicate works without parentheses but fails with them
  • Error near closing parenthesis: WHERE (REGEXP_LIKE(...)) fails

→ Route to: parser.guidelines.instructions.md

Type G: Database Option (ALTER/CREATE DATABASE SET)

Indicators:

  • Adding a database option for ALTER DATABASE or CREATE DATABASE statements
  • Simple ON/OFF option (e.g., SET AUTOMATIC_INDEX_COMPACTION = ON)
  • Complex option with sub-options (e.g., SET CHANGE_TRACKING (AUTO_CLEANUP = ON))
  • Enum-based option (e.g., SET RECOVERY FULL)

→ Route to: database_option.guidelines.instructions.md


Step 3: Grammar Rule Development

For grammar changes (Types B, C, D, E, G), follow this workflow:

3.1 Identify Target Grammar File

First, determine the latest parser version: Check SqlScriptDom/Parser/TSql/SqlVersionFlags.cs for the highest TSql version enum value.

Then select the appropriate grammar file:

For SQL Server (on-premises):
  • SQL 2014+: TSql120.g
  • SQL 2016+: TSql130.g
  • SQL 2017+: TSql140.g
  • SQL 2019+: TSql150.g
  • SQL 2022+: TSql160.g
  • SQL 2025+: TSql170.g
  • SQL Server vNext: TSql180.g
For Azure SQL Database, Fabric, VNext:
  • Use the latest parser version (currently TSql180.g)
  • Check SqlVersionFlags.cs to confirm the highest version
For Fabric DW:
  • Use TSqlFabricDW.g (separate parser with Fabric-specific syntax)
Show full SKILL.md (427 more words)Show less
3.2 Grammar Development Patterns

Reference: grammar.guidelines.instructions.md

Key patterns:

  • Use this.FragmentFactory.CreateFragment<Type>() for AST nodes
  • Use syntactic predicates (LA(1) == Token) for lookahead
  • Avoid modifying shared grammar rules (create specialized versions instead)
  • Include proper script generation in ScriptGenerator
3.3 AST Updates

If adding new AST nodes:

  1. Edit SqlScriptDom/Parser/TSql/Ast.xml
  2. Rebuild to regenerate visitor classes
  3. Implement script generation in SqlScriptDom/ScriptDom/SqlServer/ScriptGenerator

Step 4: Testing

Reference: testing.guidelines.instructions.md

4.1 Create Test Files
  1. Input Script: Test/SqlDom/TestScripts/YourFeature.sql

    • Include all syntax variations
    • Test edge cases, parameters, expressions
  2. Baseline: Test/SqlDom/Baselines<version>/YourFeature.sql

    • Expected pretty-printed output after parse → script gen → reparse
4.2 Add Test Method
For SQL Server versions (TSql120-180):

In Test/SqlDom/Only<version>SyntaxTests.cs:

csharp
[TestMethod]
public void YourFeatureTest()
{
    ParserTest<version>("YourFeature.sql");
}
For Fabric DW:

Add to the OnlyFabricDWTestInfos array in Test/SqlDom/OnlyFabricDWSyntaxTests.cs:

csharp
new ParserTestFabricDW("YourFeatureFabricDW.sql", 
    nErrors80: X, nErrors90: Y, nErrors100: Z, 
   nErrors110: A, nErrors120: B, nErrors130: C, 
   nErrors140: D, nErrors150: E, nErrors160: F, nErrors170: G, nErrors180: H),

(Set expected error counts for each parser version)

Simplified patterns available - see testing guidelines for:

  • ParserTestAllowingErrors - for scripts with expected parse errors
  • ParserTestOutput constructors - for custom output verification
  • Error message verification - exact match or fragment-based
4.3 Run Tests
bash
# Build to regenerate parser
dotnet build SqlScriptDom/Microsoft.SqlServer.TransactSql.ScriptDom.csproj -c Debug

# Run specific test
dotnet test --filter "FullyQualifiedName~YourFeatureTest" -c Debug

# ALWAYS run full suite before committing
dotnet test Test/SqlDom/UTSqlScriptDom.csproj -c Debug

Step 5: Debugging and Troubleshooting

Reference: debugging_workflow.guidelines.instructions.md

Common issues:

  • Tests fail after grammar changes: Likely modified a shared rule - create specialized version
  • Script generation mismatch: Update ScriptGenerator for your AST nodes
  • Version errors: Check validation code in TSql80ParserBaseInternal.cs

Step 6: Implementation Checklist

Before marking the feature complete:

  • Grammar rules added/modified in correct TSql<version>.g or TSqlFabricDW.g file
  • AST nodes defined in Ast.xml (if new nodes needed)
  • Script generation implemented for new AST nodes
  • Validation rules updated (if version-gated)
  • Test script created in TestScripts/ (use appropriate suffix: .sql or FabricDW.sql)
  • Baseline created in Baselines<version>/ or BaselinesFabricDW/
  • Test method added to Only<version>SyntaxTests.cs or OnlyFabricDWSyntaxTests.cs
  • All tests pass (including full test suite)
  • No regressions in unrelated tests

Quick Reference: File Locations

ComponentPath
Grammar files (SQL Server)SqlScriptDom/Parser/TSql/TSql*.g
Grammar file (Fabric DW)SqlScriptDom/Parser/TSql/TSqlFabricDW.g
Version detectionSqlScriptDom/Parser/TSql/SqlVersionFlags.cs
AST definitionSqlScriptDom/Parser/TSql/Ast.xml
Script generatorSqlScriptDom/ScriptDom/SqlServer/ScriptGenerator
Validation codeSqlScriptDom/Parser/TSql/TSql80ParserBaseInternal.cs
Test scriptsTest/SqlDom/TestScripts/
BaselinesTest/SqlDom/Baselines<version>/ or BaselinesFabricDW/
Test classesTest/SqlDom/Only<version>SyntaxTests.cs or FabricDWSyntaxTests.cs

Agent Workflow

When invoked, the agent should:

  1. Determine the latest parser version by reading SqlScriptDom/Parser/TSql/SqlVersionFlags.cs
  2. Interview the user using the questions in Step 1
    • Ask about platform (SQL Server, Azure SQL DB, Fabric, Fabric DW, VNext)
    • For Azure/Fabric/VNext → use latest parser version
    • For Fabric DW → use TSqlFabricDW.g
    • For SQL Server → ask for specific version
  3. Classify the feature type using Step 2 criteria
  4. Load the appropriate instruction file using read_file tool
  5. Guide through implementation by referencing specific sections of the loaded instruction file
  6. Execute the development workflow:
    • Make grammar/validation changes
    • Regenerate parser (build)
    • Create test files
    • Run tests
    • Debug failures
  7. Verify completeness using Step 6 checklist

Never duplicate content from instruction files - always reference and quote specific sections.

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/add-feature of microsoft/SqlScriptDOM.

Open the folder on GitHubat commit eaf3a6e

Compare with similar skills

Add Feature next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Feature compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Feature this skillmicrosoft/SqlScriptDOM279—~2.8kAutomated safety check: PassMIT
Azure Resource Manager SQL Dotnetmicrosoft/skills3.1k6 repos~2.6kAutomated safety check: PassMIT
Database Migrations SQL Migrationsrmyndharis/antigravity-skills1.7k3 repos~577Automated safety check: NotesMIT
Ravendbravendb/docs115—~2.3kAutomated safety check: PassMIT
SQL ProJeffallan/claude-skills12k—~1.3kAutomated safety check: PassMIT
DBoracle/skills873—~1.4kAutomated safety check: PassUPL-1.0

Similar skills

  • Official

    Azure Resource Manager SDK for Azure SQL in .NET. An agent skill from microsoft/skills.

    3.1k GitHub starsUsed in 6 repos~2.6k tokens
    DevOps & CloudAuto-check passed
  • Database Migrations SQL Migrations

    rmyndharis/antigravity-skills

    SQL database migrations with zero-downtime strategies for PostgreSQL, MySQL, SQL Server

    1.7k GitHub starsUsed in 3 repos~577 tokens
    DatabasesAuto-check: notes
  • Ravendb

    ravendb/docs

    Read this before writing any RavenDB query, client call or /databases/ request.

    115 GitHub stars~2.3k tokensUpdated yesterday
    DatabasesAuto-check passed
  • SQL Pro

    Jeffallan/claude-skills

    Optimizes SQL queries and designs schemas using CTEs, window functions, covering indexes and EXPLAIN ANALYZE, with notes on dialect differences between major databases.

    12k GitHub stars~1.3k tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • DB

    oracle/skills

    Official

    Oracle Database guidance for SQL, PL/SQL, SQLcl, ORDS, Oracle Vector SDK, administration, app development, performance, security, migrations, and agent-safe database workflows.

    873 GitHub stars~1.4k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Ef Core

    codewithmukesh/dotnet-claude-kit

    Entity Framework Core patterns for .NET 10. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~2.3k tokens
    DatabasesAuto-check passed

More from microsoft/SqlScriptDOM

  • Verify And Test Tsql Syntax

    microsoft/SqlScriptDOM

    Official

    Verify whether an exact T-SQL script is already supported by SqlScriptDOM, then add or update the correct parser tests and baselines.

    279 GitHub stars~1.3k tokensUpdated 7 days ago
    Auto-check passed

Categories

Questions about Add Feature

What does Add Feature do?

Add new T-SQL features to ScriptDOM parser. An agent skill from microsoft/SqlScriptDOM. Add Feature is an agent skill from microsoft/SqlScriptDOM, published by the product's own GitHub organization. Add new T-SQL features to ScriptDOM parser.

When should I use Add Feature?

Add Feature fits situations like: databases work in your project.

How do I install Add Feature in Claude Code?

Run `npx skills add microsoft/SqlScriptDOM --skill add-feature -a claude-code`. Or copy the skill folder (.agents/skills/add-feature in microsoft/SqlScriptDOM) into .claude/skills/add-feature in your project. Claude Code loads it when a task matches its description.

How do I install Add Feature in Codex?

Run `npx skills add microsoft/SqlScriptDOM --skill add-feature -a codex`. Or copy the skill folder (.agents/skills/add-feature in microsoft/SqlScriptDOM) into .agents/skills/add-feature in your project. Codex loads it when a task matches its description.

Can I use Add Feature in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/SqlScriptDOM --skill add-feature -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-feature, .gemini/skills/add-feature, .github/skills/add-feature and .opencode/skills/add-feature in your project.

What does Add Feature need to run?

Going by SKILL.md and its folder, Add Feature needs the command-line tools its instructions call (dotnet).

Does Add Feature access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Add Feature safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add Feature use?

Add Feature is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Feature use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Add Feature?

Skills that share tags, products or a category with Add Feature: Azure Resource Manager SQL Dotnet (microsoft/skills, 3.1k stars), Database Migrations SQL Migrations (rmyndharis/antigravity-skills, 1.7k stars), Ravendb (ravendb/docs, 115 stars) and SQL Pro (Jeffallan/claude-skills, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Feature?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/SqlScriptDOM, which has 279 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on September 30, 2026.

Source: microsoft/SqlScriptDOM on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.