Official agent skill

Filter Syntax

by microsoft in microsoft/testfx

Reference data for test filter syntax across all platform and framework combinations: VSTest --filter expressions, MTP filters for MSTest/NUnit/xUnit v3/TUnit, and VSTest-to-MTP filter translation.

OfficialMITAuto-check passedTesting & QA

Install Filter Syntax

skills CLI
$ npx skills add microsoft/testfx --skill filter-syntax -a claude-code

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

GitHub CLI
$ gh skill install microsoft/testfx filter-syntax --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/testfx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/filter-syntax .claude/skills/filter-syntax && 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
filter-syntax
GitHub stars
1k
Used in
3 other repos
Token cost
~1.5k tokens
SKILL.md length
387 words
Files
1
Skills in repo
44
Repo updated
First seen
Licence
MIT

At a glance

Reference data for test filter syntax across all platform and framework combinations: VSTest --filter expressions, MTP filters for MSTest/NUnit/xUnit v3/TUnit, and VSTest-to-MTP filter translation.

  • Tasks that involve Unit testing
  • SKILL.md covers VSTest filters (MSTest, xUnit…, MTP filters — MSTest and NUnit, MTP filters — xUnit (v3) and MTP filters — TUnit, plus 1 more section
  • Calls dotnet
  • Tasks that involve Translation

What it does

Filter Syntax is an agent skill from microsoft/testfx, published by the product's own GitHub organization. Reference data for test filter syntax across all platform and framework combinations: VSTest --filter expressions, MTP filters for MSTest/NUnit/xUnit v3/TUnit, and VSTest-to-MTP filter translation. DO NOT USE directly — loaded by run-tests, mtp-hot-reload, and migrate-vstest-to-mtp when they need filter syntax.

Its SKILL.md is about 1.5k 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 Testing & QA, covering Unit testing and Translation. The repository describes itself as: This repository holds the source code of Microsoft.Testing.Platform (MTP), a lightweight alternative to VSTest, as well as MSTest adapter and framework. The licence is MIT.

When your agent uses it

  • Tasks that involve Unit testing
  • Tasks that involve Translation

Example prompts

  • “/filter-syntax”

What it can do on your machine

Read from SKILL.md and the folder at commit 7c7d590. 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

    Links to these hosts (documentation or services it may open):

    • xunit.net

    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

Filter Syntax loads about 1.5k tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 387 words of instructions outside code blocks.

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

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/testfx at commit 7c7d590, republished under its MIT licence (© microsoft). 387 words, ~1,482 tokens.

Download SKILL.mdSave it as .claude/skills/filter-syntax/SKILL.md (or your agent's skills folder).
name
filter-syntax
description
Reference data for test filter syntax across all platform and framework combinations: VSTest --filter expressions, MTP filters for MSTest/NUnit/xUnit v3/TUnit, and VSTest-to-MTP filter translation. DO NOT USE directly — loaded by run-tests, mtp-hot-reload, and migrate-vstest-to-mtp when they need filter syntax.
user-invocable
false
license
MIT

Test Filter Syntax Reference

Filter syntax depends on the platform and test framework.

VSTest filters (MSTest, xUnit v2, NUnit on VSTest)

bash
dotnet test --filter <EXPRESSION>

Expression syntax: <Property><Operator><Value>[|&<Expression>]

Operators:

OperatorMeaning
=Exact match
!=Not exact match
~Contains
!~Does not contain

Combinators: | (OR), & (AND). Parentheses for grouping: (A|B)&C

Supported properties by framework:

FrameworkProperties
MSTestFullyQualifiedName, Name, ClassName, Priority, TestCategory
xUnitFullyQualifiedName, DisplayName, Traits
NUnitFullyQualifiedName, Name, Priority, TestCategory

An expression without an operator is treated as FullyQualifiedName~<value>.

Examples (VSTest):

bash
# Run tests whose name contains "LoginTest"
dotnet test --filter "Name~LoginTest"

# Run a specific test class
dotnet test --filter "ClassName=MyNamespace.MyTestClass"

# Run tests in a category
dotnet test --filter "TestCategory=Integration"

# Exclude a category
dotnet test --filter "TestCategory!=Slow"

# Combine: class AND category
dotnet test --filter "ClassName=MyNamespace.MyTestClass&TestCategory=Unit"

# Either of two classes
dotnet test --filter "ClassName=MyNamespace.ClassA|ClassName=MyNamespace.ClassB"

MTP filters — MSTest and NUnit

MSTest and NUnit on MTP use the same --filter syntax as VSTest (same properties, operators, and combinators). The only difference is how the flag is passed:

bash
# .NET SDK 8/9 (after --)
dotnet test -- --filter "Name~LoginTest"

# .NET SDK 10+ (direct)
dotnet test --filter "Name~LoginTest"

MTP filters — xUnit (v3)

xUnit v3 on MTP uses framework-specific filter flags instead of the generic --filter expression:

FlagDescription
--filter-class "name"Run all tests in a given class
--filter-not-class "name"Exclude all tests in a given class
--filter-method "name"Run a specific test method
--filter-not-method "name"Exclude a specific test method
--filter-namespace "name"Run all tests in a namespace
--filter-not-namespace "name"Exclude all tests in a namespace
--filter-trait "name=value"Run tests with a matching trait
--filter-not-trait "name=value"Exclude tests with a matching trait

Multiple values can be specified with a single flag: --filter-class Foo Bar.

bash
# .NET SDK 8/9
dotnet test -- --filter-class "MyNamespace.LoginTests"

# .NET SDK 10+
dotnet test --filter-class "MyNamespace.LoginTests"

# Combine: namespace + trait
dotnet test --filter-namespace "MyApp.Tests.Integration" --filter-trait "Category=Smoke"
xUnit v3 query filter language

For complex expressions, use --filter-query with a path-segment syntax:

text
/<assemblyFilter>/<namespaceFilter>/<classFilter>/<methodFilter>[traitName=traitValue]

Each segment matches against: assembly name, namespace, class name, method name. Use * for "match all" in any segment. Documentation: https://xunit.net/docs/query-filter-language

shell
# xUnit.net v3 MTP — using query language (assembly/namespace/class/method[trait])
dotnet test -- --filter-query "/*/*/*IntegrationTests*/*[Category=Smoke]"
Show full SKILL.md (151 more words)Show less

MTP filters — TUnit

TUnit uses --treenode-filter with a path-based syntax:

text
--treenode-filter "/<Assembly>/<Namespace>/<ClassName>/<TestName>"

Wildcards (*) are supported in any segment. Filter operators can be appended to test names for property-based filtering.

OperatorMeaning
*Wildcard match
=Exact property match (e.g., [Category=Unit])
!=Exclude property value
&AND (combine conditions)
|OR (within a segment, requires parentheses)

Examples (TUnit):

bash
# All tests in a class
dotnet run --treenode-filter "/*/*/LoginTests/*"

# A specific test
dotnet run --treenode-filter "/*/*/*/AcceptCookiesTest"

# By namespace prefix (wildcard)
dotnet run --treenode-filter "/*/MyProject.Tests.Api*/*/*"

# By custom property
dotnet run --treenode-filter "/*/*/*/*[Category=Smoke]"

# Exclude by property
dotnet run --treenode-filter "/*/*/*/*[Category!=Slow]"

# OR across classes
dotnet run --treenode-filter "/*/*/(LoginTests)|(SignupTests)/*"

# Combined: namespace + property
dotnet run --treenode-filter "/*/MyProject.Tests.Integration/*/*/*[Priority=Critical]"

VSTest → MTP filter translation (for migration)

MSTest, NUnit, and xUnit.net v2 (with YTest.MTP.XUnit2): The VSTest --filter syntax is identical on both VSTest and MTP. No changes needed.

xUnit.net v3 (native MTP): xUnit.net v3 does NOT support the VSTest --filter syntax on MTP. Translate filters using xUnit.net v3's native options:

VSTest --filter syntaxxUnit.net v3 MTP equivalentNotes
FullyQualifiedName~ClassName--filter-class *ClassName*Wildcards required for substring match
FullyQualifiedName=Ns.Class.Method--filter-method Ns.Class.MethodExact match on fully qualified method
Name=MethodName--filter-method *MethodName*Wildcards for substring match
Category=Value (trait)--filter-trait "Category=Value"Filter by trait name/value pair
Complex expressions--filter-query "expr"Uses xUnit.net query filter language (see above)

© 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/filter-syntax of microsoft/testfx.

Open the folder on GitHubat commit 7c7d590

Used in 3 other repositories

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 3 other GitHub owners. This page covers the copy in microsoft/testfx, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Filter Syntax 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.

Filter Syntax compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Filter Syntax this skillmicrosoft/testfx1k3 repos~1.5kAutomated safety check: PassMIT
Add UI Stringopenfootmanager/openfootmanager1.1k—~2.6kAutomated safety check: PassGPL-3.0
Migrate Vstest To Mtpdotnet/skills5.6k1 repos~5.6kAutomated safety check: PassMIT
Llava Onevision2 ConsistencyEvolvingLMMs-Lab/LLaVA-OneVision-21.2k—~4.1kAutomated safety check: PassApache-2.0
Migrate Vstest To Mtprunceel/ReactiveProperty944—~4.3kAutomated safety check: PassMIT
Dx Devops Test Failures Analyzeforcedotcom/sf-skills1.1k—~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Add UI String

    openfootmanager/openfootmanager

    Add or change any text a player can see, in every locale the game ships in.

    1.1k GitHub stars~2.6k tokensUpdated today
    Testing & QAAuto-check passed
  • Official

    Use this skill before answering, planning, or editing whenever .NET tests or CI are switching from VSTest to Microsoft.Testing.Platform (MTP), or an MTP migration behaves differently.

    5.6k GitHub starsUsed in 1 repo~5.6k tokens
    Testing & QAAuto-check passed
  • Llava Onevision2 Consistency

    EvolvingLMMs-Lab/LLaVA-OneVision-2

    Bilingual guide for running and interpreting LLaVA-OneVision2 HF vs Megatron consistency checks across TP and PP settings

    1.2k GitHub stars~4.1k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Migrate Vstest To Mtp

    runceel/ReactiveProperty

    Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP).

    944 GitHub stars~4.3k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Dx Devops Test Failures Analyze

    forcedotcom/sf-skills

    Analyzes DevOps Center test failures and Code Analyzer violations in plain language — failure category, offending file/class/method/line, rule violated, fix direction, and prioritized improvement…

    1.1k GitHub stars~1.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Lokalise Hello World

    jeremylongshore/tons-of-skills-marketplace

    Create a minimal working Lokalise example. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~1.9k tokensUpdated today
    Testing & QAAuto-check passed

More from microsoft/testfx

All 44 skills in this repo
  • Official

    Guide for organizing MSBuild infrastructure with Directory.Build.props, Directory.Build.targets, Directory.Packages.props, and Directory.Build.rsp.

    1k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Binlog Failure Analysis

    microsoft/testfx

    Official

    Analyze MSBuild binary logs to diagnose build failures. An agent skill from microsoft/testfx.

    1k GitHub starsUsed in 3 repos~730 tokens
    Auto-check passed
  • Coverage Analysis

    microsoft/testfx

    Official

    Project-wide code coverage and CRAP (Change Risk Anti-Patterns) score analysis for .NET projects.

    1k GitHub stars~7.3k tokensUpdated today
    Auto-check passed
  • Incremental Build

    microsoft/testfx

    Official

    Guide for optimizing MSBuild incremental builds. An agent skill from microsoft/testfx.

    1k GitHub starsUsed in 3 repos~3.7k tokens
    Auto-check passed
  • Msbuild Modernization

    microsoft/testfx

    Official

    Guide for modernizing and migrating MSBuild project files to SDK-style format.

    1k GitHub starsUsed in 3 repos~4.3k tokens
    Auto-check passed
  • Msbuild Antipatterns

    microsoft/testfx

    Official

    Catalog of MSBuild anti-patterns with detection rules and fix recipes.

    1k GitHub stars~4.5k tokensUpdated today
    Auto-check passed

Questions about Filter Syntax

What does Filter Syntax do?

Reference data for test filter syntax across all platform and framework combinations: VSTest --filter expressions, MTP filters for MSTest/NUnit/xUnit v3/TUnit, and VSTest-to-MTP filter translation. Filter Syntax is an agent skill from microsoft/testfx, published by the product's own GitHub organization. Reference data for test filter syntax across all platform and framework combinations: VSTest --filter expressions, MTP filters for MSTest/NUnit/xUnit v3/TUnit, and VSTest-to-MTP filter translation.

When should I use Filter Syntax?

Filter Syntax fits situations like: tasks that involve Unit testing; tasks that involve Translation.

How do I install Filter Syntax in Claude Code?

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

How do I install Filter Syntax in Codex?

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

Can I use Filter Syntax 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/testfx --skill filter-syntax -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/filter-syntax, .gemini/skills/filter-syntax, .github/skills/filter-syntax and .opencode/skills/filter-syntax in your project.

What does Filter Syntax need to run?

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

Does Filter Syntax access the network?

SKILL.md names 1 domain. As links in the text: xunit.net. This is read from the text; nothing was executed.

Is Filter Syntax 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 Filter Syntax use?

Filter Syntax is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Filter Syntax use?

About 1.5k tokens (SKILL.md is roughly 5.9k 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 Filter Syntax?

Skills that share tags, products or a category with Filter Syntax: Add UI String (openfootmanager/openfootmanager, 1.1k stars), Migrate Vstest To Mtp (dotnet/skills, 5.6k stars), Llava Onevision2 Consistency (EvolvingLMMs-Lab/LLaVA-OneVision-2, 1.2k stars) and Migrate Vstest To Mtp (runceel/ReactiveProperty, 944 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Filter Syntax?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/testfx, which has 1,047 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on October 8, 2026.

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