Agent skill

Run Dotnet Tests

by oocx in oocx/tfplan2md

Run .NET tests correctly using the test-with-timeout.sh wrapper to handle .NET 10 dual test runner modes and prevent test hangs.

MITAuto-check passedTesting & QA

Install Run Dotnet Tests

skills CLI
$ npx skills add oocx/tfplan2md --skill run-dotnet-tests -a claude-code

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

GitHub CLI
$ gh skill install oocx/tfplan2md run-dotnet-tests --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/oocx/tfplan2md.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/run-dotnet-tests .claude/skills/run-dotnet-tests && 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
run-dotnet-tests
GitHub stars
174
Token cost
~1.9k tokens
SKILL.md length
709 words
Files
1
Skills in repo
28
Repo updated
First seen
Licence
MIT

At a glance

Run .NET tests correctly using the test-with-timeout.sh wrapper to handle .NET 10 dual test runner modes and prevent test hangs.

  • Works in 3 steps: Changes to the src/ directory (where… → Normalizes any src/-prefixed paths in… → Enforces a timeout to prevent hung test…
  • Testing & QA work in your project
  • SKILL.md covers Purpose, When to Use This Skill, Hard Rules and .NET 10 Dual Test Runner Issue, plus 6 more sections
  • Calls dotnet and git

What it does

Run Dotnet Tests is an agent skill from oocx/tfplan2md. Run .NET tests correctly using the test-with-timeout.sh wrapper to handle .NET 10 dual test runner modes and prevent test hangs.

Its SKILL.md is about 1.9k 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. It works with .NET. The repository describes itself as: Convert terraform plans (json) into human readable markdown for easier review of changes in pull requests. The licence is MIT.

When your agent uses it

  • Testing & QA work in your project

Example prompts

  • “/run-dotnet-tests”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Changes to the src/ directory (where global.json with "runner": "Microsoft.Testing.Platform" exists)
  2. Normalizes any src/-prefixed paths in arguments
  3. Enforces a timeout to prevent hung test runs (default 120 seconds)

What it can do on your machine

Read from SKILL.md and the folder at commit 88d5240. 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
    • git

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

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    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

Run Dotnet Tests loads about 1.9k tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 709 words of instructions outside code blocks.

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

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 oocx/tfplan2md at commit 88d5240, republished under its MIT licence (© oocx). 709 words, ~1,911 tokens.

Download SKILL.mdSave it as .claude/skills/run-dotnet-tests/SKILL.md (or your agent's skills folder).
name
run-dotnet-tests
description
Run .NET tests correctly using the test-with-timeout.sh wrapper to handle .NET 10 dual test runner modes and prevent test hangs.

Run .NET Tests

Purpose

Provide standardized instructions for running .NET 10 tests correctly. Ensures agents use the scripts/test-with-timeout.sh wrapper instead of direct dotnet test calls, which fail due to .NET 10's dual test runner architecture.

When to Use This Skill

  • Before committing code changes that affect C# code
  • When verifying bug fixes or new features
  • When running targeted tests during development
  • When the full test suite must pass before marking work complete

Hard Rules

Must
  • ALWAYS use scripts/test-with-timeout.sh wrapper - never call dotnet test directly
  • Run tests from the repository root (the wrapper handles directory changes automatically)
  • Use --solution src/tfplan2md.slnx for full test suite runs
  • Use --project with relative paths from src/ directory (e.g., --project tests/Oocx.TfPlan2Md.TUnit/)
  • Wait for test completion and check exit code (0 = pass, non-zero = fail)
  • For snapshot test changes, use the update-test-snapshots skill instead of manual edits
Must Not
  • NEVER run dotnet test directly from command line - it will fail with MSB1001: Unknown switch errors from repo root
  • Never manually edit snapshot files in src/tests/Oocx.TfPlan2Md.TUnit/TestData/Snapshots/ - use the update-test-snapshots skill
  • Never ignore test failures or skip tests to make CI pass
  • Never modify test expectations to match broken output - fix the code, not the tests

.NET 10 Dual Test Runner Issue

.NET 10 introduced two distinct test runners with incompatible CLI flags:

Working DirectoryRunner Mode--solution--project--treenode-filterResult
Repo root (/)VSTest❌❌❌MSBuild error MSB1001: Unknown switch
src/ (where global.json lives)Microsoft.Testing.Platform✅✅✅Works correctly

The scripts/test-with-timeout.sh wrapper automatically:

  1. Changes to the src/ directory (where global.json with "runner": "Microsoft.Testing.Platform" exists)
  2. Normalizes any src/-prefixed paths in arguments
  3. Enforces a timeout to prevent hung test runs (default 120 seconds)

Why direct dotnet test fails: Running from repo root activates VSTest mode (no global.json), which doesn't support --solution, --project, or --treenode-filter flags. The wrapper ensures tests run from src/ directory to activate Microsoft.Testing.Platform mode.

Common Test Commands

Run Full Test Suite
bash
scripts/test-with-timeout.sh -- dotnet test --solution src/tfplan2md.slnx
Run Tests with Build
bash
scripts/test-with-timeout.sh -- dotnet test --solution src/tfplan2md.slnx --configuration Release --verbosity normal
Run Tests Without Build (faster when already built)
bash
scripts/test-with-timeout.sh -- dotnet test --solution src/tfplan2md.slnx --no-build
Override Timeout (for slow tests)
bash
scripts/test-with-timeout.sh --timeout-seconds 300 -- dotnet test --solution src/tfplan2md.slnx
Run Specific Project Tests
bash
scripts/test-with-timeout.sh -- dotnet test --project tests/Oocx.TfPlan2Md.TUnit/

TUnit Test Filtering

Important: This project uses TUnit (not xUnit). TUnit uses --treenode-filter instead of --filter. All TUnit-specific flags must come after -- in the wrapper command.

Filter by Class Name (hierarchical pattern)
bash
scripts/test-with-timeout.sh -- dotnet test --project tests/Oocx.TfPlan2Md.TUnit/ --treenode-filter /*/*/MarkdownRendererTests/*
Filter by Test Method Name
bash
scripts/test-with-timeout.sh -- dotnet test --project tests/Oocx.TfPlan2Md.TUnit/ --treenode-filter /*/*/*/Render_ValidPlan_ContainsSummarySection
Filter Pattern Explanation

TUnit uses hierarchical path patterns:

  • /*/*/*/TestMethodName - Match specific test method
  • /*/*/ClassName/* - Match all tests in a class
  • /*/Namespace.ClassName/* - Match by namespace and class

Workflow Integration

When to Run Tests
  1. During Development (after each meaningful change):

    bash
    # Run targeted tests for the area you modified
    scripts/test-with-timeout.sh -- dotnet test --project tests/Oocx.TfPlan2Md.TUnit/ --treenode-filter /*/*/YourTestClass/*
  2. Before Committing (C# code changes only):

    bash
    # Run full test suite to ensure no regressions
    scripts/test-with-timeout.sh -- dotnet test --solution src/tfplan2md.slnx --no-build
  3. Skip Tests When (documentation/agent instructions only):

    • Changes are limited to .agents/, AGENTS.md, scripts/ or docs/
    • No C# code was modified
    • The test suite doesn't validate these file types
Show full SKILL.md (264 more words)Show less
Handling Test Failures
  1. Read the failure output - TUnit provides detailed error messages
  2. Identify the failing test - Look for the test method name and class
  3. Run the specific failing test - Use --treenode-filter to isolate it
  4. Debug and fix - Fix the code (never modify test expectations unless the test itself is wrong)
  5. Re-run tests - Verify the fix works
  6. Run full suite - Ensure no regressions before committing
Snapshot Test Changes

If tests fail because snapshot files need updating (intentional output changes):

  1. Use the update-test-snapshots skill - Never manually edit snapshot files
  2. Verify the new output is correct - Review the diff carefully
  3. Include SNAPSHOT_UPDATE_OK in commit message - Document the intentional change
  4. Re-run tests - Confirm all tests pass with new snapshots

Exit Codes

Exit CodeMeaningAction
0All tests passedProceed with commit
1-123Test failuresFix failing tests before committing
124TimeoutIncrease timeout with --timeout-seconds or investigate hung tests
125Wrapper errorCheck command syntax

Golden Example

Complete workflow for implementing a feature:

bash
# 1. Build the project
dotnet build

# 2. Run targeted tests during development
scripts/test-with-timeout.sh -- dotnet test --project tests/Oocx.TfPlan2Md.TUnit/ --treenode-filter /*/*/MyFeatureTests/*

# 3. Make changes, run tests again
scripts/test-with-timeout.sh -- dotnet test --project tests/Oocx.TfPlan2Md.TUnit/ --treenode-filter /*/*/MyFeatureTests/*

# 4. Before committing, run full suite
scripts/test-with-timeout.sh -- dotnet test --solution src/tfplan2md.slnx --no-build

# 5. If all pass, commit changes
git add .
git commit -m "feat: implement my feature"

Troubleshooting

Error: MSBuild error MSB1001: Unknown switch

Cause: Running dotnet test directly from repo root (VSTest mode doesn't support --solution/--project flags) Solution: Use scripts/test-with-timeout.sh wrapper

Error: Timeout after 120 seconds

Cause: Tests taking longer than default timeout Solution: Increase timeout with --timeout-seconds 300 (or higher)

Error: Test not found with --treenode-filter

Cause: Incorrect filter pattern or test doesn't exist Solution:

  • List all tests first: scripts/test-with-timeout.sh -- dotnet test --list-tests
  • Verify filter pattern matches TUnit hierarchical structure
Snapshot test failures after output changes

Cause: Intentional output format changes Solution: Use update-test-snapshots skill to regenerate snapshots correctly

© oocx, 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/run-dotnet-tests of oocx/tfplan2md.

Open the folder on GitHubat commit 88d5240

Compare with similar skills

Run Dotnet Tests 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.

Run Dotnet Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Run Dotnet Tests this skilloocx/tfplan2md174—~1.9kAutomated safety check: PassMIT
Migrate Vstest To Mtpmicrosoft/testfx1k—~4.8kAutomated safety check: PassMIT
Evaluate PR Testsdotnet/maui23k—~2.9kAutomated safety check: PassMIT
Fix Random CI Test Failuredotnet/macios2.9k—~1.3kAutomated safety check: PassCustom licence
MAUI CI Investigatordotnet/maui23k—~2kAutomated safety check: PassMIT
Macios CI Postmortemdotnet/macios2.9k—~7.8kAutomated safety check: PassCustom licence

Similar skills

  • Migrate Vstest To Mtp

    microsoft/testfx

    Official

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

    1k GitHub stars~4.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Official

    Reviews the tests added in a pull request for fix coverage, quality, edge cases and test type, and recommends lighter test types where they would do.

    23k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Official

    Investigate and fix flaky/random CI test failures in dotnet/macios.

    2.9k GitHub stars~1.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Official

    Adds dotnet/maui-specific context for investigating failing PR checks and broken nightly builds: pipelines, Helix logs, binlogs and merge-readiness verdicts.

    23k GitHub stars~2k tokensUpdated today
    Testing & QAAuto-check passed
  • Official

    Post-mortem analysis of CI failures across recent PRs in dotnet/macios.

    2.9k GitHub stars~7.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Raven Test Triage

    marinasundstrom/raven

    Testing and stabilization workflow for the Raven compiler test suite.

    108 GitHub stars~1.4k tokensUpdated yesterday
    Testing & QAAuto-check passed

More from oocx/tfplan2md

All 28 skills in this repo
  • Create Agent Skill

    oocx/tfplan2md

    Create a new Agent Skill following project standards and templates.

    174 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Detect and analyze edge crossings and overlaps in SVG workflow diagrams using geometric intersection algorithms and visual analysis.

    174 GitHub stars~4.3k tokensUpdated today
    Auto-check passed
  • Generate PNG screenshots for release notes using the repository's HtmlRenderer and ScreenshotGenerator tools.

    174 GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Git Rebase Main

    oocx/tfplan2md

    Safely rebase the current feature branch on top of the latest origin/main.

    174 GitHub stars~456 tokensUpdated today
    Auto-check passed
  • Next Issue Number

    oocx/tfplan2md

    Determine the next available issue number across all change types (feature, fix, workflow, website) by checking both local docs and remote branches, then reserve it by pushing an empty branch.

    174 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Run Uat

    oocx/tfplan2md

    Run User Acceptance Testing by creating a PR with rendered markdown on GitHub or Azure DevOps.

    174 GitHub stars~1.2k tokensUpdated today
    Auto-check passed

Works with

Questions about Run Dotnet Tests

What does Run Dotnet Tests do?

Run .NET tests correctly using the test-with-timeout.sh wrapper to handle .NET 10 dual test runner modes and prevent test hangs. Run Dotnet Tests is an agent skill from oocx/tfplan2md.NET 10 dual test runner modes and prevent test hangs.

When should I use Run Dotnet Tests?

Run Dotnet Tests fits situations like: testing & QA work in your project.

How do I install Run Dotnet Tests in Claude Code?

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

How do I install Run Dotnet Tests in Codex?

Run `npx skills add oocx/tfplan2md --skill run-dotnet-tests -a codex`. Or copy the skill folder (.agents/skills/run-dotnet-tests in oocx/tfplan2md) into .agents/skills/run-dotnet-tests in your project. Codex loads it when a task matches its description.

Can I use Run Dotnet Tests 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 oocx/tfplan2md --skill run-dotnet-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/run-dotnet-tests, .gemini/skills/run-dotnet-tests, .github/skills/run-dotnet-tests and .opencode/skills/run-dotnet-tests in your project.

What does Run Dotnet Tests need to run?

Going by SKILL.md and its folder, Run Dotnet Tests needs the command-line tools its instructions call (dotnet and git).

Does Run Dotnet Tests access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Run Dotnet Tests 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 Run Dotnet Tests use?

Run Dotnet Tests 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 Run Dotnet Tests use?

About 1.9k tokens (SKILL.md is roughly 7.6k 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 Run Dotnet Tests?

Skills that share tags, products or a category with Run Dotnet Tests: Migrate Vstest To Mtp (microsoft/testfx, 1k stars), Evaluate PR Tests (dotnet/maui, 23k stars), Fix Random CI Test Failure (dotnet/macios, 2.9k stars) and MAUI CI Investigator (dotnet/maui, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Run Dotnet Tests?

oocx (a GitHub user) maintains it in oocx/tfplan2md, which has 174 GitHub stars. The repository holds 28 skills in this directory. The repository was last updated on October 7, 2026.

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