[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75JB7NBZGVQ5XPXGMHCMD5B":3,"skill-same:01M75JB7NBZGVQ5XPXGMHCMD5B":46},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M75JB7NBZGVQ5XPXGMHCMD5B","exp-mock-usage-analysis",null,"Audits .NET test mock usage by tracing each mock setup through the production code's execution path to find dead, unreachable, redundant, or replaceable mocks. Use when the user asks to audit mock usage, find unused or unnecessary mock setups, check if mocks are needed, reduce mock duplication or over-mocking, simplify test setup, or review whether mock configurations like ILogger\u002FIOptions should use real implementations instead. Supports Moq, NSubstitute, and FakeItEasy.","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\u002Fexp-mock-usage-analysis\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: exp-mock-usage-analysis\ndescription: \"Audits .NET test mock usage by tracing each mock setup through the production code's execution path to find dead, unreachable, redundant, or replaceable mocks. Use when the user asks to audit mock usage, find unused or unnecessary mock setups, check if mocks are needed, reduce mock duplication or over-mocking, simplify test setup, or review whether mock configurations like ILogger\u002FIOptions should use real implementations instead. Supports Moq, NSubstitute, and FakeItEasy.\"\nlicense: MIT\n---\n\n# Mock Usage Analysis\n\nTrace each mock setup through the production code's execution path to determine which setups are actually exercised at runtime and which are dead, unreachable, redundant, or replaceable with real implementations.\n\n## When to Use\n\n- User asks to audit, review, or analyze mock usage in .NET tests\n- User wants to find unused, unnecessary, or redundant mock setups\n- User wants to simplify test setup or reduce over-mocking\n- User asks whether mocks of ILogger, IOptions, or similar types are needed\n\n## When Not to Use\n\n- User wants to write new mocks or tests (general testing guidance)\n- User wants to detect non-mock test anti-patterns (use `test-anti-patterns`)\n- User wants to migrate between mock frameworks (out of scope)\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Test code | Yes | Test files to analyze |\n| Production code | Yes | Code under test — essential for tracing execution paths |\n\n## Workflow\n\n### Step 1: Read all provided code\n\nRead the test files and **always** read the production code. You cannot determine whether a mock setup is necessary without understanding the production method's control flow.\n\nIdentify the mock framework by scanning for its patterns:\n- **Moq**: `new Mock\u003CT>()`, `.Setup(...)`, `.Verify(...)`\n- **NSubstitute**: `Substitute.For\u003CT>()`, `.Returns(...)`, `.Received(...)`\n- **FakeItEasy**: `A.Fake\u003CT>()`, `A.CallTo(...)`, `.MustHaveHappened()`\n\nUse the correct framework's terminology throughout your analysis.\n\n### Step 2: Trace each mock setup through the production code\n\nFor **each test method**, do the following:\n\n1. Identify every mock setup line (`.Setup`, `.Returns`, `A.CallTo`, etc.)\n2. Read the production method being tested and trace its execution path for the specific inputs used in that test\n3. Determine which mock setups are actually reached during execution\n4. Classify each setup:\n\n| Classification | Meaning | Example |\n|---------------|---------|---------|\n| **Used** | The production code calls this mock during the test's execution path | `GetStock` setup when `Reserve` is called and stock is sufficient |\n| **Unreachable** | The production code returns early, throws, or branches away before reaching this mock call | `UpdateStock` setup when the test expects the method to throw `ArgumentOutOfRangeException` on the first line |\n| **Unused** | The mock method is never called by the production method under test at all, regardless of inputs | `GetLowStockProducts` setup when testing `Reserve`, which never calls that method |\n| **Redundant** | Identical mock configurations are duplicated across multiple tests instead of being shared | Five tests each creating `new Mock\u003CIPaymentGateway>()` with the same default setup |\n\nPay special attention to:\n- **Early returns and guard clauses** — setups for mocks called after a guard clause are unreachable when the guard triggers\n- **Exception throws** — if the method throws before using dependencies, all setups for those dependencies are unnecessary\n- **Branch-specific logic** — if a method dispatches by channel\u002Ftype, setups for other channels are unused\n- **Verify-only tests** — tests that only call `.Verify`\u002F`.Received`\u002F`.MustHaveHappened` without asserting on the method's return value\n\n### Step 3: Check for replaceable mocks\n\nFlag mocks of stable framework types that should use real implementations:\n- `Mock\u003CILogger\u003CT>>` → `NullLogger\u003CT>.Instance` (unless log output is asserted)\n- `Mock\u003CIOptions\u003CT>>` → `Options.Create(new T { ... })`\n- Mocks of DTOs, records, or value objects → use `new T { ... }` directly\n\nExplicitly confirm which mocks are **correctly placed** — external boundaries (databases, HTTP clients, message queues, third-party APIs) and security-sensitive types should remain mocked.\n\n### Step 4: Report findings\n\nFor each finding, state:\n1. The specific test method and mock setup line\n2. Why the setup is unnecessary (trace the production code path to explain)\n3. A concrete fix — which lines to remove, what to replace them with, or how to extract shared setup\n\nWhen multiple tests duplicate mock configurations, provide a before\u002Fafter example showing how to extract shared setup into a fixture or helper method.\n\n## Validation\n\n- [ ] Production code was read and execution paths were traced (not just test code reviewed)\n- [ ] Every finding references a specific test method and setup line\n- [ ] Unreachable setups include an explanation of which production code path makes them unreachable\n- [ ] Correctly-placed mocks (external boundaries) are explicitly noted as appropriate\n- [ ] Correct framework terminology is used throughout (not mixing Moq\u002FNSubstitute\u002FFakeItEasy terms)\n\n## Common Pitfalls\n\n| Pitfall | Solution |\n|---------|----------|\n| Analyzing test code without reading production code | Always read the production method to trace which mocks are actually called |\n| Flagging mocks for external boundaries (HTTP, DB) | These are valid isolation boundaries — keep them mocked |\n| Flagging `ILogger` mock when log output is asserted | Only flag when the mock is set up but log output is never verified |\n| Using wrong framework terminology | Match the framework in the code: Moq (`Setup`\u002F`Verify`), NSubstitute (`Returns`\u002F`Received`), FakeItEasy (`A.CallTo`\u002F`MustHaveHappened`) |\n","# Mock Usage Analysis\n\nTrace each mock setup through the production code's execution path to determine which setups are actually exercised at runtime and which are dead, unreachable, redundant, or replaceable with real implementations.\n\n## When to Use\n\n- User asks to audit, review, or analyze mock usage in .NET tests\n- User wants to find unused, unnecessary, or redundant mock setups\n- User wants to simplify test setup or reduce over-mocking\n- User asks whether mocks of ILogger, IOptions, or similar types are needed\n\n## When Not to Use\n\n- User wants to write new mocks or tests (general testing guidance)\n- User wants to detect non-mock test anti-patterns (use `test-anti-patterns`)\n- User wants to migrate between mock frameworks (out of scope)\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Test code | Yes | Test files to analyze |\n| Production code | Yes | Code under test — essential for tracing execution paths |\n\n## Workflow\n\n### Step 1: Read all provided code\n\nRead the test files and **always** read the production code. You cannot determine whether a mock setup is necessary without understanding the production method's control flow.\n\nIdentify the mock framework by scanning for its patterns:\n- **Moq**: `new Mock\u003CT>()`, `.Setup(...)`, `.Verify(...)`\n- **NSubstitute**: `Substitute.For\u003CT>()`, `.Returns(...)`, `.Received(...)`\n- **FakeItEasy**: `A.Fake\u003CT>()`, `A.CallTo(...)`, `.MustHaveHappened()`\n\nUse the correct framework's terminology throughout your analysis.\n\n### Step 2: Trace each mock setup through the production code\n\nFor **each test method**, do the following:\n\n1. Identify every mock setup line (`.Setup`, `.Returns`, `A.CallTo`, etc.)\n2. Read the production method being tested and trace its execution path for the specific inputs used in that test\n3. Determine which mock setups are actually reached during execution\n4. Classify each setup:\n\n| Classification | Meaning | Example |\n|---------------|---------|---------|\n| **Used** | The production code calls this mock during the test's execution path | `GetStock` setup when `Reserve` is called and stock is sufficient |\n| **Unreachable** | The production code returns early, throws, or branches away before reaching this mock call | `UpdateStock` setup when the test expects the method to throw `ArgumentOutOfRangeException` on the first line |\n| **Unused** | The mock method is never called by the production method under test at all, regardless of inputs | `GetLowStockProducts` setup when testing `Reserve`, which never calls that method |\n| **Redundant** | Identical mock configurations are duplicated across multiple tests instead of being shared | Five tests each creating `new Mock\u003CIPaymentGateway>()` with the same default setup |\n\nPay special attention to:\n- **Early returns and guard clauses** — setups for mocks called after a guard clause are unreachable when the guard triggers\n- **Exception throws** — if the method throws before using dependencies, all setups for those dependencies are unnecessary\n- **Branch-specific logic** — if a method dispatches by channel\u002Ftype, setups for other channels are unused\n- **Verify-only tests** — tests that only call `.Verify`\u002F`.Received`\u002F`.MustHaveHappened` without asserting on the method's return value\n\n### Step 3: Check for replaceable mocks\n\nFlag mocks of stable framework types that should use real implementations:\n- `Mock\u003CILogger\u003CT>>` → `NullLogger\u003CT>.Instance` (unless log output is asserted)\n- `Mock\u003CIOptions\u003CT>>` → `Options.Create(new T { ... })`\n- Mocks of DTOs, records, or value objects → use `new T { ... }` directly\n\nExplicitly confirm which mocks are **correctly placed** — external boundaries (databases, HTTP clients, message queues, third-party APIs) and security-sensitive types should remain mocked.\n\n### Step 4: Report findings\n\nFor each finding, state:\n1. The specific test method and mock setup line\n2. Why the setup is unnecessary (trace the production code path to explain)\n3. A concrete fix — which lines to remove, what to replace them with, or how to extract shared setup\n\nWhen multiple tests duplicate mock configurations, provide a before\u002Fafter example showing how to extract shared setup into a fixture or helper method.\n\n## Validation\n\n- [ ] Production code was read and execution paths were traced (not just test code reviewed)\n- [ ] Every finding references a specific test method and setup line\n- [ ] Unreachable setups include an explanation of which production code path makes them unreachable\n- [ ] Correctly-placed mocks (external boundaries) are explicitly noted as appropriate\n- [ ] Correct framework terminology is used throughout (not mixing Moq\u002FNSubstitute\u002FFakeItEasy terms)\n\n## Common Pitfalls\n\n| Pitfall | Solution |\n|---------|----------|\n| Analyzing test code without reading production code | Always read the production method to trace which mocks are actually called |\n| Flagging mocks for external boundaries (HTTP, DB) | These are valid isolation boundaries — keep them mocked |\n| Flagging `ILogger` mock when log output is asserted | Only flag when the mock is set up but log output is never verified |\n| Using wrong framework terminology | Match the framework in the code: Moq (`Setup`\u002F`Verify`), NSubstitute (`Returns`\u002F`Received`), FakeItEasy (`A.CallTo`\u002F`MustHaveHappened`) |\n",{"name":5,"license":15,"description":7},"master","49e49abf2f670d429e0b7e2c0349739c3fdd5cbe","skills\u002Fexp-mock-usage-analysis",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":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add stanfish06\u002Fskillquarium --skill exp-mock-usage-analysis",{"tool":38,"command":39},"bunx","bunx skills add stanfish06\u002Fskillquarium --skill exp-mock-usage-analysis",{"tool":41,"command":42},"pnpm","pnpm dlx skills add stanfish06\u002Fskillquarium --skill exp-mock-usage-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fexp-mock-usage-analysis\u002FSKILL.md",true,[],[47,54,63,70,77,84],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"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":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":58,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"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":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":58,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"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":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M76ZHFBXD6VXPQ02VCEG202B","writing-mstest-tests","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.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwriting-mstest-tests\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"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":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":58,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"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",[],[]]