test-dotnet

test-dotnet is a command for Claude Code from solanabr/solana-ai-kit. It costs 12 tokens per session (3,641 once invoked), scanned A, original, MIT.

A test command for C# and .NET projects, including Unity games and backend services. It also describes test-driven development (TDD), where tests guide the code you write.

In plain words
What is it for?
Use it to run Unity Edit Mode and Play Mode tests, standard .NET tests, and follow a red-green-refactor TDD workflow.
Why use it?
It helps check that code behaves as expected and catches regressions while you build or clean up a project.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/solanabr/solana-ai-kit/test-dotnet
Clone the repo
git clone --depth 1 https://github.com/solanabr/solana-ai-kit

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-dotnet

README.md
[![agentmods](https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/test-dotnet.svg)](https://agentmods.dev/commands/solanabr/solana-ai-kit/test-dotnet)
Your own site
<a href="https://agentmods.dev/commands/solanabr/solana-ai-kit/test-dotnet"><img src="https://agentmods.dev/badge/commands/solanabr/solana-ai-kit/test-dotnet.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,641 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00012 $0.03641
Opus 5 $0.00006 $0.01820
Sonnet 5 $0.00002 $0.00728
Haiku 4.5 $0.00001 $0.00364

Measured 6d ago against content hash 9c51303bad18, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

test-dotnet 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 6d 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

.claude/commands/test-dotnet.md · 642 lines

How it starts

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

You are running .NET/C# tests. This command covers Unity Test Framework (Edit Mode and Play Mode) and standard .NET testing.


TDD Workflow (6 Phases)

When developing with TDD, follow these phases strictly:

Phase 1: RED - Write Failing Test

  1. Create test file in appropriate location (Tests/EditMode/ or Tests/PlayMode/)
  2. Write minimal test that fails for the right reason
  3. Run test to confirm it fails
  4. Do NOT write production code yet
[Test]
public void Calculate_WithValidInput_ReturnsExpected()
{
    var sut = new Calculator();  // Class doesn't exist yet

    var actual = sut.Calculate(10, 2);

    Assert.That(actual, Is.EqualTo(12));
}

Phase 2: GREEN - Make Test Pass

  1. Write minimal production code to pass the test
  2. Only write enough code to pass - no more
  3. Run test to confirm it passes
  4. Commit if green
public class Calculator
{
    public int Calculate(int a, int b) => a + b;  // Minimal implementation
}

Phase 3: REFACTOR - Clean Up

  1. Improve code structure without changing behavior
  2. Run tests after each refactoring step
  3. Keep tests green throughout
  4. Apply SOLID principles, remove duplication

Phase 4: Iterate

  1. Return to Phase 1 for next test case
  2. Build up functionality incrementally
  3. Each cycle: RED → GREEN → REFACTOR

Phase 5: Integration

  1. After unit tests pass, run integration tests
  2. Test component interactions
  3. For Unity: run Play Mode tests

Phase 6: Review

  1. Review test coverage
  2. Check for missing edge cases
  3. Ensure tests are maintainable
  4. Remove any redundant tests

Core Workflow: Build → Respond → Iterate

Operate in fast, surgical development cycles with minimal token usage.

Execution Flow

  1. Understand the Request: Analyze minimum code required
  2. Make the Change: Implement surgical edit
  3. Build: dotnet build --no-restore --nologo --verbosity minimal
  4. If Build Fails: Retry once if obvious fix, then STOP and ask
  5. Run Tests: dotnet test --no-build --nologo --verbosity minimal
  6. If Tests Fail: Extract failures with rg, fix if obvious, else STOP and ask

Read the full file on GitHub · 642 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. 6d ago First seen · 642 lines · 12 tokens per session scan A 9c51303bad18

Subscribe to this mod's changes

test-dotnet is a command published in the GitHub repository solanabr/solana-ai-kit (99 stars, last pushed 16d ago), licensed MIT. It adds 12 tokens to every session and 3,641 once invoked, about $0.0001 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-30.