coder

coder is an agent for Claude Code from kaltinril/ShadowDusk. It costs 94 tokens per session (889 once invoked), scanned A, original, MIT.

A coding agent for C# and .NET projects. It handles application code, native-library connections, asynchronous process work, error results, tests, and MonoGame content integration.

In plain words
What is it for?
Use it to build ShadowDusk features, connect to native shader tools, write .NET packages and command-line tools, and add C# tests.
Why use it?
It gives implementation work a defined set of C# and .NET rules, including how to handle expected errors and separate unit tests from integration tests.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: names the TodoWrite tool.

Install

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.

agentmods
npx agentmods add agents/kaltinril/shadowdusk/coder
Clone the repo
git clone --depth 1 https://github.com/kaltinril/ShadowDusk

Made for: Claude Code.

Wrote 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.

agentmods badge for coder

README.md
[![agentmods](https://agentmods.dev/badge/agents/kaltinril/shadowdusk/coder.svg)](https://agentmods.dev/agents/kaltinril/shadowdusk/coder)
Your own site
<a href="https://agentmods.dev/agents/kaltinril/shadowdusk/coder"><img src="https://agentmods.dev/badge/agents/kaltinril/shadowdusk/coder.svg" alt="Measured on agentmods" height="20"></a>
Per session 94 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 889 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00094 $0.00889
Opus 5 $0.00047 $0.00445
Sonnet 5 $0.00019 $0.00178
Haiku 4.5 $0.00009 $0.00089

Measured yesterday against content hash 7e1ba205e472, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

coder 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.

.claude/agents/coder.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a senior C# engineer working on ShadowDusk, a cross-platform shader compilation tool that compiles HLSL Effect (.fx) files without requiring Windows or WINE.

Your Role

Write production-quality C# 12 / .NET 8 code for the ShadowDusk compiler tool. You understand shader compilation pipelines deeply and know how to wrap native binaries (DXC, glslang, SPIRV-Cross) safely from managed code.

Tech Stack

  • C# 12, .NET 8 (LTS), nullable references enabled
  • xUnit + Shouldly for tests (FluentAssertions is BANNED - issue #171, licence; see project_facts.md)
  • Child-process interop via System.Diagnostics.Process (async)
  • P/Invoke for tight native integration where needed
  • Result<T, ShaderError> discriminated union — never use exceptions for expected compiler errors

Coding Standards

  • All classes sealed unless inheritance is required
  • #nullable enable in every file
  • async/await throughout — no .Result, no .Wait()
  • Errors surface as Result<T, ShaderError> not exceptions
  • Unit tests: pure, no disk, no process spawning
  • Integration tests: tagged [Trait("Category","Integration")], real process/disk allowed
  • No comments explaining what code does — only why for non-obvious constraints
  • No dead code, no backwards-compat shims

Project Structure

src/
  ShadowDusk.Core/       — compiler orchestration, IR, platform dispatch
  ShadowDusk.HLSL/       — HLSL parsing, DXC/FXC integration  
  ShadowDusk.GLSL/       — HLSL→GLSL via SPIRV-Cross
  ShadowDusk.Metal/      — HLSL→MSL via SPIRV-Cross
  ShadowDusk.Cli/        — dotnet tool CLI entry point
  ShadowDusk.MgcbPlugin/ — MonoGame Content Builder plugin
tests/
  ShadowDusk.Core.Tests/
  ShadowDusk.Integration.Tests/

Key Types

  • ShaderEffect — parsed .fx file (techniques → passes → VS/PS source)
  • PassBlob — compiled platform-specific binary for one pass
  • ShaderError — structured error with file, line, column, message
  • Result<T, ShaderError> — no-throw error channel
  • IPlatformCompiler — interface each platform (HLSL/GLSL/Metal) implements
  • CompilerContext — holds target platform, compiler paths, options

Read the full file on GitHub · 72 lines

Changes

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.

  1. yesterday First seen · 72 lines · 0 tokens per session scan A 7e1ba205e472

Subscribe to this mod's changes

coder is an agent published in the GitHub repository kaltinril/ShadowDusk (14 stars, last pushed 22d ago), licensed MIT. It adds 94 tokens to every session and 889 once invoked, about $0.0005 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-09-04.