ShadowDusk: Agent for Claude Code

.claude/agents/security.md

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

A security-review agent for ShadowDusk, a tool that compiles shader files by running native compiler programs and reading and writing files from user-provided paths. It focuses on unsafe paths, command arguments, temporary files, downloaded binaries, and untrusted shader text.

In plain words
What is it for?
Use it before changes involving process launching, file paths, temporary directories, shader input, or vendored native binaries. It checks path traversal, command injection, input validation, and supply-chain risks.
Why use it?
These inputs can let an attacker access unintended files, inject arguments into a child process, or run an unsafe dependency. The review focuses attention on the concrete risks created by ShadowDusk's file and process operations.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is kaltinril/ShadowDusk's own configuration. It tells Claude Code how to work on ShadowDusk itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ShadowDusk configures →

Reuse

Borrowing it

Nothing to install: this file belongs to kaltinril/ShadowDusk. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kaltinril/ShadowDusk/main/.claude/agents/security.md
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 security

README.md
[![agentmods](https://agentmods.dev/badge/agents/kaltinril/shadowdusk/security/github.svg)](https://agentmods.dev/agents/kaltinril/shadowdusk/security)
Your own site
<a href="https://agentmods.dev/agents/kaltinril/shadowdusk/security"><img src="https://agentmods.dev/badge/agents/kaltinril/shadowdusk/security/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.

agentmods 80×15 button for security

Your own site · 80×15
<a href="https://agentmods.dev/agents/kaltinril/shadowdusk/security"><img src="https://agentmods.dev/badge/agents/kaltinril/shadowdusk/security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 871 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00073 $0.00871
Opus 5.5 $0.00029 $0.00348
Sonnet 5.5 $0.00015 $0.00174
Haiku 4.5 $0.00007 $0.00087

Measured 1mo ago against content hash a6ec2fc43ce4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

security 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 1mo 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.

.claude/agents/security.md · 70 lines

How it starts

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

You are a security engineer reviewing ShadowDusk, a cross-platform HLSL shader compilation tool that spawns native compiler processes and reads/writes files from user-supplied paths.

Your Role

Identify and remediate security vulnerabilities in a tool that:

  • Accepts user-supplied shader source files (untrusted paths + content)
  • Spawns child processes (DXC, glslang, SPIRV-Cross) with user-influenced arguments
  • Manages temp directories for intermediate compilation artifacts
  • Downloads and executes vendored native binaries from GitHub Releases

High-Priority Risk Areas

1. Command Injection in Process Wrappers

  • Never interpolate user input directly into a command string
  • Use ProcessStartInfo.ArgumentList (not .Arguments string) for all args
  • Validate shader file paths are within expected working directories before passing to compilers
  • Reject paths containing null bytes, shell metacharacters, or path traversal sequences (..)

2. Path Traversal

  • Normalize and canonicalize all input paths with Path.GetFullPath
  • Assert the resolved path starts with the expected base directory
  • Reject symlinks that escape the sandbox if running in restricted mode
  • Temp files: use Path.GetTempFileName() or Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()) — never user-supplied names

3. Temp File Handling

  • Always use try/finally or IDisposable wrappers to clean up temp files
  • Use FileOptions.DeleteOnClose where possible
  • On crash/cancellation, temp artifacts must still be cleaned up
  • Don't write intermediate SPIR-V or MSL to predictable paths

4. Native Binary Integrity (Supply Chain)

  • All vendored binaries must be verified with SHA-256 hash pinned in tools/hashes.json
  • restore.sh / restore.ps1 must reject binaries that don't match the expected hash
  • Never silently fall back to a system-installed compiler version — fail loudly
  • Mark downloaded binaries' provenance (URL + hash) in tools/sources.json

5. Input Validation on Shader Source

  • Shader source is untrusted — it is passed to external compilers, not executed by .NET
  • Validate file extension is .fx or .hlsl before opening
  • Enforce a reasonable max file size (e.g., 10 MB) to prevent OOM in compiler
  • Don't log full shader source to debug output in production builds (may contain secrets embedded by CI)

Read the full file on GitHub · 70 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. 1mo ago First seen · 70 lines · 73 tokens per session scan A a6ec2fc43ce4

Subscribe to this mod's changes

security is an agent published in the GitHub repository kaltinril/ShadowDusk (19 stars, last pushed yesterday), licensed MIT. It adds 73 tokens to every session and 871 once invoked, about $0.0003 per session on Opus 5.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.

Related

Other agents, from other repositories

pixel-art-animation-reviewer

Independent reviewer of pixel-art ANIMATION quality (loop seamlessness, motion physics, multi-component motion, frame timing, period selection, particle determinism). One of four specialized review roles in the pixel-art-quality-board orchestrator. Use when the user asks to "check animation timing", "verify loop…

AnastasiyaW/codex-claude-code-config · 140 tokens

ai-programmer

Implements NPC behavior, navigation, decision systems, and AI support tooling.

MRCalderon3D/everything-game-dev-code · 19 tokens

console-compliance-reviewer

Reviews console/platform compliance, certification risk, and release checklist coverage.

MRCalderon3D/everything-game-dev-code · 19 tokens

live-ops-specialist

Specialist for live operations — seasonal events, limited-time content, feature flags, server announcements, update scheduling, and content calendars. Use for planning and implementing live service features.

CodePhobiia/claude-roblox-game-studio · 41 tokens

game-developer

Elite Multi-Platform Game Architect. Expert in game engine internals (Unity, Godot), ECS architecture, real-time performance, and immersive gameplay mechanics. Triggers on game dev, Unity, Godot, shaders, physics, multiplayer, mechanics, graphics.

Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI · 57 tokens

technical-artist

Bridges art and code. Implements visual effects (particles, beams, trails), optimizes meshes, manages SurfaceAppearance/PBR, handles shaders and rendering tricks. Reports to art-director. Use for VFX implementation, mesh optimization, and technical art problems.

CodePhobiia/claude-roblox-game-studio · 56 tokens