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 commands/mathisk2095/jko-claude-plugins/dotnet-hardengit clone --depth 1 https://github.com/mathisk2095/jko-claude-pluginsWrote 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/commands/mathisk2095/jko-claude-plugins/dotnet-harden)<a href="https://agentmods.dev/commands/mathisk2095/jko-claude-plugins/dotnet-harden"><img src="https://agentmods.dev/badge/commands/mathisk2095/jko-claude-plugins/dotnet-harden.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.00033 | $0.00984 |
| Opus 5 | $0.00016 | $0.00492 |
| Sonnet 5 | $0.00007 | $0.00197 |
| Haiku 4.5 | $0.00003 | $0.00098 |
Grade A, and why
dotnet-harden 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 — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Harden the .NET backend. If $ARGUMENTS is provided, focus on that project, directory, or file. Otherwise target the main backend projects.
First: Use the dotnet-backend-expert skill and read references/anti-patterns.md, references/dependency-injection.md, references/concurrency.md, references/data-access.md, references/signalr.md, and references/kestrel-hosting.md.
Preparation
- Detect the solution, SDK, and backend entry projects.
- Determine whether the code uses minimal APIs, controllers, SignalR hubs, workers, AppHost, EF Core, Dapper, or mixed data access.
- Read the composition root before making any changes.
High-Value Scans
Run targeted scans for patterns that frequently produce production bugs:
# Sync-over-async and blocking (DN-12)
rg -n '(\.Result\b|\.Wait\(|GetAwaiter\(\)\.GetResult\()' . --glob '*.cs'
# Hidden runtime resolution / service locator (DN-04)
rg -n '(IServiceProvider|GetService\(|GetRequiredService\(|CreateScope\()' . --glob '*.cs'
# Static mutable state (DN-06)
rg -n 'static\s+(?!readonly)' . --glob '*.cs'
# DbContext misuse in endpoints, hubs, or singletons (DN-07, DN-01, DN-02)
rg -n '(DbContext|ApplicationDbContext)' . --glob '*.cs'
# Task.Run inside request/endpoint code (often DN-12 or DN-13)
rg -n 'Task\.Run\(' . --glob '*.cs'
# Fire-and-forget tasks (DN-13)
rg -n '(_\s*=\s*Task\.|Task\.Factory\.StartNew|async void)' . --glob '*.cs'
# New HttpClient instead of factory/typed client
rg -n 'new\s+HttpClient\(' . --glob '*.cs'
# Generic base abstractions and ceremony-heavy layers (DN-18, DN-10)
rg -n '(BaseService|BaseRepository|IGenericRepository|GenericRepository)' . --glob '*.cs'
# In-memory SignalR truth and fragile connection bookkeeping (DN-15)
rg -n '(ConnectionId|ConcurrentDictionary<.*connection|Dictionary<.*connection|Groups\.)' . --glob '*.cs'
# Kestrel / forwarded header posture and explicit hosting choices
rg -n '(UseForwardedHeaders|ForwardedHeaders|KnownProxies|KnownNetworks|Kestrel|ListenAnyIP|ListenLocalhost|MaximumReceiveMessageSize|KeepAliveInterval|ClientTimeoutInterval)' . --glob '*.cs'
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 · 98 lines · 33 tokens per session scan A 4653a4ce887d
dotnet-harden is a command published in the GitHub repository mathisk2095/jko-claude-plugins (3 stars, last pushed 2d ago), licensed MIT. It adds 33 tokens to every session and 984 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-31.
Other commands, from other repositories
route
Generate a Kibana server route with proper validation, error handling, and TypeScript types. Supports all HTTP methods and common patterns like CRUD operations and Elasticsearch queries.
embeddable
Generate a custom Embeddable panel that can be placed on Kibana Dashboards, with factory registration, input/output types, and React rendering.
expression
Generate custom Expression Functions and Renderers for use in Kibana Canvas, Lens, and Dashboard visualizations.
saved-object
Generate a custom Saved Object type with registration, mappings, migrations, CRUD service, and management integration for a Kibana plugin.
ui-action
Generate custom UI Actions and Triggers for inter-plugin communication in Kibana — register actions, attach to triggers, execute across plugins.
mcp-config
Generate a .mcp.json configuration file that connects Claude Code to Elasticsearch and Kibana MCP servers alongside this plugin, enabling live cluster access during plugin development.