SkillAgentSearch skills...

code-testing-agent

ALWAYS USE whenever asked to write, add, or generate unit tests for existing code in xUnit, MSTest, NUnit, pytest, Vitest/Jest, Go, or another framework, including "tests only for" one helper, function, class, or missing regression case as well as project-wide suites.

Install / Use

npx skills add dotnet/skills --skill code-testing-agent

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

87/100

Category

Automation

Supported Platforms

Universal

Our assessment of code-testing-agent

code-testing-agent scores 87/100 on our quality scale, 912th of 1,554 Automation skills we index.

Its SKILL.md is 18 KB long, well organised into 21 sections with 2 code examples: a thorough specification that gives an agent plenty to work with.

With 5,471 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
30/30
Structure
18/20
Description
15/15
Adoption
16/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 2 days ago, so code-testing-agent is actively maintained.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

code-testing-agent compared with similar skills

All 4 of these similar skills score higher than code-testing-agent; compare them before choosing.

SkillScoreStarsUpdatedFormat
code-testing-agent (this skill)by dotnet875.5k2d agoSKILL.md
Agent-Reachby Panniantong10085.6k11d agoCLAUDE.md
rufloby ruvnet10073.3ktodayCLAUDE.md
Scraplingby D4Vinci10083.9ktodayMCP Server
algorithmic-artby anthropics100177.9k4d agoSKILL.md

Frequently asked questions

How do I install code-testing-agent?
Run npx skills add dotnet/skills --skill code-testing-agent. The install tabs above show the steps for each supported agent.
Which AI agents does code-testing-agent work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is code-testing-agent safe to use?
It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is code-testing-agent still maintained?
The repository was last updated 2 days ago, so code-testing-agent is actively maintained.

name: code-testing-agent description: >- ALWAYS USE whenever asked to write, add, or generate unit tests for existing code in xUnit, MSTest, NUnit, pytest, Vitest/Jest, Go, or another framework, including "tests only for" 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/diagnosing tests, coverage/audits, 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). license: MIT

Code Testing Generation Skill

An AI-powered skill that generates comprehensive, workable unit tests for any programming language using a coordinated multi-agent pipeline.

Non-negotiable execution contract

Classify scope before editing:

  • Broad (a project/package-wide suite, or multiple production files/modules): create research.md and plan.md in a resolved non-stageable <TESTAGENT_DIR> before implementation, then status.md there after the final test-quality review. When code-testing-generator is available, invoke that named custom agent before implementing; do not replace it with a generic subagent carrying the same label or implement the broad request inline. If the state files are absent, the broad workflow is incomplete.
  • Focused (the user explicitly limits work to one function/class/file or one missing method): do not create intermediate state files or fan out to multiple agents. A sparse project-wide request remains broad even when only one source module is present.

For either scope, run the narrowest relevant test command to a clean exit. Keep the handoff proportional: for one to three focused requirements, use a compact bullet list under a Requirement coverage label that names the tests and successful command; for broader or multi-requirement work, use a Requirement | Evidence table. Each requested behavior must cite an exact test name.

Intermediate state files are internal working data, never deliverables. Keep <TESTAGENT_DIR> non-stageable, never place it or its files in version-controlled workspace content, and never modify .gitignore to hide them.

Treat completeness as a requirement matrix, not a test-count target. Give every independently requested state, boundary, error path, or interaction its own concrete assertion. Combine cases only when one execution genuinely proves the whole requested combination; do not let a parameterized happy-path case stand in for an empty state, invalid discriminator, or before/at/after boundary. For broad requests that name several production modules or layers, give each named module direct tests for its non-trivial public behavior. Cross-module tests prove composition, but do not substitute for the requested module-level coverage. Judge breadth by the behavior matrix, never by matching or exceeding a raw test count.

For a broad or comprehensive request, the explicit matrix is the floor, not the ceiling. Treat each requested module or layer as an inventory heading, not one behavior: expand it into the bounded public operations and their distinct validation paths, branches, boundaries, interactions, and state transitions. After satisfying the explicit matrix, inspect each target API for observable equivalence partitions and invariants that the prompt did not name: identity, empty, singleton and representative interior inputs; exact boundaries plus an immediately adjacent value; invalid partitions; and ordering, monotonicity, rollover, capacity, truncation, or state invariants implied by the implementation. Add one mutation-relevant case per distinct partition not already proved, using parameterized or table-driven cases only for siblings that prove the same behavior. A passing coverage threshold is validation, not a breadth stop condition. Stop when remaining inputs exercise the same branch and invariant, not merely when the explicit checklist is complete; never add cases only to raise the count.

When to Use This Skill

Use this skill when you need to:

  • Generate unit tests for an entire project or specific files
  • Improve test coverage for existing codebases
  • Create test files that follow project conventions
  • Write tests that actually compile and pass
  • Add tests for new features or untested code
  • Generate or extend MSTest suites; load writing-mstest-tests as supporting guidance after this entry skill has established scope and project conventions

