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/managedcode/dotnet-skills/safetygit clone --depth 1 https://github.com/managedcode/dotnet-skillsWhat 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.00014 | $0.01596 |
| Opus 5 | $0.00007 | $0.00798 |
| Sonnet 5 | $0.00003 | $0.00319 |
| Haiku 4.5 | $0.00001 | $0.00160 |
Grade A, and why
safety 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 — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Safety
Building secure AI agents is a shared responsibility between Agent Framework and application developers. Agent Framework provides the building blocks — abstractions, providers, and orchestration — but developers are responsible for validating inputs, securing data flows, and configuring tools appropriately for their scenario.
This article outlines best practices for building safe and secure agents with Agent Framework.
[!TIP] For deterministic, label-based defense against prompt injection and data exfiltration, see Agent Security with FIDES. FIDES complements the heuristic best-practices on this page with information-flow control middleware that enforces policies before sensitive tools run.
Understand trust boundaries
Data flows through several components when an agent runs: user input, chat history providers, context providers, the LLM service, and function tools. Each boundary where data enters or exits your application represents a potential attack surface.
Key trust boundaries to consider:
- AI service — Receives chat messages (which may include PII and system instructions) and returns LLM-generated output.
- Chat history storage — Providers may load and persist conversation messages via external storage.
- Context services — Context providers may retrieve or store data from external services (memories, user profiles, RAG results).
- Tool-accessed services — Function tools execute developer-supplied code that may call external APIs or databases.
All external service communication is handled by developer-chosen client SDKs. Agent Framework does not manage authentication, encryption, or connection details for these services.
Best practices
Validate function inputs
The AI can call any function you provide as a tool and choose the arguments. Treat LLM-provided arguments as untrusted input, similar to user input in a web API.
- Use allow-listing — Validate inputs against known-good values rather than trying to filter known-bad patterns. For example, check that a file path is within an allowed directory rather than checking for
..traversal sequences. - Enforce type and range constraints — Verify that arguments are of the expected type and within acceptable ranges (numeric bounds, string length limits, date ranges).
- Limit string lengths — Enforce maximum lengths on string arguments to prevent resource exhaustion or injection attacks.
- Prevent path traversal — When functions accept file paths, resolve them to absolute paths and verify they fall within allowed directories.
- Use parameterized queries — If arguments are used in SQL queries, shell commands, or other interpreted contexts, use parameterized queries or escaping — never string concatenation.
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 · 120 lines · 14 tokens per session scan A 2a0e3dd8f937
safety is an agent published in the GitHub repository managedcode/dotnet-skills (477 stars, last pushed 2d ago), licensed MIT. It adds 14 tokens to every session and 1,596 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.
Other agents, from other repositories
observability
Prometheus-metrikker, OpenTelemetry-tracing, Grafana-dashboards og varsling.
research-agent
Utforsker kodebaser, undersøker problemer og samler kontekst før implementering.
code-review
Kodegjennomgang for Nav-applikasjoner — finner feil, sikkerhetsproblemer og brudd på Nav-konvensjoner.
rust-agent
Idiomatisk Rust-utvikling med cargo, clippy, error handling, async/tokio, unsafe og testing.
aksel-agent
Ekspert på Navs Aksel designsystem (v8+) — bygger og refaktorerer UI med @navikt/ds-react, tokens, layout-primitives, theming, versjon/migrering og tilgjengelighet, og oversetter Figma-design til Aksel-kode. Drevet av aksel-builder-skillen og Aksel MCP som fasit.
MAF Migration Agent
Use when migrating a .NET codebase to Microsoft Agent Framework (MAF) 1.3.0. Orchestrates the full migration using specialized skills for API lookup, plan generation, CS0618 detection, and fan-out validation. Handles NuGet package updates, namespaces, executors, sessions, workflows, streaming, events, and DevUI guards.