agentleFS
foxminchanfoxminchan/BookWorm/.agents/skills/tunit/SKILL.md

tunit

Skill508 starsChanged 8 days agoMITView on GitHub

Write or troubleshoot tests using TUnit, TUnit.Assertions, or TUnit.Mocks, or migrate tests to TUnit. Routes to task-specific official documentation. Use only for tasks involving these packages or migration to TUnit.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 1

    1. thomhurst/TUnit★ 4k94% same

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository6 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to find the TUnit guidance needed for the current task.

    line 9
  2. Very specific:

    Check the relevant project files for TUnit package versions, target frameworks, and the SDK/test runner in global.json.

    line 13
  3. Very specific:

    Follow related links only to resolve a specific gap.

    line 16

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

TUnit

Use this skill to find the TUnit guidance needed for the current task. Fetch documentation with an available web tool or HTTP client; network access is required. The documentation contains the API details and examples; do not load the whole site.

Load only what the task needs

  1. Check the relevant project files for TUnit package versions, target frameworks, and the SDK/test runner in global.json. Include centrally managed package versions when present. Preserve the project's versions unless an upgrade is requested or necessary and explained.
  2. Choose the closest topic below and fetch that Markdown page before choosing APIs or commands. Start with one page; fetch another only when the task needs it. Skip pages already available in the conversation unless they need refreshing.
  3. For an unlisted topic or a broken route, fetch the documentation index, search it for the feature or diagnostic, then fetch only the matching page. Do not fetch llms-full.txt or crawl every link.
  4. Follow related links only to resolve a specific gap. Prefer the .md version: remove a trailing slash and append .md to an HTML documentation path, before any fragment. Keep existing .md paths unchanged. Resolve relative links against the fetched page's URL.
  5. Apply the relevant example to the existing project and run a focused build or test when making code changes. Cite the documentation used. If current documentation differs from the installed API, check version-matched source or local API evidence before proposing an upgrade. If fetching fails, use available local documentation and state what could not be verified; do not guess APIs.

Topic routes

Choose the link that matches the task; these are alternatives, not a reading checklist.

TaskDocumentation
Create or configure a projectInstallation
Write a basic testFirst test
Assertions, exceptions, or assertion compositionAssertions
Parameterized testsArguments, method data, or matrix data
Setup, teardown, or hooksLifecycle
Fixtures, shared resources, or dependency injectionClass data sources or dependency injection
Concurrency or dependencies between testsParallelism or ordering
Run tests or select testsRunning tests or filters
Migrate an existing suitexUnit, NUnit, or MSTest, matching the source framework
MockingTUnit.Mocks
Aspire integration testingAspire
ASP.NET Core integration testingASP.NET Core
Playwright browser testingPlaywright
Testcontainers and container fixturesASP.NET Core integration examples (see "With Testcontainers")
Native AOT, trimming, or reflection modeAOT compatibility or engine modes
Custom assertionsAssertion source generators or custom assertion implementations
Custom data sourcesData source generators
Event receiversEvent subscribing
TestContext and test metadataTest context
Diagnostics, output, or tracingLogging, test artifacts, or OpenTelemetry
CancellationCancelling a test
Discovery, build, or execution failuresTroubleshooting

For other topics, such as analyzers or framework-specific integrations, use the index selectively.

Essential distinctions

  • Await TUnit assertions, for example await Assert.That(actual).IsEqualTo(expected);.
  • Tests run in parallel by default. Account for shared mutable state and resource lifetimes.
  • TUnit uses Microsoft.Testing.Platform and --treenode-filter. Match command syntax to the project's SDK and runner mode; do not substitute VSTest --filter or assume every dotnet test invocation needs a -- separator.
  • Source-generated discovery is the default; reflection mode also exists. Check the relevant documentation when changing discovery or Native AOT behavior.
  • TUnit.Assertions and TUnit.Mocks also work with other test frameworks. Using them alone does not require changing the project's test runner.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.