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 instructions/joslat/maf-doctor/maf-testinggit clone --depth 1 https://github.com/joslat/maf-doctorWrote 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.
[](https://agentmods.dev/instructions/joslat/maf-doctor/maf-testing)<a href="https://agentmods.dev/instructions/joslat/maf-doctor/maf-testing"><img src="https://agentmods.dev/badge/instructions/joslat/maf-doctor/maf-testing.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01584 | $0.01584 |
| Opus 5 | $0.00792 | $0.00792 |
| Sonnet 5 | $0.00317 | $0.00317 |
| Haiku 4.5 | $0.00158 | $0.00158 |
Grade A, and why
maf-doctor maf-testing.instructions.md 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MAF Testing — Hermetic Patterns
When you write tests for MAF code in this repo, follow these patterns. They exist because we've been bitten by their absence — every entry has a "why" behind it.
Hard rules
- No live LLM calls in tests. Ever. Cost is one reason; flakiness, throttling, and "the prompt drifted in production but tests still passed" are the bigger ones.
- AAA structure with explicit comment markers:
// Arrange,// Act,// Assert. Three blocks, separated by a blank line. A test that needs more than 3 blocks is doing too much. - One assertion subject per test. Multiple
Assert.X(...)calls is fine when they describe one fact (e.g., "this finding has the right ID and the right line"). - Test name follows
Method_Scenario_Outcome. Example:ParseGitDiffOutput_IgnoresBinAndObjPaths_FiltersThem. - Hermetic > integration. Prefer in-memory string sources over temp dirs. Prefer temp dirs over real network. Real network needs explicit justification.
- No
Thread.Sleep, no wall-clock dependencies, no GUIDs in assertions. Each is a known source of CI flake.
The ScriptedChatClient pattern (THE canonical mock)
For any test that needs an IChatClient, never instantiate AzureOpenAIClient.AsChatClient(...). Use a scripted mock — same shape as the scaffolder generates:
private sealed class ScriptedChatClient : IChatClient
{
private readonly string _response;
public ScriptedChatClient(string response) => _response = response;
public Task<ChatResponse> GetResponseAsync(
IEnumerable<ChatMessage> messages,
ChatOptions? options = null,
CancellationToken cancellationToken = default)
=> Task.FromResult(new ChatResponse(new ChatMessage(ChatRole.Assistant, _response)));
public async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
IEnumerable<ChatMessage> messages,
ChatOptions? options = null,
[EnumeratorCancellation] CancellationToken cancellationToken = default)
{
yield return new ChatResponseUpdate(ChatRole.Assistant, _response);
await Task.CompletedTask;
}
public object? GetService(Type serviceType, object? serviceKey = null) => null;
public void Dispose() { }
}
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.
- 5d ago First seen · 138 lines · 1,584 tokens per session scan A b85b502a6dfc
maf-doctor maf-testing.instructions.md is an instructions file published in the GitHub repository joslat/maf-doctor (14 stars, last pushed 18d ago), licensed MIT. It adds 1,584 tokens to every session, about $0.0079 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 instructions, from other repositories
AgentEval copilot-instructions.md
Copilot instructions for AgentEvalHQ/AgentEval, covering agenteval - ai coding agent instructions, architecture overview, environment setup, optional: secondary models for comparison and build & test commands.
AgentEval tracing.instructions.md
Guidelines for implementing trace recording and replay.
zhin zhin-plugin.instructions.md
Instructions for zhinjs/zhin, covering zhin plugin runtime authoring, package contract, convention directories, imports and native typescript and command routes.
dotnet-skills copilot-instructions.md
Copilot instructions for managedcode/dotnet-skills: Use AGENTS.md as the repository-wide source of truth for workflow, catalog structure, release policy, and skill maintenance rules.
api2mcp4j CLAUDE.md
Claude Code instructions for TheEterna/api2mcp4j, covering claude.md, 项目概述, 顶层授权框架(必读), 开发心法与规范导航 and 通用心法(docs/rules/global/,所有会话默认生效).
agent-skills AGENTS.md
AGENTS.md instructions for tech-leads-club/agent-skills, covering agents.md, workflow orchestration, 1. plan mode default, 2. subagent strategy and 3. verification before done.