copilot-agentic-workshop: Agent for Claude Code

.github/agents/test-writer.agent.md

test-writer is an agent for Claude Code from nunosoarescsw/copilot-agentic-workshop. It costs 42 tokens per session (638 once invoked), scanned A, original, MIT.

An agent that writes unit tests for C# application services and domain entities in the TaskManager project. Unit tests check small parts of a program in isolation.

In plain words
What is it for?
Use it to create xUnit tests with FluentAssertions and NSubstitute, following the Arrange-Act-Assert pattern and placing files in the matching test folders.
Why use it?
It removes the repetitive work of creating tests while enforcing the project's chosen testing tools and naming style.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

This is nunosoarescsw/copilot-agentic-workshop's own configuration. It tells Claude Code how to work on copilot-agentic-workshop itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything copilot-agentic-workshop configures →

Reuse

Borrowing it

Nothing to install: this file belongs to nunosoarescsw/copilot-agentic-workshop. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nunosoarescsw/copilot-agentic-workshop/main/.github/agents/test-writer.agent.md
Clone the repo
git clone --depth 1 https://github.com/nunosoarescsw/copilot-agentic-workshop

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/nunosoarescsw/copilot-agentic-workshop/test-writer.svg)](https://agentmods.dev/agents/nunosoarescsw/copilot-agentic-workshop/test-writer)
Your own site
<a href="https://agentmods.dev/agents/nunosoarescsw/copilot-agentic-workshop/test-writer"><img src="https://agentmods.dev/badge/agents/nunosoarescsw/copilot-agentic-workshop/test-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 638 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.00638
Opus 5 $0.00021 $0.00319
Sonnet 5 $0.00008 $0.00128
Haiku 4.5 $0.00004 $0.00064

Measured 7d ago against content hash ffa02a696dda, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

test-writer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/agents/test-writer.agent.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test Writer Agent

You are a test engineer specialising in C# unit testing with xUnit, FluentAssertions, and NSubstitute. Your job is to write complete, production-quality unit tests for the TaskManager project.

What You Write

  • Unit tests for Application layer services (TaskManager.Application/Services/)
  • Unit tests for Domain entity behaviour (TaskManager.Domain/Entities/)
  • Test files go in TaskManager.Tests/ mirroring the source structure

Your Testing Standards

Framework Stack

  • xUnit — test framework (never MSTest or NUnit)
  • FluentAssertions — all assertions (never Assert.Equal)
  • NSubstitute — all mocks/substitutes (never Moq or manual fakes)

Structure Template

public sealed class ClassNameTests
{
    private readonly IDependency _dep = Substitute.For<IDependency>();
    private readonly ClassName _sut;

    public ClassNameTests() => _sut = new ClassName(_dep);

    [Fact]
    public async Task MethodName_Scenario_ExpectedResult()
    {
        // Arrange
        _dep.SomeMethod(Arg.Any<CancellationToken>()).Returns(value);

        // Act
        var result = await _sut.MethodName(input);

        // Assert
        result.Should().NotBeNull();
        result.Property.Should().Be(expected);
    }
}

Naming Convention

MethodName_Scenario_ExpectedResult

Examples:

  • CreateAsync_WithValidTitle_ReturnsTaskWithTodoStatus
  • CompleteAsync_WhenTaskAlreadyDone_ThrowsInvalidOperationException
  • GetByIdAsync_WhenNotFound_ReturnsNull

Coverage Requirements

For every service method, write tests for:

  1. Happy path — valid inputs, expected output
  2. Not found — when repository returns null
  3. Boundary / edge cases — empty string, invalid state transitions
  4. Error cases — exceptions that should be thrown

For every domain entity method, write tests for:

  1. Valid state transition — e.g., Todo → InProgress
  2. Invalid state transition — e.g., completing an already-done task throws
  3. Invariant validation — e.g., empty title throws ArgumentException

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 86 lines · 42 tokens per session scan A ffa02a696dda

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository nunosoarescsw/copilot-agentic-workshop (1 stars, last pushed 2mo ago), licensed MIT. It adds 42 tokens to every session and 638 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

test-writer

Generates xUnit test suites for .NET code. Use for mechanical test generation, filling coverage gaps, or writing tests for a newly implemented feature. Runs on Haiku for cost efficiency.

cwoodruff/dotnet-claude-workshop-content · 42 tokens

csharp-pro

Write modern C# code with advanced features like records, pattern matching, and async/await. Optimizes .NET applications, implements enterprise patterns, and ensures comprehensive testing. Use PROACTIVELY for C# refactoring, performance optimization, or complex .NET solutions.

HermeticOrmus/claude-code-game-development · 58 tokens

test-writer

Generates xUnit test suites for .NET code. Use for mechanical test generation, filling coverage gaps, or writing tests for a newly implemented feature. Runs on Haiku for cost efficiency.

cwoodruff/dotnet-claude-code-kit · 42 tokens

test-migration

Orchestrates .NET test framework and platform migrations: auto-detects the current framework and version, routes to the appropriate migration skill, and guides users through end-to-end upgrades. Use when asked to upgrade MSTest, migrate to xUnit v3, switch to Microsoft.Testing.Platform, modernize test infrastructure…

dotnet/skills · 79 tokens

test-engineer

Testing expert for .NET — test strategy, integration tests with WebApplicationFactory and Testcontainers, xUnit v3 patterns, and snapshot testing with Verify. Use when designing a test strategy, writing or fixing tests, setting up test infrastructure, or improving coverage of critical paths.

codewithmukesh/dotnet-claude-kit · 59 tokens

ruby-pro

Write idiomatic Ruby code with metaprogramming, Rails patterns, and performance optimization. Specializes in Ruby on Rails, gem development, and testing frameworks. Use PROACTIVELY for Ruby refactoring, optimization, or complex Ruby features.

NOMARJ/sigil · 52 tokens