[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D02W6H6GD37P3DWKMNRP8W":3,"skill-same:01M7D02W6H6GD37P3DWKMNRP8W":50},{"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":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7D02W6H6GD37P3DWKMNRP8W","code-testing-agent",null,"ALWAYS USE whenever asked to write, add, or generate unit tests for existing code, including one helper, function, class, or missing regression case as well as project-wide suites. Also use for \"cover this untested method\", scaffolding tests where none exist, sparse workspaces, classic packages.config MSTest, and extending healthy suites. Focused requests use a proportional direct workflow; broad requests use the full pipeline. DO NOT USE for only running\u002Fdiagnosing tests, coverage\u002Faudits, a test blocked on a missing production seam (testability-obstacle), or correcting supplied MSTest assertions, attributes, lifecycle, or configuration without designing new cases (writing-mstest-tests).","itsmejay18\u002FAI-Skills-for-My-Development-Stack","itsmejay18","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F167779943?v=4","01M7CZRFC6DDZA5V2CX8WDSZED","Jay Jemino Ababon ","01M7CZRFCVRNW1SFHSQXEJ3CQN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F02-CSharp-WPF-Desktop-Development\u002Fcode-testing-agent\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: code-testing-agent\ndescription: >-\n  ALWAYS USE whenever asked to write, add, or generate unit tests for existing\n  code, including one helper, function, class, or missing regression case as well\n  as project-wide suites. Also use for \"cover this untested method\", scaffolding\n  tests where none exist, sparse workspaces, classic packages.config MSTest, and\n  extending healthy suites. Focused requests use a proportional direct workflow;\n  broad requests use the full pipeline. DO NOT USE for only running\u002Fdiagnosing\n  tests, coverage\u002Faudits, a test blocked on a missing production seam\n  (testability-obstacle), or correcting supplied MSTest assertions, attributes,\n  lifecycle, or configuration without designing new cases (writing-mstest-tests).\nlicense: MIT\n---\n\n# Code Testing Generation Skill\n\nAn AI-powered skill that generates comprehensive, workable unit tests for any programming language using a coordinated multi-agent pipeline.\n\n## Non-negotiable execution contract\n\nClassify scope **before editing**:\n\n- **Broad** (a project\u002Fpackage-wide suite, or multiple production\n  files\u002Fmodules): create `research.md` and `plan.md` in a resolved\n  non-stageable `\u003CTESTAGENT_DIR>` before implementation, then `status.md` there\n  after the final test-quality review. If these files are absent, the broad\n  workflow is incomplete.\n- **Focused** (the user explicitly limits work to one function\u002Fclass\u002Ffile or one\n  missing method): do not create intermediate state files or fan out to multiple\n  agents. A sparse project-wide request remains broad even when only one source\n  module is present.\n\nFor either scope, run the narrowest relevant test command to a clean exit and\nfinish with a compact `Requirement | Evidence` table. Each requested behavior\nmust cite an exact test name; validation rows cite the successful command.\nFor focused work, \"no intermediate state files\" changes only the process, not the\nfinal evidence contract.\n\nIntermediate state files are internal working data, never deliverables. Keep\n`\u003CTESTAGENT_DIR>` non-stageable, never place it or its files in\nversion-controlled workspace content, and never modify `.gitignore` to hide\nthem.\n\nTreat completeness as a requirement matrix, not a test-count target. Give every\nindependently requested state, boundary, error path, or interaction its own\nconcrete assertion. Combine cases only when one execution genuinely proves the\nwhole requested combination; do not let a parameterized happy-path case stand in\nfor an empty state, invalid discriminator, or before\u002Fat\u002Fafter boundary.\nFor broad requests that name several production modules or layers, give each\nnamed module direct tests for its non-trivial public behavior. Cross-module tests\nprove composition, but do not substitute for the requested module-level\ncoverage. Judge breadth by the behavior matrix, never by matching or exceeding a\nraw test count.\n\nFor a **broad or comprehensive** request, the explicit matrix is the floor, not\nthe ceiling. After satisfying it, inspect each target API for observable\nequivalence partitions and invariants that the prompt did not name: identity,\nempty, singleton and representative interior inputs; exact boundaries plus an\nimmediately adjacent value; invalid partitions; and ordering, monotonicity,\nrollover, capacity, truncation, or state invariants implied by the implementation.\nAdd one mutation-relevant case per distinct partition not already proved, using\nparameterized or table-driven cases for siblings. Stop when remaining inputs\nexercise the same branch and invariant, not merely when the explicit checklist\nis complete; never add cases only to raise the count.\n\n## When to Use This Skill\n\nUse this skill when you need to:\n\n- Generate unit tests for an entire project or specific files\n- Improve test coverage for existing codebases\n- Create test files that follow project conventions\n- Write tests that actually compile and pass\n- Add tests for new features or untested code\n- Generate or extend MSTest suites; load `writing-mstest-tests` as supporting\n  guidance after this entry skill has established scope and project conventions\n\n## When Not to Use\n\n- Running or executing existing tests (use the `run-tests` skill)\n- Migrating between test frameworks (use migration skills)\n- Answering an MSTest API\u002Fpattern or modernization question that does not ask to\n  generate tests (use `writing-mstest-tests`)\n- Debugging failing test logic\n\n## How It Works\n\nThis skill coordinates multiple specialized agents in a **Research → Plan → Implement** pipeline:\n\n### Pipeline Overview\n\n```text\n┌─────────────────────────────────────────────────────────────┐\n│                     TEST GENERATOR                          │\n│  Coordinates the full pipeline and manages state            │\n└─────────────────────┬───────────────────────────────────────┘\n                      │\n        ┌─────────────┼─────────────┐\n        ▼             ▼             ▼\n┌───────────┐  ┌───────────┐  ┌───────────────┐\n│ RESEARCHER│  │  PLANNER  │  │  IMPLEMENTER  │\n│           │  │           │  │               │\n│ Analyzes  │  │ Creates   │  │ Writes tests  │\n│ codebase  │→ │ phased    │→ │ per phase     │\n│           │  │ plan      │  │               │\n└───────────┘  └───────────┘  └───────┬───────┘\n                                      │\n                    ┌─────────┬───────┼───────────┐\n                    ▼         ▼       ▼           ▼\n              ┌─────────┐ ┌───────┐ ┌───────┐ ┌───────┐\n              │ BUILDER │ │TESTER │ │ FIXER │ │LINTER │\n              │         │ │       │ │       │ │       │\n              │ Compiles│ │ Runs  │ │ Fixes │ │Formats│\n              │ code    │ │ tests │ │ errors│ │ code  │\n              └─────────┘ └───────┘ └───────┘ └───────┘\n```\n\n## Step-by-Step Instructions\n\n### Step 1: Determine the user request\n\nMake sure you understand what user is asking and for what scope.\nWhen the user does not express strong requirements for test style, coverage goals, or conventions, source the guidelines from [unit-test-generation.prompt.md](unit-test-generation.prompt.md). This prompt provides best practices for discovering conventions, parameterization strategies, coverage goals (aim for 80%), and language-specific patterns.\n\n### Step 2: Size the request before invoking anything\n\nMatch the machinery to the scope. Running the full pipeline on a one-file\nrequest costs turns and tool calls without improving the tests.\n\n| Scope | What it looks like | How to run it |\n| --- | --- | --- |\n| **Focused** | One function, class, or file; \"tests for X only\"; extending an existing suite with the missing cases | Skip intermediate state files and the sub-agent fan-out. Keep the requirement checklist in your head (or in the final table), read only the target and one neighbouring test for conventions, write the tests, run the narrowest test command, review your own assertions inline. |\n| **Broad** | A project, package, or module set; \"comprehensive suite\"; a coverage threshold to clear across several files | Run the full Research → Plan → Implement pipeline in Step 3, with intermediate state files under `\u003CTESTAGENT_DIR>` and the completion contract below. |\n\nWhen in doubt, start focused and escalate only if the request turns out to span\nseveral files. Escalating costs one extra pass; running the broad pipeline on a\nfocused request costs several.\n\nBefore ending a focused request, check all three conditions together:\n\n1. every named behavior has a concrete assertion, including each requested\n   boundary or error path;\n2. the narrow test command exited successfully;\n3. the final `Requirement | Evidence` table maps those behaviors to exact test\n   names and cites that successful command.\n\nDo not replace this table with a prose list of covered areas, even for a\nsingle-function request.\n\n### Step 3: Invoke the Test Generator (broad scope)\n\nStart by calling the `code-testing-generator` agent with your test generation request:\n\n```text\nGenerate unit tests for [path or description of what to test], following the [unit-test-generation.prompt.md](unit-test-generation.prompt.md) guidelines. Treat the current workspace as authoritative even when it is sparse, gutted-looking, synthetic, or missing tracked files; never restore or reconstruct it, including with `git checkout`, `git restore`, `git reset`, or `git clean`.\n```\n\nThe Test Generator will manage the entire pipeline automatically.\n\nIf `code-testing-generator` is unavailable, do not skip the workflow. Execute the\nsame Research → Plan → Implement sequence inline, resolve `\u003CTESTAGENT_DIR>` as\ndescribed below, create the intermediate state files there, and apply the same\ncompletion contract.\n\nFor broad scope, resolve one absolute `\u003CTESTAGENT_DIR>` before creating\nintermediate state files:\n\n1. Prefer a host-provided session artifact or scratch directory.\n2. Otherwise, in a Git worktree run\n   `git rev-parse --path-format=absolute --git-path testagent`; this returns a\n   path in worktree-specific Git metadata that cannot be staged.\n3. Outside Git, create a unique directory under the operating system's\n   temporary directory.\n\nPass the absolute directory to every pipeline agent. The path may be inside the\nrepository's `.git` metadata directory, but it must not be version-controlled\nworkspace content, appear in `git status`, or be stageable.\n\n### Step 4: Execute with bounded context\n\nFor multi-file requests:\n\n1. Turn every explicit user requirement into a checklist before implementation. Include requested layers, collaborators to mock, boundary cases, integrations, coverage thresholds, and report artifacts. Copy multi-condition requirements verbatim — they must each map to one test that exercises the whole combination.\n2. Research only the requested module or project and write the checklist plus a compact target inventory to `\u003CTESTAGENT_DIR>\u002Fresearch.md`.\n3. Reuse manifests, symbol references, and deterministic pairing tools instead of reading every source and test file.\n4. For multi-file scopes in C#, Python, TypeScript\u002FJavaScript, Go, Java, Rust, Ruby, Kotlin, Swift, PowerShell, or C++, run `find-untested-sources` once and consume its pairing and suggested-path output; do not repeat that discovery manually.\n5. Plan each target file once, then implement phases sequentially. Map every checklist item to at least one concrete test or explain why it is blocked.\n6. Build and test the narrow target during fix cycles; run workspace-level validation once at the end.\n7. Before reporting success, re-open the generated tests and verify every checklist item against concrete test names and assertions. Coverage alone is not evidence that a requested mock seam, boundary, state transition, or property combination was tested.\n8. Read a language example from `code-testing-extensions` only when the repository has no representative tests and the base extension is insufficient.\n9. For .NET, classify SDK-style vs. classic non-SDK before choosing commands or creating files. In classic projects, preserve `packages.config`, existing framework\u002Fmock versions and custom base fixtures, add every new test file to the project's explicit `\u003CCompile Include>` items, and use the repository's MSBuild\u002Ftest-runner commands. Never modernize the project or dependency stack merely to generate tests.\n10. For MSTest, inspect the pinned package version before choosing exception\n    assertions. MSTest 3.5.x uses `Assert.ThrowsException\u003CT>`; do not substitute\n    `[ExpectedException]`, `Assert.Throws\u003CT>`, or `Assert.ThrowsExactly\u003CT>`.\n\n### Completion contract\n\nEvery scope must satisfy points 3–5 below. Points 1 and 2 are the **broad-scope**\nartifacts: on a focused request the same reasoning happens inline and no\nintermediate state files are written.\n\nDo not report completion until all of these are true:\n\n1. *(broad scope)* `\u003CTESTAGENT_DIR>\u002Fresearch.md` records the bounded target\n   inventory, existing test conventions, and the acceptance checklist.\n2. *(broad scope)* `\u003CTESTAGENT_DIR>\u002Fplan.md` maps each checklist item to a planned\n   test or an explicit blocker.\n3. Generated tests compile and pass with the narrowest relevant test command.\n4. Every explicit user requirement is backed by a concrete test and assertion.\n   Fix missing mock seams, boundary cases, state transitions, and property\n   combinations even when coverage already passes. In the final summary, cite\n   at least one generated test name for every checklist item so completion is\n   auditable; if an item has no test to cite, keep implementing or report it as\n   blocked. For non-behavioral requirements such as scaffolding, scope limits,\n   commands, or coverage artifacts, cite the relevant file, command, or report\n   instead of forcing a test-name mapping.\n   A passing suite with fewer tests is not automatically weaker: judge\n   completeness by whether every independently requested behavior has direct,\n   nonredundant evidence, not by raw test volume.\n   For broad\u002Fcomprehensive scope, also verify that every observable equivalence\n   partition and invariant discovered in the bounded target APIs has one\n   mutation-relevant case, even when the prompt did not name it.\n   When the request names multiple modules, verify that each module's own\n   non-trivial public behavior has direct test evidence in addition to any\n   end-to-end composition test.\n5. Review the generated tests for behavior gaps and weak assertions. On a broad\n   scope, invoke `test-gap-analysis` and `assertion-quality` when available and\n   record the findings and fixes in `\u003CTESTAGENT_DIR>\u002Fstatus.md`. On a focused scope,\n   do the equivalent review inline — re-read each generated assertion against\n   the source — without spawning extra passes.\n\nThe final response MUST include a compact `Requirement | Evidence` table.\nBehavioral rows cite exact generated test names. Non-behavioral rows cite the\nrelevant project file, validation command, or coverage report. A generic list\nof tested areas is not a substitute for requirement-by-requirement evidence.\n\n**Quote the user's requirement verbatim in each row.** When the request names a\nspecific combination — \"a case where a composite discount, regional tax, and\nweight-based shipping all apply\", \"the difference between summed and chained\ndiscounts\", \"constructor validation for every class\" — the row must cite the one\ntest that demonstrates exactly that. A test that merely exercises the same\ncollaborators does not satisfy a requirement about their interaction, and\nper-class requirements need a citation per class.\n\n**Cite a clean run, not an attempt.** The commands behind the evidence table must\nhave finished successfully: quote the final passing test summary and, when\nthresholds were requested, the per-module coverage table from a run that exited\n0. If the last coverage run exited non-zero, fix it and re-run before reporting;\nnever infer threshold clearance from a failed or partial run.\n\nBefore reporting, inspect the final working-tree changes and confirm that\n`research.md`, `plan.md`, `status.md`, and any other intermediate state files are\nnot among the changes intended for commit.\n\n## State Management\n\nBroad-scope runs store intermediate state files in a non-stageable\n`\u003CTESTAGENT_DIR>` backed by host scratch storage, Git metadata, or OS temp. A\nfocused request does not create these files:\n\n| File                     | Purpose                      |\n| ------------------------ | ---------------------------- |\n| `\u003CTESTAGENT_DIR>\u002Fresearch.md` | Codebase analysis results    |\n| `\u003CTESTAGENT_DIR>\u002Fplan.md`     | Phased implementation plan   |\n| `\u003CTESTAGENT_DIR>\u002Fstatus.md`   | Final quality review and fixes |\n\n## Agent Reference\n\n| Agent                      | Purpose              |\n| -------------------------- | -------------------- |\n| `code-testing-generator`   | Coordinates pipeline |\n| `code-testing-researcher`  | Analyzes codebase    |\n| `code-testing-planner`     | Creates test plan    |\n| `code-testing-implementer` | Writes test files    |\n| `code-testing-builder`     | Compiles code        |\n| `code-testing-tester`      | Runs tests           |\n| `code-testing-fixer`       | Fixes errors         |\n| `code-testing-linter`      | Formats code         |\n\n## Requirements\n\n- Project must have a build\u002Ftest system configured\n- Testing framework should be installed (or installable)\n- VS Code with GitHub Copilot extension\n\nClassic non-SDK .NET projects are supported when their existing build\u002Ftest\ntoolchain is available. When it is not available on the current machine, the\nagent can still add and register version-compatible tests, but must report\nexecution as blocked rather than substituting `dotnet test`.\n\n## Troubleshooting\n\n### Tests don't compile\n\nThe `code-testing-fixer` agent will attempt to resolve compilation errors. Check\n`\u003CTESTAGENT_DIR>\u002Fplan.md` for the expected test structure. Call the\n`code-testing-extensions` skill and read the language-specific extension file\nfor error code references (e.g., `dotnet.md` for .NET).\n\n### Tests fail\n\nMost failures in generated tests are caused by **wrong expected values in assertions**, not production code bugs:\n\n1. Read the actual test output\n2. Read the production code to understand correct behavior\n3. Fix the assertion, not the production code\n4. Never mark tests `[Ignore]` or `[Skip]` just to make them pass\n\n### Wrong testing framework detected\n\nSpecify your preferred framework in the initial request: \"Generate Jest tests for...\"\n\n### Environment-dependent tests fail\n\nTests that depend on external services, network endpoints, specific ports, or precise timing will fail in CI environments. Focus on unit tests with mocked dependencies instead.\n\n### Build fails on full solution\n\nDuring phase implementation, build only the specific test project for speed. After all phases, run a full non-incremental workspace build to catch cross-project errors.\n","# Code Testing Generation Skill\n\nAn AI-powered skill that generates comprehensive, workable unit tests for any programming language using a coordinated multi-agent pipeline.\n\n## Non-negotiable execution contract\n\nClassify scope **before editing**:\n\n- **Broad** (a project\u002Fpackage-wide suite, or multiple production\n  files\u002Fmodules): create `research.md` and `plan.md` in a resolved\n  non-stageable `\u003CTESTAGENT_DIR>` before implementation, then `status.md` there\n  after the final test-quality review. If these files are absent, the broad\n  workflow is incomplete.\n- **Focused** (the user explicitly limits work to one function\u002Fclass\u002Ffile or one\n  missing method): do not create intermediate state files or fan out to multiple\n  agents. A sparse project-wide request remains broad even when only one source\n  module is present.\n\nFor either scope, run the narrowest relevant test command to a clean exit and\nfinish with a compact `Requirement | Evidence` table. Each requested behavior\nmust cite an exact test name; validation rows cite the successful command.\nFor focused work, \"no intermediate state files\" changes only the process, not the\nfinal evidence contract.\n\nIntermediate state files are internal working data, never deliverables. Keep\n`\u003CTESTAGENT_DIR>` non-stageable, never place it or its files in\nversion-controlled workspace content, and never modify `.gitignore` to hide\nthem.\n\nTreat completeness as a requirement matrix, not a test-count target. Give every\nindependently requested state, boundary, error path, or interaction its own\nconcrete assertion. Combine cases only when one execution genuinely proves the\nwhole requested combination; do not let a parameterized happy-path case stand in\nfor an empty state, invalid discriminator, or before\u002Fat\u002Fafter boundary.\nFor broad requests that name several production modules or layers, give each\nnamed module direct tests for its non-trivial public behavior. Cross-module tests\nprove composition, but do not substitute for the requested module-level\ncoverage. Judge breadth by the behavior matrix, never by matching or exceeding a\nraw test count.\n\nFor a **broad or comprehensive** request, the explicit matrix is the floor, not\nthe ceiling. After satisfying it, inspect each target API for observable\nequivalence partitions and invariants that the prompt did not name: identity,\nempty, singleton and representative interior inputs; exact boundaries plus an\nimmediately adjacent value; invalid partitions; and ordering, monotonicity,\nrollover, capacity, truncation, or state invariants implied by the implementation.\nAdd one mutation-relevant case per distinct partition not already proved, using\nparameterized or table-driven cases for siblings. Stop when remaining inputs\nexercise the same branch and invariant, not merely when the explicit checklist\nis complete; never add cases only to raise the count.\n\n## When to Use This Skill\n\nUse this skill when you need to:\n\n- Generate unit tests for an entire project or specific files\n- Improve test coverage for existing codebases\n- Create test files that follow project conventions\n- Write tests that actually compile and pass\n- Add tests for new features or untested code\n- Generate or extend MSTest suites; load `writing-mstest-tests` as supporting\n  guidance after this entry skill has established scope and project conventions\n\n## When Not to Use\n\n- Running or executing existing tests (use the `run-tests` skill)\n- Migrating between test frameworks (use migration skills)\n- Answering an MSTest API\u002Fpattern or modernization question that does not ask to\n  generate tests (use `writing-mstest-tests`)\n- Debugging failing test logic\n\n## How It Works\n\nThis skill coordinates multiple specialized agents in a **Research → Plan → Implement** pipeline:\n\n### Pipeline Overview\n\n```text\n┌─────────────────────────────────────────────────────────────┐\n│                     TEST GENERATOR                          │\n│  Coordinates the full pipeline and manages state            │\n└─────────────────────┬───────────────────────────────────────┘\n                      │\n        ┌─────────────┼─────────────┐\n        ▼             ▼             ▼\n┌───────────┐  ┌───────────┐  ┌───────────────┐\n│ RESEARCHER│  │  PLANNER  │  │  IMPLEMENTER  │\n│           │  │           │  │               │\n│ Analyzes  │  │ Creates   │  │ Writes tests  │\n│ codebase  │→ │ phased    │→ │ per phase     │\n│           │  │ plan      │  │               │\n└───────────┘  └───────────┘  └───────┬───────┘\n                                      │\n                    ┌─────────┬───────┼───────────┐\n                    ▼         ▼       ▼           ▼\n              ┌─────────┐ ┌───────┐ ┌───────┐ ┌───────┐\n              │ BUILDER │ │TESTER │ │ FIXER │ │LINTER │\n              │         │ │       │ │       │ │       │\n              │ Compiles│ │ Runs  │ │ Fixes │ │Formats│\n              │ code    │ │ tests │ │ errors│ │ code  │\n              └─────────┘ └───────┘ └───────┘ └───────┘\n```\n\n## Step-by-Step Instructions\n\n### Step 1: Determine the user request\n\nMake sure you understand what user is asking and for what scope.\nWhen the user does not express strong requirements for test style, coverage goals, or conventions, source the guidelines from [unit-test-generation.prompt.md](unit-test-generation.prompt.md). This prompt provides best practices for discovering conventions, parameterization strategies, coverage goals (aim for 80%), and language-specific patterns.\n\n### Step 2: Size the request before invoking anything\n\nMatch the machinery to the scope. Running the full pipeline on a one-file\nrequest costs turns and tool calls without improving the tests.\n\n| Scope | What it looks like | How to run it |\n| --- | --- | --- |\n| **Focused** | One function, class, or file; \"tests for X only\"; extending an existing suite with the missing cases | Skip intermediate state files and the sub-agent fan-out. Keep the requirement checklist in your head (or in the final table), read only the target and one neighbouring test for conventions, write the tests, run the narrowest test command, review your own assertions inline. |\n| **Broad** | A project, package, or module set; \"comprehensive suite\"; a coverage threshold to clear across several files | Run the full Research → Plan → Implement pipeline in Step 3, with intermediate state files under `\u003CTESTAGENT_DIR>` and the completion contract below. |\n\nWhen in doubt, start focused and escalate only if the request turns out to span\nseveral files. Escalating costs one extra pass; running the broad pipeline on a\nfocused request costs several.\n\nBefore ending a focused request, check all three conditions together:\n\n1. every named behavior has a concrete assertion, including each requested\n   boundary or error path;\n2. the narrow test command exited successfully;\n3. the final `Requirement | Evidence` table maps those behaviors to exact test\n   names and cites that successful command.\n\nDo not replace this table with a prose list of covered areas, even for a\nsingle-function request.\n\n### Step 3: Invoke the Test Generator (broad scope)\n\nStart by calling the `code-testing-generator` agent with your test generation request:\n\n```text\nGenerate unit tests for [path or description of what to test], following the [unit-test-generation.prompt.md](unit-test-generation.prompt.md) guidelines. Treat the current workspace as authoritative even when it is sparse, gutted-looking, synthetic, or missing tracked files; never restore or reconstruct it, including with `git checkout`, `git restore`, `git reset`, or `git clean`.\n```\n\nThe Test Generator will manage the entire pipeline automatically.\n\nIf `code-testing-generator` is unavailable, do not skip the workflow. Execute the\nsame Research → Plan → Implement sequence inline, resolve `\u003CTESTAGENT_DIR>` as\ndescribed below, create the intermediate state files there, and apply the same\ncompletion contract.\n\nFor broad scope, resolve one absolute `\u003CTESTAGENT_DIR>` before creating\nintermediate state files:\n\n1. Prefer a host-provided session artifact or scratch directory.\n2. Otherwise, in a Git worktree run\n   `git rev-parse --path-format=absolute --git-path testagent`; this returns a\n   path in worktree-specific Git metadata that cannot be staged.\n3. Outside Git, create a unique directory under the operating system's\n   temporary directory.\n\nPass the absolute directory to every pipeline agent. The path may be inside the\nrepository's `.git` metadata directory, but it must not be version-controlled\nworkspace content, appear in `git status`, or be stageable.\n\n### Step 4: Execute with bounded context\n\nFor multi-file requests:\n\n1. Turn every explicit user requirement into a checklist before implementation. Include requested layers, collaborators to mock, boundary cases, integrations, coverage thresholds, and report artifacts. Copy multi-condition requirements verbatim — they must each map to one test that exercises the whole combination.\n2. Research only the requested module or project and write the checklist plus a compact target inventory to `\u003CTESTAGENT_DIR>\u002Fresearch.md`.\n3. Reuse manifests, symbol references, and deterministic pairing tools instead of reading every source and test file.\n4. For multi-file scopes in C#, Python, TypeScript\u002FJavaScript, Go, Java, Rust, Ruby, Kotlin, Swift, PowerShell, or C++, run `find-untested-sources` once and consume its pairing and suggested-path output; do not repeat that discovery manually.\n5. Plan each target file once, then implement phases sequentially. Map every checklist item to at least one concrete test or explain why it is blocked.\n6. Build and test the narrow target during fix cycles; run workspace-level validation once at the end.\n7. Before reporting success, re-open the generated tests and verify every checklist item against concrete test names and assertions. Coverage alone is not evidence that a requested mock seam, boundary, state transition, or property combination was tested.\n8. Read a language example from `code-testing-extensions` only when the repository has no representative tests and the base extension is insufficient.\n9. For .NET, classify SDK-style vs. classic non-SDK before choosing commands or creating files. In classic projects, preserve `packages.config`, existing framework\u002Fmock versions and custom base fixtures, add every new test file to the project's explicit `\u003CCompile Include>` items, and use the repository's MSBuild\u002Ftest-runner commands. Never modernize the project or dependency stack merely to generate tests.\n10. For MSTest, inspect the pinned package version before choosing exception\n    assertions. MSTest 3.5.x uses `Assert.ThrowsException\u003CT>`; do not substitute\n    `[ExpectedException]`, `Assert.Throws\u003CT>`, or `Assert.ThrowsExactly\u003CT>`.\n\n### Completion contract\n\nEvery scope must satisfy points 3–5 below. Points 1 and 2 are the **broad-scope**\nartifacts: on a focused request the same reasoning happens inline and no\nintermediate state files are written.\n\nDo not report completion until all of these are true:\n\n1. *(broad scope)* `\u003CTESTAGENT_DIR>\u002Fresearch.md` records the bounded target\n   inventory, existing test conventions, and the acceptance checklist.\n2. *(broad scope)* `\u003CTESTAGENT_DIR>\u002Fplan.md` maps each checklist item to a planned\n   test or an explicit blocker.\n3. Generated tests compile and pass with the narrowest relevant test command.\n4. Every explicit user requirement is backed by a concrete test and assertion.\n   Fix missing mock seams, boundary cases, state transitions, and property\n   combinations even when coverage already passes. In the final summary, cite\n   at least one generated test name for every checklist item so completion is\n   auditable; if an item has no test to cite, keep implementing or report it as\n   blocked. For non-behavioral requirements such as scaffolding, scope limits,\n   commands, or coverage artifacts, cite the relevant file, command, or report\n   instead of forcing a test-name mapping.\n   A passing suite with fewer tests is not automatically weaker: judge\n   completeness by whether every independently requested behavior has direct,\n   nonredundant evidence, not by raw test volume.\n   For broad\u002Fcomprehensive scope, also verify that every observable equivalence\n   partition and invariant discovered in the bounded target APIs has one\n   mutation-relevant case, even when the prompt did not name it.\n   When the request names multiple modules, verify that each module's own\n   non-trivial public behavior has direct test evidence in addition to any\n   end-to-end composition test.\n5. Review the generated tests for behavior gaps and weak assertions. On a broad\n   scope, invoke `test-gap-analysis` and `assertion-quality` when available and\n   record the findings and fixes in `\u003CTESTAGENT_DIR>\u002Fstatus.md`. On a focused scope,\n   do the equivalent review inline — re-read each generated assertion against\n   the source — without spawning extra passes.\n\nThe final response MUST include a compact `Requirement | Evidence` table.\nBehavioral rows cite exact generated test names. Non-behavioral rows cite the\nrelevant project file, validation command, or coverage report. A generic list\nof tested areas is not a substitute for requirement-by-requirement evidence.\n\n**Quote the user's requirement verbatim in each row.** When the request names a\nspecific combination — \"a case where a composite discount, regional tax, and\nweight-based shipping all apply\", \"the difference between summed and chained\ndiscounts\", \"constructor validation for every class\" — the row must cite the one\ntest that demonstrates exactly that. A test that merely exercises the same\ncollaborators does not satisfy a requirement about their interaction, and\nper-class requirements need a citation per class.\n\n**Cite a clean run, not an attempt.** The commands behind the evidence table must\nhave finished successfully: quote the final passing test summary and, when\nthresholds were requested, the per-module coverage table from a run that exited\n0. If the last coverage run exited non-zero, fix it and re-run before reporting;\nnever infer threshold clearance from a failed or partial run.\n\nBefore reporting, inspect the final working-tree changes and confirm that\n`research.md`, `plan.md`, `status.md`, and any other intermediate state files are\nnot among the changes intended for commit.\n\n## State Management\n\nBroad-scope runs store intermediate state files in a non-stageable\n`\u003CTESTAGENT_DIR>` backed by host scratch storage, Git metadata, or OS temp. A\nfocused request does not create these files:\n\n| File                     | Purpose                      |\n| ------------------------ | ---------------------------- |\n| `\u003CTESTAGENT_DIR>\u002Fresearch.md` | Codebase analysis results    |\n| `\u003CTESTAGENT_DIR>\u002Fplan.md`     | Phased implementation plan   |\n| `\u003CTESTAGENT_DIR>\u002Fstatus.md`   | Final quality review and fixes |\n\n## Agent Reference\n\n| Agent                      | Purpose              |\n| -------------------------- | -------------------- |\n| `code-testing-generator`   | Coordinates pipeline |\n| `code-testing-researcher`  | Analyzes codebase    |\n| `code-testing-planner`     | Creates test plan    |\n| `code-testing-implementer` | Writes test files    |\n| `code-testing-builder`     | Compiles code        |\n| `code-testing-tester`      | Runs tests           |\n| `code-testing-fixer`       | Fixes errors         |\n| `code-testing-linter`      | Formats code         |\n\n## Requirements\n\n- Project must have a build\u002Ftest system configured\n- Testing framework should be installed (or installable)\n- VS Code with GitHub Copilot extension\n\nClassic non-SDK .NET projects are supported when their existing build\u002Ftest\ntoolchain is available. When it is not available on the current machine, the\nagent can still add and register version-compatible tests, but must report\nexecution as blocked rather than substituting `dotnet test`.\n\n## Troubleshooting\n\n### Tests don't compile\n\nThe `code-testing-fixer` agent will attempt to resolve compilation errors. Check\n`\u003CTESTAGENT_DIR>\u002Fplan.md` for the expected test structure. Call the\n`code-testing-extensions` skill and read the language-specific extension file\nfor error code references (e.g., `dotnet.md` for .NET).\n\n### Tests fail\n\nMost failures in generated tests are caused by **wrong expected values in assertions**, not production code bugs:\n\n1. Read the actual test output\n2. Read the production code to understand correct behavior\n3. Fix the assertion, not the production code\n4. Never mark tests `[Ignore]` or `[Skip]` just to make them pass\n\n### Wrong testing framework detected\n\nSpecify your preferred framework in the initial request: \"Generate Jest tests for...\"\n\n### Environment-dependent tests fail\n\nTests that depend on external services, network endpoints, specific ports, or precise timing will fail in CI environments. Focus on unit tests with mocked dependencies instead.\n\n### Build fails on full solution\n\nDuring phase implementation, build only the specific test project for speed. After all phases, run a full non-incremental workspace build to catch cross-project errors.\n",{"name":5,"license":15,"description":7},"main","30954af1dcd1a74b63f05deb2e2c41e5ecae4a82","02-CSharp-WPF-Desktop-Development\u002Fcode-testing-agent","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack","https:\u002F\u002Fgithub.com\u002Fitsmejay18","2026-09-18 16:06:36",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add itsmejay18\u002FAI-Skills-for-My-Development-Stack --skill code-testing-agent",{"tool":36,"command":37},"bunx","bunx skills add itsmejay18\u002FAI-Skills-for-My-Development-Stack --skill code-testing-agent",{"tool":39,"command":40},"pnpm","pnpm dlx skills add itsmejay18\u002FAI-Skills-for-My-Development-Stack --skill code-testing-agent","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F02-CSharp-WPF-Desktop-Development\u002Fcode-testing-agent\u002FSKILL.md",true,[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"unit-test-generation.prompt.md","REFERENCE","参考文档",10159,"https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F02-CSharp-WPF-Desktop-Development\u002Fcode-testing-agent\u002Funit-test-generation.prompt.md",[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7D2RKBHPZ3E1RNN5DWHT550","vectorization","Design, implement, optimize, and review SIMD code in .NET. USE FOR: vectorizing scalar loops with TensorPrimitives, Vector64\u002F128\u002F256\u002F512, or platform hardware intrinsics; reviewing existing SIMD code, including Vector\u003CT>, for contract equivalence, tail handling, memory safety, portability, fallbacks, and measured performance. DO NOT USE FOR: performance work unrelated to SIMD or vectorization.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fvectorization\u002FSKILL.md",[],[],{"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},"01M7D2RDJ7RN3QK8GJR0QTER1D","resolve-project-references","Guide for interpreting ResolveProjectReferences time in MSBuild performance summaries. Activate when ResolveProjectReferences appears as the most expensive target and developers are trying to optimize it directly. Explains that the reported time includes wait time for dependent project builds and is misleading. Guides users to focus on task self-time instead. Do not activate for general build performance -- use build-perf-diagnostics instead.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fresolve-project-references\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":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7D2R1H2GTNZYHG9YRX3JDQW","optimizing-ef-core-queries","Optimize and improve the performance of slow Entity Framework Core (EF Core) queries: make them generate less SQL, make fewer database round-trips, and return results faster. Use whenever an EF Core or DbContext query or data-access path is slow or should be made faster — whether or not EF Core owns the database schema. For EF Core, not Dapper or raw ADO.NET.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Foptimizing-ef-core-queries\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7D2QREG04W1YT0NEBHEW5C9","microbenchmarking","Activate this skill when BenchmarkDotNet (BDN) is involved in the task — creating, running, configuring, or reviewing BDN benchmarks. Also activate when microbenchmarking .NET code would be useful and BenchmarkDotNet is the likely tool. Consider activating when answering a .NET performance question requires measurement and BenchmarkDotNet may be needed. Covers microbenchmark design, BDN configuration and project setup, how to run BDN microbenchmarks efficiently and effectively, and using BDN for side-by-side performance comparisons. Do NOT use for profiling\u002Ftracing .NET code (dotnet-trace, PerfView), production telemetry, or load\u002Fstress testing (Crank, k6).","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fmicrobenchmarking\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7D2QGE175XWPZVACVH2868Z","incremental-build","Guide for optimizing MSBuild incremental builds. USE FOR: builds slower than expected on subsequent runs, 'nothing changed but it rebuilds anyway', diagnosing why targets re-execute unnecessarily, fixing broken no-op builds. Covers 8 common causes: missing Inputs\u002FOutputs on custom targets, volatile properties in output paths (timestamps\u002FGUIDs), file writes outside tracked Outputs, missing FileWrites registration, glob changes, Visual Studio Fast Up-to-Date Check (FUTDC) issues. Key diagnostic: look for 'Building target completely' vs 'Skipping target' in binlog. DO NOT USE FOR: first-time build slowness (use build-perf-baseline), parallelism issues (use build-parallelism), evaluation-phase slowness (use eval-performance), non-MSBuild build systems.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fincremental-build\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7D2Q1DQTC6K49R73WQTTPSB","eval-performance","Guide for diagnosing and improving MSBuild project evaluation performance. USE FOR: builds slow before any compilation starts, high evaluation time in binlog analysis, expensive glob patterns walking large directories (node_modules, .git, bin\u002Fobj), deep import chains (>20 levels), preprocessed output >10K lines indicating heavy evaluation, property functions with file I\u002FO ($([System.IO.File]::ReadAllText(...))), multiple evaluations per project. Covers the 5 MSBuild evaluation phases, glob optimization via DefaultItemExcludes, import chain analysis with \u002Fpp preprocessing. DO NOT USE FOR: compilation-time slowness (use build-perf-diagnostics), incremental build issues (use incremental-build), non-MSBuild build systems.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Feval-performance\u002FSKILL.md",[],[]]