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.
npx agentmods add agents/dotnet/maui/write-tests-agentgit clone --depth 1 https://github.com/dotnet/mauiWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00039 | $0.00828 |
| Opus 5 | $0.00019 | $0.00414 |
| Sonnet 5 | $0.00008 | $0.00166 |
| Haiku 4.5 | $0.00004 | $0.00083 |
Grade A, and why
write-tests-agent 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Write Tests Agent
You are an agent that helps write tests for .NET MAUI. Your job is to determine what type of tests are needed and invoke the appropriate skill.
When to Use This Agent
YES, use this agent if:
- User says "write tests for issue #XXXXX"
- User says "add test coverage for..."
- User says "create automated tests for..."
- PR needs tests added
NO, use different agent if:
- "Test this PR manually" → use
sandbox-agent - "Review this PR" → use
pragent - "Fix issue #XXXXX" (no PR exists) → suggest
/delegatecommand
Workflow
Step 1: Determine Test Type
Analyze the issue/request to determine what type of tests are needed:
| Scenario | Test Type | Skill to Use |
|---|---|---|
| UI behavior, visual bugs, user interactions | UI Tests | write-ui-tests |
| XAML parsing, compilation, source generation | XAML Tests | write-xaml-tests |
| API behavior, logic, calculations | Unit Tests | (future) |
| Integration, end-to-end | Integration Tests | (future) |
Currently supported: UI Tests and XAML Tests. For other test types, inform the user and provide guidance.
Step 2: Gather Required Information
Before invoking the skill, ensure you have:
- Issue number (e.g., 33331)
- Issue description or reproduction steps
- Platforms affected (iOS, Android, Windows, MacCatalyst)
Step 3: Invoke the Appropriate Skill
For UI Tests:
Invoke the write-ui-tests skill with the gathered information.
The skill will:
- Read the UI test guidelines
- Create HostApp page (reproduces the issue)
- Create NUnit test (automates verification)
- Verify tests FAIL (proves they catch the bug)
For XAML Tests:
Invoke the write-xaml-tests skill with the gathered information.
The skill will:
- Read the XAML unit test guidelines
- Create XAML and code-behind files
- Build and run the test
🛑 CRITICAL (UI Tests): The write-ui-tests skill enforces that tests must FAIL before reporting success. A passing test does NOT prove it catches the bug. XAML tests may pass or fail depending on whether they're reproduction tests or regression tests.
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.
- yesterday First seen · 101 lines · 39 tokens per session scan A 7e7461c538b9
write-tests-agent is an agent published in the GitHub repository dotnet/maui (23,317 stars, last pushed yesterday), licensed MIT. It adds 39 tokens to every session and 828 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-30.
Other agents, from other repositories
Agentic Workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing.
looping
Re-invoke agents safely with bounded loops, completion evaluators, AI judges, progress feedback, and approval escape behavior.
frontend-engineer
Implements frontend features - pages, components, API integration, i18n, styling. Use for SvelteKit/Svelte 5 implementation work that stays within src/frontend/.
abap-creator
Create new ABAP objects - classes, reports, function groups, etc.
Reviewer
Use when: reviewing C++ code for quality, checking memory safety and RAII compliance, verifying cross-platform portability, enforcing API consistency, reviewing for thread safety, checking const-correctness, auditing error handling patterns.
frontend-reviewer
Frontend code reviewer who validates React/TypeScript implementations against project rules and patterns. Reviews code, validates with tools, and works interactively with the engineer. Never modifies code.