[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76ZHFBXD6VXPQ02VCEG202B":3,"skill-same:01M76ZHFBXD6VXPQ02VCEG202B":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M76ZHFBXD6VXPQ02VCEG202B","writing-mstest-tests",null,"Use when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for \"review\" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected\u002Factual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext\u002Flifecycle; timeout\u002Fcancellation; OS\u002FCI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest\u002Fnon-.NET code.","stanfish06\u002Fskillquarium","stanfish06","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F93099613?v=4","01M75F1CK4ZW109ZK3T26VN52F","Zhiyuan","01M75F1CM53VH6F79DZ8GXKKES",12,"MIT","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwriting-mstest-tests\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: writing-mstest-tests\ndescription: >\n  Use when asked to fix, rewrite, update, improve, modernize, show corrected code for, or\n  explain existing MSTest tests or MSTest-specific configuration. Use for \"review\" when\n  corrected code or edits are wanted, even for one pasted assertion or passing tests with\n  bad failure output. Covers expected\u002Factual labels; generic Boolean, collection, string,\n  numeric, null, identity, exception, hard-cast, and object[] checks;\n  TestContext\u002Flifecycle; timeout\u002Fcancellation; OS\u002FCI conditions, retry, cleanup,\n  parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest\n  version. DO NOT USE to design new test cases (code-testing), perform report-only audits,\n  create project files rather than explain MSTest setup, run tests, migrate frameworks, or\n  handle non-MSTest\u002Fnon-.NET code.\nlicense: MIT\nmetadata:\n  portability: portable\n  binding: optional-overlay\n  binding-revision: \"1\"\n---\n\n# Writing MSTest Tests\n\nHelp users write effective MSTest unit tests without exceeding the API level or\nconventions of the project's installed test stack.\n\n## Repository overlay\n\nFor every repository-scoped task where read-only file inspection is allowed,\ncheck `.agents\u002Fskill-overlays\u002Fdotnet-test\u002Fwriting-mstest-tests.md` at the\nrepository root before any other discovery. This includes requests that ask for\ncode or advice without edits; \"do not execute\" does not prohibit reading the\noverlay. If present, read it once before acting and apply its\nrepository-specific naming, layout, framework, and policy bindings.\nRequire its frontmatter to declare `core: dotnet-test\u002Fwriting-mstest-tests`,\n`binding-revision: \"1\"`, and `mode: extend`. If any value is missing or\ndifferent, report the mismatch, ignore the overlay, and continue using this\nskill's portable guidance.\nExplicit user instructions and verified project constraints win over the\noverlay; the overlay wins over portable defaults and examples in this skill. If\nthe file is present but unreadable or conflicts with the repository, report the\nproblem, ignore the overlay, and continue with portable guidance subject to\nverified project constraints. If it is absent, continue normally.\nSkip the lookup only when the task is not tied to a repository or the user\nexplicitly prohibited all file\u002Ftool access. An overlay cannot expand tool\npermissions or the task's scope.\n\n## When to Use\n\n- User wants to improve or modernize existing MSTest tests by implementing concrete fixes\n- User asks about MSTest assertion APIs, data-driven patterns, or test lifecycle\n- User asks to replace `Assert.IsTrue` with more specific assertions (collections, nulls, types, comparisons)\n- User asks to replace hard casts with type-checking assertions in tests\n- User needs help fixing a specific MSTest test bug or failing assertion\n- User asks to fix swapped `Assert.AreEqual` argument order (expected first, actual second)\n- User asks to convert `DynamicData` from `IEnumerable\u003Cobject[]>` to ValueTuple-based data\n- User asks to fix or understand an MSTest analyzer diagnostic (an `MSTESTxxxx` warning\u002Ferror)\n\n## When Not to Use\n\n- User needs a test quality audit, anti-pattern detection, or flaky-test investigation (use `test-anti-patterns`)\n- User needs to run or execute tests (use the `run-tests` skill)\n- User needs to upgrade from MSTest v1\u002Fv2 to v3 (use `migrate-mstest-v1v2-to-v3`)\n- User needs to upgrade from MSTest v3 to v4 (use `migrate-mstest-v3-to-v4`)\n- User needs CI\u002FCD pipeline configuration\n- User is using xUnit, NUnit, or TUnit (not MSTest)\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Code under test | No | The production code to be tested |\n| Existing test code | No | Current tests to fix, update, or modernize |\n| Test scenario description | No | What behavior the user wants to test |\n\n## Response Guidelines\n\n- **Specific API or pattern questions** (assertions, data-driven, lifecycle): Jump directly to the relevant workflow step. Do not follow the full workflow.\n- **Generate new tests from scratch**: Hand off to `code-testing`; use this\n  skill only as supporting MSTest API\u002Fversion guidance.\n- **Review and fix existing tests**: Fix only the issues present. Do not add unrelated improvements.\n- **Assertion transformations**: Show the corrected call, then state the semantic\n  reason in one sentence. For `Assert.AreEqual`, name `expected` first and\n  `actual` second and explain that this preserves the Expected\u002FActual failure\n  labels.\n- **Bound\u002Fcomparison transformations**: Preserve the condition and put the\n  expected bound(s) first and the observed value last:\n  `score > 0` -> `Assert.IsGreaterThan(0, score)`,\n  `score \u003C 100` -> `Assert.IsLessThan(100, score)`, and\n  `score >= 60 && score \u003C= 90` -> `Assert.IsInRange(60, 90, score)`.\n  Never reverse these arguments to mimic the source expression's left-to-right\n  order.\n- **Exception transformations**: Scope the throwing operation in a lambda,\n  distinguish `ThrowsExactly\u003CT>` (exact type) from `Throws\u003CT>` (type or derived\n  type), and capture the returned exception when properties such as `ParamName`\n  are part of the behavior.\n- **Supplied code requests**: Return complete representative method bodies, not\n  comment-only placeholders. Preserve the real operation and show symmetric\n  setup\u002Fcleanup when lifecycle or environment policy is part of the request.\n\n## Workflow\n\n### Step 1: Determine project setup\n\nCheck the test project, `packages.config`, and assembly reference `HintPath`\nvalues for the exact MSTest version and project system:\n\n- If using `MSTest.Sdk`: resolve its exact version from the project SDK\n  declaration or `global.json` `msbuild-sdks`; do not assume the latest APIs\n- If using `MSTest` metapackage: resolve its exact package version\n- If using `MSTest.TestFramework` + `MSTest.TestAdapter`: check version for feature availability\n- If using classic non-SDK XML (`ToolsVersion`, `Microsoft.CSharp.targets`,\n  explicit `\u003CCompile Include>`) and\u002For `packages.config`: preserve that project\n  system and add each new test file to `\u003CCompile Include>`.\n\nAlso inspect representative tests for custom base fixtures, helper libraries,\nmock syntax, naming, setup, and data builders. Existing conventions and installed\nversions win over the examples below. Do not upgrade MSTest, Moq, NBuilder, or\nthe project format unless the user explicitly asks for a migration.\n\n### MSTest API availability\n\n| API\u002Fpattern | Minimum version | Compatible fallback |\n|---|---:|---|\n| `Assert.ThrowsExactly*`, unified `Assert.Contains` \u002F `HasCount` \u002F `IsEmpty` \u002F `IsNotEmpty` | 3.8 | `Assert.ThrowsException*`, `CollectionAssert`, `StringAssert` |\n| `Assert.IsGreaterThan`, `IsLessThan`, `IsInRange`, `StartsWith`, `EndsWith`, `MatchesRegex` | 3.10 | `Assert.IsTrue` with a clear message, or `StringAssert` |\n| Generic `Assert.IsInstanceOfType\u003CT>(value, out var typed)` | 3.4-3.11 only | Non-generic assertion then post-assert cast on 3.0-3.3; v4 returns the typed value directly |\n| ValueTuple `DynamicData` | 3.7 | `IEnumerable\u003Cobject[]>` |\n| Constructor injection of `TestContext` | 3.6 | Instance `TestContext` property |\n| `[Retry]`, `[OSCondition]` | 3.8 | No built-in retry\u002FOS condition; fix flakiness or retain the existing condition mechanism |\n| `[CICondition]` | 3.10 | Existing project-specific condition mechanism |\n\nFor example, MSTest 3.5.x must not receive `Assert.ThrowsExactly`,\n`Assert.Contains`, ValueTuple `DynamicData`, or constructor-injected\n`TestContext`.\n\nTreat this as a hard gate: after determining the version, do not copy a later\nexample from this skill unless its minimum version is satisfied.\n\nRecommend MSTest.Sdk or the MSTest metapackage only for genuinely new projects:\n\n```xml\n\u003C!-- Option 1: MSTest SDK (simplest, recommended for new projects) -->\n\u003CProject Sdk=\"MSTest.Sdk\">\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net9.0\u003C\u002FTargetFramework>\n  \u003C\u002FPropertyGroup>\n\u003C\u002FProject>\n```\n\nWhen using `MSTest.Sdk`, put the version in `global.json` instead of the project file so all test projects get bumped together:\n\n```json\n{\n  \"msbuild-sdks\": {\n    \"MSTest.Sdk\": \"3.8.2\"\n  }\n}\n```\n\n```xml\n\u003C!-- Option 2: MSTest metapackage -->\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net9.0\u003C\u002FTargetFramework>\n  \u003C\u002FPropertyGroup>\n  \u003CItemGroup>\n    \u003CPackageReference Include=\"MSTest\" Version=\"3.8.2\" \u002F>\n  \u003C\u002FItemGroup>\n\u003C\u002FProject>\n```\n\n### Step 2: Write test classes following conventions\n\nApply these structural conventions only where they do not conflict with the\nsuite's established base classes and lifecycle:\n\n- **Seal test classes** with `sealed` for performance and design clarity\n- Use `[TestClass]` on the class and `[TestMethod]` on test methods\n- Follow the **Arrange-Act-Assert** (AAA) pattern\n- Name tests using `MethodName_Scenario_ExpectedBehavior`\n- Use separate test projects with naming convention `[ProjectName].Tests`\n\n```csharp\n[TestClass]\npublic sealed class OrderServiceTests\n{\n    [TestMethod]\n    public void CalculateTotal_WithDiscount_ReturnsReducedPrice()\n    {\n        \u002F\u002F Arrange\n        var service = new OrderService();\n        var order = new Order { Price = 100m, DiscountPercent = 10 };\n\n        \u002F\u002F Act\n        var total = service.CalculateTotal(order);\n\n        \u002F\u002F Assert\n        Assert.AreEqual(90m, total);\n    }\n}\n```\n\n### Step 3: Use version-compatible assertion APIs\n\nPick the most specific assertion supported by the installed MSTest version.\nMore specific assertions produce better failure messages and make the test's\nintent clear, but uncompilable \"modern\" assertions are worse than compatible\n`StringAssert`, `CollectionAssert`, or `Assert.IsTrue` calls.\n\n| What you are testing | Assertion |\n|---|---|\n| Two values are equal | `Assert.AreEqual(expected, actual)` |\n| Same object instance (reference identity) | `Assert.AreSame(expected, actual)` |\n| Value is null | `Assert.IsNull(value)` |\n| Value is not null | `Assert.IsNotNull(value)` |\n| Collection is empty | `Assert.IsEmpty(collection)` (3.8+) or `CollectionAssert` \u002F count assertion |\n| Collection is not empty | `Assert.IsNotEmpty(collection)` (3.8+) or count assertion |\n| Collection has exactly N items | `Assert.HasCount(N, collection)` (3.8+) or `Assert.AreEqual` on count |\n| Collection contains an item | `Assert.Contains(item, collection)` (3.8+) or `CollectionAssert.Contains` |\n| Collection does not contain an item | `Assert.DoesNotContain(item, collection)` (3.8+) or `CollectionAssert.DoesNotContain` |\n| Object is a specific type | `Assert.IsInstanceOfType\u003CT>(value)` |\n| Code throws an exception | `Assert.ThrowsExactly\u003CT>` (3.8+) or `Assert.ThrowsException\u003CT>` (earlier) |\n\nOn MSTest 3.8+, prefer `Assert` class methods over `StringAssert` or\n`CollectionAssert` where both exist. Older versions should keep the compatible\nspecialized classes.\nWhen several independent collection properties were requested, keep each\nsemantic check explicit even if another assertion happens to imply it. For\nexample, retain `IsNotEmpty` when the requested diagnostics distinguish\nempty\u002Fnon-empty, then use `HasCount` and `ContainsSingle` for their separate\ncardinality guarantees.\n\n#### Equality, null, and reference checks\n\n```csharp\nAssert.AreEqual(expected, actual);      \u002F\u002F Value equality\nAssert.AreSame(expected, actual);       \u002F\u002F Reference equality -- same object instance\nAssert.IsNull(value);\nAssert.IsNotNull(value);\n```\n\n#### Exception testing\n\n```csharp\n\u002F\u002F MSTest 3.8+\nvar ex = Assert.ThrowsExactly\u003CArgumentNullException>(() => service.Process(null));\nAssert.AreEqual(\"input\", ex.ParamName);\n\n\u002F\u002F Async\nvar ex = await Assert.ThrowsExactlyAsync\u003CInvalidOperationException>(\n    async () => await service.ProcessAsync(null));\n```\n\n- `Assert.Throws\u003CT>` matches `T` or any derived type\n- `Assert.ThrowsExactly\u003CT>` matches only the exact type `T`\n\nOn MSTest 3.7 and earlier, use the compatible API:\n\n```csharp\nvar ex = Assert.ThrowsException\u003CArgumentNullException>(\n    () => service.Process(null));\n```\n\n#### Collection assertions\n\n```csharp\n\u002F\u002F MSTest 3.8+\nAssert.Contains(expectedItem, collection);\nAssert.DoesNotContain(unexpectedItem, collection);\nvar single = Assert.ContainsSingle(collection);  \u002F\u002F Returns the single element\nAssert.HasCount(3, collection);\nAssert.IsEmpty(collection);\nAssert.IsNotEmpty(collection);\n```\n\nOn earlier versions use `CollectionAssert.Contains`,\n`CollectionAssert.DoesNotContain`, and `Assert.AreEqual(expectedCount,\ncollection.Count)`.\n\nReplace generic `Assert.IsTrue` with specialized assertions -- they give better failure messages:\n\n| Instead of | Use |\n|---|---|\n| `Assert.IsTrue(list.Count > 0)` | `Assert.IsNotEmpty(list)` |\n| `Assert.IsTrue(list.Count == 0)` | `Assert.IsEmpty(list)` |\n| `Assert.IsTrue(list.Count() == 3)` | `Assert.HasCount(3, list)` |\n| `Assert.IsTrue(x != null)` | `Assert.IsNotNull(x)` |\n| `Assert.IsTrue(x == null)` | `Assert.IsNull(x)` |\n| `Assert.AreEqual(a, b)` for same instance | `Assert.AreSame(a, b)` -- reference identity |\n| `Assert.IsTrue(!list.Contains(item))` | `Assert.DoesNotContain(item, list)` |\n| `list.Single(predicate)` + `Assert.IsNotNull` | `Assert.ContainsSingle(list)` |\n| `Assert.IsTrue(list.Contains(item))` | `Assert.Contains(item, list)` |\n\n#### String assertions\n\n```csharp\n\u002F\u002F MSTest 3.10+\nAssert.Contains(\"expected\", actualString);\nAssert.StartsWith(\"prefix\", actualString);\nAssert.EndsWith(\"suffix\", actualString);\nAssert.MatchesRegex(@\"\\d{3}-\\d{4}\", phoneNumber);\n```\n\nOn earlier versions use `StringAssert.Contains`, `StringAssert.StartsWith`,\n`StringAssert.EndsWith`, and `StringAssert.Matches`.\n\n#### Type assertions\n\nMSTest 3.x is not one API level. Pick the form supported by the installed\nminor version:\n\n```csharp\n\u002F\u002F MSTest 3.0-3.3\nAssert.IsInstanceOfType(result, typeof(MyHandler));\nvar typed = (MyHandler)result; \u002F\u002F Safe because the assertion stops a mismatch.\n```\n\n```csharp\n\u002F\u002F MSTest 3.4-3.11 -- out parameter\nAssert.IsInstanceOfType\u003CMyHandler>(result, out var typed);\ntyped.Handle();\n```\n\n```csharp\n\u002F\u002F MSTest 4.x -- returns the proven value directly\nvar typed = Assert.IsInstanceOfType\u003CMyHandler>(result);\n```\n\n#### Comparison assertions\n\n```csharp\nAssert.IsGreaterThan(lowerBound, actual);\nAssert.IsLessThan(upperBound, actual);\nAssert.IsInRange(low, high, actual);\n```\n\n### Step 4: Use data-driven tests for multiple inputs\n\n#### DataRow for inline values\n\n```csharp\n[TestMethod]\n[DataRow(1, 2, 3)]\n[DataRow(0, 0, 0, DisplayName = \"Zeros\")]\n[DataRow(-1, 1, 0)]\npublic void Add_ReturnsExpectedSum(int a, int b, int expected)\n{\n    Assert.AreEqual(expected, Calculator.Add(a, b));\n}\n```\n\n#### DynamicData with ValueTuples (preferred for complex data)\n\nOn MSTest 3.7+, prefer `ValueTuple` return types over\n`IEnumerable\u003Cobject[]>` for type safety. Keep `IEnumerable\u003Cobject[]>` on older\nversions.\n\nTuple element names document which position maps to which test parameter, and\ntuple element types catch incompatible values at compile time. They do **not**\nmake `DynamicData` position-independent, and swapping two same-typed elements\ncan still compile. Do not claim otherwise. When rows need custom display names\nor metadata rather than only typed positional data, use `TestDataRow\u003CT>` on\nMSTest 3.8+.\n\n```csharp\n[TestMethod]\n[DynamicData(nameof(DiscountTestData))]\npublic void ApplyDiscount_ReturnsExpectedPrice(decimal price, int percent, decimal expected)\n{\n    var result = PriceCalculator.ApplyDiscount(price, percent);\n    Assert.AreEqual(expected, result);\n}\n\n\u002F\u002F ValueTuple -- preferred (MSTest 3.7+)\npublic static IEnumerable\u003C(decimal price, int percent, decimal expected)> DiscountTestData =>\n[\n    (100m, 10, 90m),\n    (200m, 25, 150m),\n    (50m, 0, 50m),\n];\n```\n\nWhen you need metadata per test case on MSTest 3.8+, use `TestDataRow\u003CT>`:\n\n```csharp\npublic static IEnumerable\u003CTestDataRow\u003C(decimal price, int percent, decimal expected)>> DiscountTestDataWithMetadata =>\n[\n    new((100m, 10, 90m)) { DisplayName = \"10% discount\" },\n    new((200m, 25, 150m)) { DisplayName = \"25% discount\" },\n    new((50m, 0, 50m)) { DisplayName = \"No discount\" },\n];\n```\n\n### Step 5: Handle test lifecycle correctly\n\n- Prefer constructor initialization when the existing suite supports it; retain a shared `FixtureBase\u003CTSut>` or established `[TestInitialize]` lifecycle rather than rewriting the fixture architecture incidentally.\n- Use `[TestInitialize]` **only** for async initialization, combined with the constructor for sync parts\n- Use `[TestCleanup]` for cleanup that must run even on failure\n- Inject `TestContext` via constructor only on MSTest 3.6+; otherwise use the instance property.\n\n```csharp\n[TestClass]\npublic sealed class RepositoryTests\n{\n    private readonly TestContext _testContext;\n    private readonly FakeDatabase _db;  \u002F\u002F readonly -- guaranteed by constructor\n\n    public RepositoryTests(TestContext testContext)\n    {\n        _testContext = testContext;\n        _db = new FakeDatabase();  \u002F\u002F sync init in ctor\n    }\n\n    [TestInitialize]\n    public async Task InitAsync()\n    {\n        \u002F\u002F Use TestInitialize ONLY for async setup\n        await _db.SeedAsync();\n    }\n\n    [TestCleanup]\n    public void Cleanup() => _db.Reset();\n}\n```\n\n#### Execution order\n\n1. `[AssemblyInitialize]` -- once per assembly\n2. `[ClassInitialize]` -- once per class\n3. Per test:\n   - With `TestContext` property injection: Constructor -> set `TestContext` property -> `[TestInitialize]`\n   - With constructor injection of `TestContext`: Constructor (receives `TestContext`) -> `[TestInitialize]`\n4. Test method\n5. `[TestCleanup]` -> `DisposeAsync` -> `Dispose` -- per test\n6. `[ClassCleanup]` -- once per class\n7. `[AssemblyCleanup]` -- once per assembly\n\n### Step 6: Apply cancellation and timeout patterns\n\nUse `TestContext.CancellationToken` with\n`[Timeout(milliseconds, CooperativeCancellation = true)]` when the installed\nMSTest version exposes the token directly (3.11+). On MSTest 3.6.4-3.10, use\n`TestContext.CancellationTokenSource.Token` with cooperative cancellation\ninstead. A plain `[Timeout]` does not establish that the framework token will\nstop in-flight work. On older versions, use a test-owned\n`CancellationTokenSource` where cancellation itself is under test.\n\n```csharp\n\u002F\u002F MSTest 3.11+\n[TestMethod]\n[Timeout(5000, CooperativeCancellation = true)]\npublic async Task FetchData_ReturnsWithinTimeout()\n{\n    var result = await _client.GetDataAsync(_testContext.CancellationToken);\n    Assert.IsNotNull(result);\n}\n```\n\n### Step 7: Use advanced features where appropriate\n\nFor retry, conditional execution, or parallelization requests, read\n[Advanced MSTest patterns](references\u002Fadvanced-mstest-patterns.md). Apply its\nversion gates and keep the real tested operation, assertion, and cleanup.\n\n### Step 8: Fix MSTest analyzer diagnostics (MSTESTxxxx)\n\nFor an `MSTESTxxxx` request, read\n[Advanced MSTest patterns](references\u002Fadvanced-mstest-patterns.md), apply the\nversion-compatible fix for that rule, and rebuild to confirm the diagnostic is\ngone. Prefer fixing the code over suppressing the rule.\n\n### Step 9: Verify file-backed corrections\n\nWhen the user asked for repository edits and did not prohibit execution, run the\nnarrowest affected `dotnet test` command after editing. A successful process with\nno discovered-test count is not verification. Require the intended test cases to\nbe discovered and pass.\n\nIf compilation exposes a directly coupled source issue that prevents the\ncorrected existing suite from running (for example, a missing namespace import\nin the supplied production file), make only that minimum fix and rerun. Do not\nupgrade packages or broaden the modernization. Report the actual test count and\nthe fixes made; never present unrun or output-free tests as passing.\nIn the final handoff, map every requested modernization to the exact corrected\nconstruct and cite the passing test command. Do not rely on a generic \"modernized\"\nsummary when expected\u002Factual order, exact type checks, data discovery, or class\nshape were explicit requirements.\n","# Writing MSTest Tests\n\nHelp users write effective MSTest unit tests without exceeding the API level or\nconventions of the project's installed test stack.\n\n## Repository overlay\n\nFor every repository-scoped task where read-only file inspection is allowed,\ncheck `.agents\u002Fskill-overlays\u002Fdotnet-test\u002Fwriting-mstest-tests.md` at the\nrepository root before any other discovery. This includes requests that ask for\ncode or advice without edits; \"do not execute\" does not prohibit reading the\noverlay. If present, read it once before acting and apply its\nrepository-specific naming, layout, framework, and policy bindings.\nRequire its frontmatter to declare `core: dotnet-test\u002Fwriting-mstest-tests`,\n`binding-revision: \"1\"`, and `mode: extend`. If any value is missing or\ndifferent, report the mismatch, ignore the overlay, and continue using this\nskill's portable guidance.\nExplicit user instructions and verified project constraints win over the\noverlay; the overlay wins over portable defaults and examples in this skill. If\nthe file is present but unreadable or conflicts with the repository, report the\nproblem, ignore the overlay, and continue with portable guidance subject to\nverified project constraints. If it is absent, continue normally.\nSkip the lookup only when the task is not tied to a repository or the user\nexplicitly prohibited all file\u002Ftool access. An overlay cannot expand tool\npermissions or the task's scope.\n\n## When to Use\n\n- User wants to improve or modernize existing MSTest tests by implementing concrete fixes\n- User asks about MSTest assertion APIs, data-driven patterns, or test lifecycle\n- User asks to replace `Assert.IsTrue` with more specific assertions (collections, nulls, types, comparisons)\n- User asks to replace hard casts with type-checking assertions in tests\n- User needs help fixing a specific MSTest test bug or failing assertion\n- User asks to fix swapped `Assert.AreEqual` argument order (expected first, actual second)\n- User asks to convert `DynamicData` from `IEnumerable\u003Cobject[]>` to ValueTuple-based data\n- User asks to fix or understand an MSTest analyzer diagnostic (an `MSTESTxxxx` warning\u002Ferror)\n\n## When Not to Use\n\n- User needs a test quality audit, anti-pattern detection, or flaky-test investigation (use `test-anti-patterns`)\n- User needs to run or execute tests (use the `run-tests` skill)\n- User needs to upgrade from MSTest v1\u002Fv2 to v3 (use `migrate-mstest-v1v2-to-v3`)\n- User needs to upgrade from MSTest v3 to v4 (use `migrate-mstest-v3-to-v4`)\n- User needs CI\u002FCD pipeline configuration\n- User is using xUnit, NUnit, or TUnit (not MSTest)\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Code under test | No | The production code to be tested |\n| Existing test code | No | Current tests to fix, update, or modernize |\n| Test scenario description | No | What behavior the user wants to test |\n\n## Response Guidelines\n\n- **Specific API or pattern questions** (assertions, data-driven, lifecycle): Jump directly to the relevant workflow step. Do not follow the full workflow.\n- **Generate new tests from scratch**: Hand off to `code-testing`; use this\n  skill only as supporting MSTest API\u002Fversion guidance.\n- **Review and fix existing tests**: Fix only the issues present. Do not add unrelated improvements.\n- **Assertion transformations**: Show the corrected call, then state the semantic\n  reason in one sentence. For `Assert.AreEqual`, name `expected` first and\n  `actual` second and explain that this preserves the Expected\u002FActual failure\n  labels.\n- **Bound\u002Fcomparison transformations**: Preserve the condition and put the\n  expected bound(s) first and the observed value last:\n  `score > 0` -> `Assert.IsGreaterThan(0, score)`,\n  `score \u003C 100` -> `Assert.IsLessThan(100, score)`, and\n  `score >= 60 && score \u003C= 90` -> `Assert.IsInRange(60, 90, score)`.\n  Never reverse these arguments to mimic the source expression's left-to-right\n  order.\n- **Exception transformations**: Scope the throwing operation in a lambda,\n  distinguish `ThrowsExactly\u003CT>` (exact type) from `Throws\u003CT>` (type or derived\n  type), and capture the returned exception when properties such as `ParamName`\n  are part of the behavior.\n- **Supplied code requests**: Return complete representative method bodies, not\n  comment-only placeholders. Preserve the real operation and show symmetric\n  setup\u002Fcleanup when lifecycle or environment policy is part of the request.\n\n## Workflow\n\n### Step 1: Determine project setup\n\nCheck the test project, `packages.config`, and assembly reference `HintPath`\nvalues for the exact MSTest version and project system:\n\n- If using `MSTest.Sdk`: resolve its exact version from the project SDK\n  declaration or `global.json` `msbuild-sdks`; do not assume the latest APIs\n- If using `MSTest` metapackage: resolve its exact package version\n- If using `MSTest.TestFramework` + `MSTest.TestAdapter`: check version for feature availability\n- If using classic non-SDK XML (`ToolsVersion`, `Microsoft.CSharp.targets`,\n  explicit `\u003CCompile Include>`) and\u002For `packages.config`: preserve that project\n  system and add each new test file to `\u003CCompile Include>`.\n\nAlso inspect representative tests for custom base fixtures, helper libraries,\nmock syntax, naming, setup, and data builders. Existing conventions and installed\nversions win over the examples below. Do not upgrade MSTest, Moq, NBuilder, or\nthe project format unless the user explicitly asks for a migration.\n\n### MSTest API availability\n\n| API\u002Fpattern | Minimum version | Compatible fallback |\n|---|---:|---|\n| `Assert.ThrowsExactly*`, unified `Assert.Contains` \u002F `HasCount` \u002F `IsEmpty` \u002F `IsNotEmpty` | 3.8 | `Assert.ThrowsException*`, `CollectionAssert`, `StringAssert` |\n| `Assert.IsGreaterThan`, `IsLessThan`, `IsInRange`, `StartsWith`, `EndsWith`, `MatchesRegex` | 3.10 | `Assert.IsTrue` with a clear message, or `StringAssert` |\n| Generic `Assert.IsInstanceOfType\u003CT>(value, out var typed)` | 3.4-3.11 only | Non-generic assertion then post-assert cast on 3.0-3.3; v4 returns the typed value directly |\n| ValueTuple `DynamicData` | 3.7 | `IEnumerable\u003Cobject[]>` |\n| Constructor injection of `TestContext` | 3.6 | Instance `TestContext` property |\n| `[Retry]`, `[OSCondition]` | 3.8 | No built-in retry\u002FOS condition; fix flakiness or retain the existing condition mechanism |\n| `[CICondition]` | 3.10 | Existing project-specific condition mechanism |\n\nFor example, MSTest 3.5.x must not receive `Assert.ThrowsExactly`,\n`Assert.Contains`, ValueTuple `DynamicData`, or constructor-injected\n`TestContext`.\n\nTreat this as a hard gate: after determining the version, do not copy a later\nexample from this skill unless its minimum version is satisfied.\n\nRecommend MSTest.Sdk or the MSTest metapackage only for genuinely new projects:\n\n```xml\n\u003C!-- Option 1: MSTest SDK (simplest, recommended for new projects) -->\n\u003CProject Sdk=\"MSTest.Sdk\">\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net9.0\u003C\u002FTargetFramework>\n  \u003C\u002FPropertyGroup>\n\u003C\u002FProject>\n```\n\nWhen using `MSTest.Sdk`, put the version in `global.json` instead of the project file so all test projects get bumped together:\n\n```json\n{\n  \"msbuild-sdks\": {\n    \"MSTest.Sdk\": \"3.8.2\"\n  }\n}\n```\n\n```xml\n\u003C!-- Option 2: MSTest metapackage -->\n\u003CProject Sdk=\"Microsoft.NET.Sdk\">\n  \u003CPropertyGroup>\n    \u003CTargetFramework>net9.0\u003C\u002FTargetFramework>\n  \u003C\u002FPropertyGroup>\n  \u003CItemGroup>\n    \u003CPackageReference Include=\"MSTest\" Version=\"3.8.2\" \u002F>\n  \u003C\u002FItemGroup>\n\u003C\u002FProject>\n```\n\n### Step 2: Write test classes following conventions\n\nApply these structural conventions only where they do not conflict with the\nsuite's established base classes and lifecycle:\n\n- **Seal test classes** with `sealed` for performance and design clarity\n- Use `[TestClass]` on the class and `[TestMethod]` on test methods\n- Follow the **Arrange-Act-Assert** (AAA) pattern\n- Name tests using `MethodName_Scenario_ExpectedBehavior`\n- Use separate test projects with naming convention `[ProjectName].Tests`\n\n```csharp\n[TestClass]\npublic sealed class OrderServiceTests\n{\n    [TestMethod]\n    public void CalculateTotal_WithDiscount_ReturnsReducedPrice()\n    {\n        \u002F\u002F Arrange\n        var service = new OrderService();\n        var order = new Order { Price = 100m, DiscountPercent = 10 };\n\n        \u002F\u002F Act\n        var total = service.CalculateTotal(order);\n\n        \u002F\u002F Assert\n        Assert.AreEqual(90m, total);\n    }\n}\n```\n\n### Step 3: Use version-compatible assertion APIs\n\nPick the most specific assertion supported by the installed MSTest version.\nMore specific assertions produce better failure messages and make the test's\nintent clear, but uncompilable \"modern\" assertions are worse than compatible\n`StringAssert`, `CollectionAssert`, or `Assert.IsTrue` calls.\n\n| What you are testing | Assertion |\n|---|---|\n| Two values are equal | `Assert.AreEqual(expected, actual)` |\n| Same object instance (reference identity) | `Assert.AreSame(expected, actual)` |\n| Value is null | `Assert.IsNull(value)` |\n| Value is not null | `Assert.IsNotNull(value)` |\n| Collection is empty | `Assert.IsEmpty(collection)` (3.8+) or `CollectionAssert` \u002F count assertion |\n| Collection is not empty | `Assert.IsNotEmpty(collection)` (3.8+) or count assertion |\n| Collection has exactly N items | `Assert.HasCount(N, collection)` (3.8+) or `Assert.AreEqual` on count |\n| Collection contains an item | `Assert.Contains(item, collection)` (3.8+) or `CollectionAssert.Contains` |\n| Collection does not contain an item | `Assert.DoesNotContain(item, collection)` (3.8+) or `CollectionAssert.DoesNotContain` |\n| Object is a specific type | `Assert.IsInstanceOfType\u003CT>(value)` |\n| Code throws an exception | `Assert.ThrowsExactly\u003CT>` (3.8+) or `Assert.ThrowsException\u003CT>` (earlier) |\n\nOn MSTest 3.8+, prefer `Assert` class methods over `StringAssert` or\n`CollectionAssert` where both exist. Older versions should keep the compatible\nspecialized classes.\nWhen several independent collection properties were requested, keep each\nsemantic check explicit even if another assertion happens to imply it. For\nexample, retain `IsNotEmpty` when the requested diagnostics distinguish\nempty\u002Fnon-empty, then use `HasCount` and `ContainsSingle` for their separate\ncardinality guarantees.\n\n#### Equality, null, and reference checks\n\n```csharp\nAssert.AreEqual(expected, actual);      \u002F\u002F Value equality\nAssert.AreSame(expected, actual);       \u002F\u002F Reference equality -- same object instance\nAssert.IsNull(value);\nAssert.IsNotNull(value);\n```\n\n#### Exception testing\n\n```csharp\n\u002F\u002F MSTest 3.8+\nvar ex = Assert.ThrowsExactly\u003CArgumentNullException>(() => service.Process(null));\nAssert.AreEqual(\"input\", ex.ParamName);\n\n\u002F\u002F Async\nvar ex = await Assert.ThrowsExactlyAsync\u003CInvalidOperationException>(\n    async () => await service.ProcessAsync(null));\n```\n\n- `Assert.Throws\u003CT>` matches `T` or any derived type\n- `Assert.ThrowsExactly\u003CT>` matches only the exact type `T`\n\nOn MSTest 3.7 and earlier, use the compatible API:\n\n```csharp\nvar ex = Assert.ThrowsException\u003CArgumentNullException>(\n    () => service.Process(null));\n```\n\n#### Collection assertions\n\n```csharp\n\u002F\u002F MSTest 3.8+\nAssert.Contains(expectedItem, collection);\nAssert.DoesNotContain(unexpectedItem, collection);\nvar single = Assert.ContainsSingle(collection);  \u002F\u002F Returns the single element\nAssert.HasCount(3, collection);\nAssert.IsEmpty(collection);\nAssert.IsNotEmpty(collection);\n```\n\nOn earlier versions use `CollectionAssert.Contains`,\n`CollectionAssert.DoesNotContain`, and `Assert.AreEqual(expectedCount,\ncollection.Count)`.\n\nReplace generic `Assert.IsTrue` with specialized assertions -- they give better failure messages:\n\n| Instead of | Use |\n|---|---|\n| `Assert.IsTrue(list.Count > 0)` | `Assert.IsNotEmpty(list)` |\n| `Assert.IsTrue(list.Count == 0)` | `Assert.IsEmpty(list)` |\n| `Assert.IsTrue(list.Count() == 3)` | `Assert.HasCount(3, list)` |\n| `Assert.IsTrue(x != null)` | `Assert.IsNotNull(x)` |\n| `Assert.IsTrue(x == null)` | `Assert.IsNull(x)` |\n| `Assert.AreEqual(a, b)` for same instance | `Assert.AreSame(a, b)` -- reference identity |\n| `Assert.IsTrue(!list.Contains(item))` | `Assert.DoesNotContain(item, list)` |\n| `list.Single(predicate)` + `Assert.IsNotNull` | `Assert.ContainsSingle(list)` |\n| `Assert.IsTrue(list.Contains(item))` | `Assert.Contains(item, list)` |\n\n#### String assertions\n\n```csharp\n\u002F\u002F MSTest 3.10+\nAssert.Contains(\"expected\", actualString);\nAssert.StartsWith(\"prefix\", actualString);\nAssert.EndsWith(\"suffix\", actualString);\nAssert.MatchesRegex(@\"\\d{3}-\\d{4}\", phoneNumber);\n```\n\nOn earlier versions use `StringAssert.Contains`, `StringAssert.StartsWith`,\n`StringAssert.EndsWith`, and `StringAssert.Matches`.\n\n#### Type assertions\n\nMSTest 3.x is not one API level. Pick the form supported by the installed\nminor version:\n\n```csharp\n\u002F\u002F MSTest 3.0-3.3\nAssert.IsInstanceOfType(result, typeof(MyHandler));\nvar typed = (MyHandler)result; \u002F\u002F Safe because the assertion stops a mismatch.\n```\n\n```csharp\n\u002F\u002F MSTest 3.4-3.11 -- out parameter\nAssert.IsInstanceOfType\u003CMyHandler>(result, out var typed);\ntyped.Handle();\n```\n\n```csharp\n\u002F\u002F MSTest 4.x -- returns the proven value directly\nvar typed = Assert.IsInstanceOfType\u003CMyHandler>(result);\n```\n\n#### Comparison assertions\n\n```csharp\nAssert.IsGreaterThan(lowerBound, actual);\nAssert.IsLessThan(upperBound, actual);\nAssert.IsInRange(low, high, actual);\n```\n\n### Step 4: Use data-driven tests for multiple inputs\n\n#### DataRow for inline values\n\n```csharp\n[TestMethod]\n[DataRow(1, 2, 3)]\n[DataRow(0, 0, 0, DisplayName = \"Zeros\")]\n[DataRow(-1, 1, 0)]\npublic void Add_ReturnsExpectedSum(int a, int b, int expected)\n{\n    Assert.AreEqual(expected, Calculator.Add(a, b));\n}\n```\n\n#### DynamicData with ValueTuples (preferred for complex data)\n\nOn MSTest 3.7+, prefer `ValueTuple` return types over\n`IEnumerable\u003Cobject[]>` for type safety. Keep `IEnumerable\u003Cobject[]>` on older\nversions.\n\nTuple element names document which position maps to which test parameter, and\ntuple element types catch incompatible values at compile time. They do **not**\nmake `DynamicData` position-independent, and swapping two same-typed elements\ncan still compile. Do not claim otherwise. When rows need custom display names\nor metadata rather than only typed positional data, use `TestDataRow\u003CT>` on\nMSTest 3.8+.\n\n```csharp\n[TestMethod]\n[DynamicData(nameof(DiscountTestData))]\npublic void ApplyDiscount_ReturnsExpectedPrice(decimal price, int percent, decimal expected)\n{\n    var result = PriceCalculator.ApplyDiscount(price, percent);\n    Assert.AreEqual(expected, result);\n}\n\n\u002F\u002F ValueTuple -- preferred (MSTest 3.7+)\npublic static IEnumerable\u003C(decimal price, int percent, decimal expected)> DiscountTestData =>\n[\n    (100m, 10, 90m),\n    (200m, 25, 150m),\n    (50m, 0, 50m),\n];\n```\n\nWhen you need metadata per test case on MSTest 3.8+, use `TestDataRow\u003CT>`:\n\n```csharp\npublic static IEnumerable\u003CTestDataRow\u003C(decimal price, int percent, decimal expected)>> DiscountTestDataWithMetadata =>\n[\n    new((100m, 10, 90m)) { DisplayName = \"10% discount\" },\n    new((200m, 25, 150m)) { DisplayName = \"25% discount\" },\n    new((50m, 0, 50m)) { DisplayName = \"No discount\" },\n];\n```\n\n### Step 5: Handle test lifecycle correctly\n\n- Prefer constructor initialization when the existing suite supports it; retain a shared `FixtureBase\u003CTSut>` or established `[TestInitialize]` lifecycle rather than rewriting the fixture architecture incidentally.\n- Use `[TestInitialize]` **only** for async initialization, combined with the constructor for sync parts\n- Use `[TestCleanup]` for cleanup that must run even on failure\n- Inject `TestContext` via constructor only on MSTest 3.6+; otherwise use the instance property.\n\n```csharp\n[TestClass]\npublic sealed class RepositoryTests\n{\n    private readonly TestContext _testContext;\n    private readonly FakeDatabase _db;  \u002F\u002F readonly -- guaranteed by constructor\n\n    public RepositoryTests(TestContext testContext)\n    {\n        _testContext = testContext;\n        _db = new FakeDatabase();  \u002F\u002F sync init in ctor\n    }\n\n    [TestInitialize]\n    public async Task InitAsync()\n    {\n        \u002F\u002F Use TestInitialize ONLY for async setup\n        await _db.SeedAsync();\n    }\n\n    [TestCleanup]\n    public void Cleanup() => _db.Reset();\n}\n```\n\n#### Execution order\n\n1. `[AssemblyInitialize]` -- once per assembly\n2. `[ClassInitialize]` -- once per class\n3. Per test:\n   - With `TestContext` property injection: Constructor -> set `TestContext` property -> `[TestInitialize]`\n   - With constructor injection of `TestContext`: Constructor (receives `TestContext`) -> `[TestInitialize]`\n4. Test method\n5. `[TestCleanup]` -> `DisposeAsync` -> `Dispose` -- per test\n6. `[ClassCleanup]` -- once per class\n7. `[AssemblyCleanup]` -- once per assembly\n\n### Step 6: Apply cancellation and timeout patterns\n\nUse `TestContext.CancellationToken` with\n`[Timeout(milliseconds, CooperativeCancellation = true)]` when the installed\nMSTest version exposes the token directly (3.11+). On MSTest 3.6.4-3.10, use\n`TestContext.CancellationTokenSource.Token` with cooperative cancellation\ninstead. A plain `[Timeout]` does not establish that the framework token will\nstop in-flight work. On older versions, use a test-owned\n`CancellationTokenSource` where cancellation itself is under test.\n\n```csharp\n\u002F\u002F MSTest 3.11+\n[TestMethod]\n[Timeout(5000, CooperativeCancellation = true)]\npublic async Task FetchData_ReturnsWithinTimeout()\n{\n    var result = await _client.GetDataAsync(_testContext.CancellationToken);\n    Assert.IsNotNull(result);\n}\n```\n\n### Step 7: Use advanced features where appropriate\n\nFor retry, conditional execution, or parallelization requests, read\n[Advanced MSTest patterns](references\u002Fadvanced-mstest-patterns.md). Apply its\nversion gates and keep the real tested operation, assertion, and cleanup.\n\n### Step 8: Fix MSTest analyzer diagnostics (MSTESTxxxx)\n\nFor an `MSTESTxxxx` request, read\n[Advanced MSTest patterns](references\u002Fadvanced-mstest-patterns.md), apply the\nversion-compatible fix for that rule, and rebuild to confirm the diagnostic is\ngone. Prefer fixing the code over suppressing the rule.\n\n### Step 9: Verify file-backed corrections\n\nWhen the user asked for repository edits and did not prohibit execution, run the\nnarrowest affected `dotnet test` command after editing. A successful process with\nno discovered-test count is not verification. Require the intended test cases to\nbe discovered and pass.\n\nIf compilation exposes a directly coupled source issue that prevents the\ncorrected existing suite from running (for example, a missing namespace import\nin the supplied production file), make only that minimum fix and rerun. Do not\nupgrade packages or broaden the modernization. Report the actual test count and\nthe fixes made; never present unrun or output-free tests as passing.\nIn the final handoff, map every requested modernization to the exact corrected\nconstruct and cite the passing test command. Do not rely on a generic \"modernized\"\nsummary when expected\u002Factual order, exact type checks, data discovery, or class\nshape were explicit requirements.\n",{"name":5,"license":15,"metadata":24,"description":28},{"binding":25,"portability":26,"binding-revision":27},"optional-overlay","portable","1","Use when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for \"review\" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected\u002Factual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext\u002Flifecycle; timeout\u002Fcancellation; OS\u002FCI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest\u002Fnon-.NET code.\n","master","49e49abf2f670d429e0b7e2c0349739c3fdd5cbe","skills\u002Fwriting-mstest-tests",5,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium","https:\u002F\u002Fgithub.com\u002Fstanfish06","https:\u002F\u002Fwww.stanfish.dev\u002F","2026-11-14 21:31:37",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add stanfish06\u002Fskillquarium --skill writing-mstest-tests",{"tool":43,"command":44},"bunx","bunx skills add stanfish06\u002Fskillquarium --skill writing-mstest-tests",{"tool":46,"command":47},"pnpm","pnpm dlx skills add stanfish06\u002Fskillquarium --skill writing-mstest-tests","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwriting-mstest-tests\u002FSKILL.md",true,[51],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fadvanced-mstest-patterns.md","REFERENCE","参考文档",4369,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwriting-mstest-tests\u002Freferences\u002Fadvanced-mstest-patterns.md",[58,65,74,81,88,96],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M76ZJTRVA456GD7K8Y3EP82H","zarr-python","Stores and queries chunked N-D scientific arrays with Zarr-Python 3, including codecs, sharding, S3\u002FGCS storage, and NumPy\u002FDask\u002FXarray integration. Use for array layout, bounded I\u002FO, format migration, or scientific metadata preservation.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":69,"licenseFileUrl":70,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M76ZJQZ15Q1HKC5V85NHE325","yeet","Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":69,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M76ZJ8ASZ4QYQ70Y6SBA4Z4S","xarray","N-dimensional labeled arrays and datasets in Python. Built on top of NumPy and Dask. It introduces labels in the form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, making data analysis in physical sciences more intuitive and less error-prone. Use for working with multi-dimensional scientific data, NetCDF\u002FGRIB\u002FZarr files, climate\u002Fweather\u002Foceanographic datasets, remote sensing, geospatial imaging, large out-of-memory datasets with Dask, and labeled array operations.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fxarray\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M76ZDFDF4N88RH6HSYGS7GP2","wgs-prs","End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core\u002Fsarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti\u002FTv and Het\u002FHom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwgs-prs\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":69,"licenseFileUrl":92,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M76ZCC1SC68J42QK4MDC8RCG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":69,"licenseFileUrl":100,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M76ZBW3S6B0KV2WFJMKYK39V","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-artifacts-builder\u002FSKILL.md",[],[]]