When Not to Use

  • Running or executing existing tests (use the run-tests skill)
  • Migrating between test frameworks (use migration skills)
  • Answering an MSTest API/pattern or modernization question that does not ask to generate tests (use writing-mstest-tests)
  • Debugging failing test logic

How It Works

This skill coordinates multiple specialized agents in a Research → Plan → Implement pipeline:

Pipeline Overview

┌─────────────────────────────────────────────────────────────┐
│                     TEST GENERATOR                          │
│  Coordinates the full pipeline and manages state            │
└─────────────────────┬───────────────────────────────────────┘
                      │
        ┌─────────────┼─────────────┐
        ▼             ▼             ▼
┌───────────┐  ┌───────────┐  ┌───────────────┐
│ RESEARCHER│  │  PLANNER  │  │  IMPLEMENTER  │
│           │  │           │  │               │
│ Analyzes  │  │ Creates   │  │ Writes tests  │
│ codebase  │→ │ phased    │→ │ per phase     │
│           │  │ plan      │  │               │
└───────────┘  └───────────┘  └───────┬───────┘
                                      │
                    ┌─────────┬───────┼───────────┐
                    ▼         ▼       ▼           ▼
              ┌─────────┐ ┌───────┐ ┌───────┐ ┌───────┐
              │ BUILDER │ │TESTER │ │ FIXER │ │LINTER │
              │         │ │       │ │       │ │       │
              │ Compiles│ │ Runs  │ │ Fixes │ │Formats│
              │ code    │ │ tests │ │ errors│ │ code  │
              └─────────┘ └───────┘ └───────┘ └───────┘

Step-by-Step Instructions

Step 1: Determine the user request

Make sure you understand what user is asking and for what scope. When the user does not express strong requirements for test style, coverage goals, or conventions, source the guidelines from unit-test-generation.prompt.md. This prompt provides best practices for discovering conventions, parameterization strategies, behavior-focused coverage, and language-specific patterns.

Step 2: Size the request before invoking anything

Match the machinery to the scope. Running the full pipeline on a one-file request costs turns and tool calls without improving the tests.

| Scope | What it looks like | How to run it | | --- | --- | --- | | 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. | | 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 <TESTAGENT_DIR> and the completion contract below. |

When in doubt, start focused and escalate only if the request turns out to span several files. Escalating costs one extra pass; running the broad pipeline on a focused request costs several.

Before ending a focused request, check all three conditions together:

  1. every named behavior has a concrete assertion, including each requested boundary or error path;
  2. the narrow test command exited successfully;
  3. the final handoff maps those behaviors to exact test names and cites that successful command.

Do not replace requirement-level evidence with a generic list of covered areas.

Step 3: Invoke the Test Generator (broad scope)

Start by invoking the named code-testing-generator custom agent with your test generation request. Do not use a generic/general-purpose subagent merely named code-testing-generator:

Generate 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`.

The Test Generator will manage the entire pipeline automatically.

If code-testing-generator is unavailable, do not skip the workflow. Execute the same Research → Plan → Implement sequence inline, resolve <TESTAGENT_DIR> as described below, create the intermediate state files there, and apply the same completion contract.

For broad scope, resolve one absolute <TESTAGENT_DIR> before creating intermediate state files:

  1. Prefer a host-provided session artifact or scratch directory.
  2. Otherwise, in a Git worktree run git rev-parse --path-format=absolute --git-path testagent; this returns a path in worktree-specific Git metadata that cannot be staged.
  3. Outside Git, create a unique directory under the operating system's temporary directory.

Pass the absolute directory to every pipeline agent. The path may be inside the repository's .git metadata directory, but it must not be version-controlled workspace content, appear in git status, or be stageable.

Step 4: Execute with bounded context

For multi-file requests:

  1. 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.
  2. Research only the requested module or project and write the checklist plus a compact target inventory to <TESTAGENT_DIR>/research.md.
  3. Reuse manifests, symbol references, and deterministic pairing tools instead of reading every source and test file.
  4. For multi-file scopes in C#, Python, TypeScript/JavaScript, 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.
  5. 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.
  6. Build and test the narrow target during fix cycles. Run workspace-level validation once at the end only for broad work, when the repository contract requires that entry point, or when the changes can affect other projects.
  7. 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.
  8. Read a language example from code-testing-extensions only when the repository has no representative tests and the base extension is insufficient.
  9. For .NET, classify SDK-style vs. classic non-SDK before choosing commands or creating files. In classic projects, preserve packages.config, existing framework/mock versions and custom base fixtures, add every new test file to the project's exp

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars5.5k
CategoryAutomation
Updated2d ago
Forks418

Languages

C#

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions