Borrowing it
Nothing to install: this file belongs to joslat/maf-doctor. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/joslat/maf-doctor/main/.github/instructions/maf-deployment.instructions.mdgit 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-deployment)<a href="https://agentmods.dev/instructions/joslat/maf-doctor/maf-deployment"><img src="https://agentmods.dev/badge/instructions/joslat/maf-doctor/maf-deployment/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/joslat/maf-doctor/maf-deployment"><img src="https://agentmods.dev/badge/instructions/joslat/maf-doctor/maf-deployment.svg" alt="Reviewed on agentmods" width="80" 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.01884 | $0.01884 |
| Opus 5 | $0.00942 | $0.00942 |
| Sonnet 5 | $0.00377 | $0.00377 |
| Haiku 4.5 | $0.00188 | $0.00188 |
Grade A, and why
maf-doctor maf-deployment.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 9d 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 — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MAF Production Deployment — Patterns That Hold Up
This file is loaded when you edit a file that wires MAF into a host process (Program.cs, DI registration, infrastructure). The rules below are the ones we've learned the hard way — every one has a production incident behind it.
Identity — the rule that catches half of all incidents
// ❌ NEVER in production
services.AddSingleton<TokenCredential>(_ => new DefaultAzureCredential());
// ✅ Production
services.AddSingleton<TokenCredential>(_ => new ManagedIdentityCredential());
Why: DefaultAzureCredential walks a chain of credential providers (env vars, CLI, VS, IDE, MSI). In dev that's convenient. In prod it's a footgun: a dev's stale AZURE_* env var leaking into the container, an unintended az login token surviving in the build image, and silent fallback when MSI isn't available all produce subtle, hard-to-trace auth failures. The Roslyn analyzer MAF002 fires on any new DefaultAzureCredential() outside test code — keep it pinned to "warning" or escalate to "error" in CI.
When you NEED a fallback chain (e.g., for a tool that runs both locally and in the cloud), build the chain explicitly with ChainedTokenCredential — never rely on DefaultAzureCredential's implicit chain.
Cost — every chat-completion call needs a ceiling
// ❌ Unbounded — production cost incident waiting to happen
_agent = new ChatClientAgent(client, new ChatClientAgentOptions
{
ChatOptions = new ChatOptions { Instructions = "..." }
});
// ✅ Always cap MaxOutputTokens
_agent = new ChatClientAgent(client, new ChatClientAgentOptions
{
ChatOptions = new ChatOptions
{
MaxOutputTokens = 1024, // hard ceiling — adjust per agent intent
Instructions = "..."
}
});
Why: A misbehaving prompt or an injection-induced "summarize this 30-page doc again" can blow through token budget in seconds. The MafEstimateCost tool surfaces every unbounded site; MafDoctor weights them into the grade. Default cap recommendation: 1024 for chat agents, 4096 for summarization agents, 8192+ ONLY for explicitly-scoped batch jobs.
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.
- 9d ago First seen · 167 lines · 1,884 tokens per session scan A 5084d00627b7
maf-doctor maf-deployment.instructions.md is an instructions file published in the GitHub repository joslat/maf-doctor (14 stars, last pushed 22d ago), licensed MIT. It adds 1,884 tokens to every session, about $0.0094 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
plan-forge dapr.instructions.md
Dapr patterns for .NET — building blocks, component config, sidecar architecture, multi-tenant isolation, workflows, state management, secrets.
plan-forge landing-zone.instructions.md
Azure Landing Zone baselines — identity, network, policy, management, security, tagging, subscription organization.
plan-forge policy.instructions.md
Azure Policy and Initiative compliance — definitions, assignment, compliance state, exemptions, remediation tasks.
plan-forge azd.instructions.md
Azure Developer CLI (azd) patterns — azure.yaml structure, infra folder, tags, hooks, pipelines.
plan-forge bicep.instructions.md
Bicep IaC patterns — file structure, naming, modules, parameters, outputs, linter, security.
plan-forge caf.instructions.md
Azure Cloud Adoption Framework (CAF) governance — management groups, naming, tagging, subscriptions, cost management, identity governance.