draugr: Instructions file for Claude Code

CLAUDE.md

draugr CLAUDE.md is an instructions file for Claude Code from draugr-dev/draugr. It costs 3,078 tokens per session, scanned A, original, Apache-2.0.

A project guide for Draugr, a tool that checks applications for security and compliance requirements. It explains the code layout, design principles, and how checks produce evidence and a final pass-or-fail decision.

In plain words
What is it for?
Use it when working on Draugr, especially before opening a pull request or changing its API, controllers, scanners, result handling, or policy logic.
Why use it?
It gives coding assistants the reasoning behind the project's rules, so they can make changes without applying procedures blindly or breaking public interfaces.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is draugr-dev/draugr's own configuration. It tells Claude Code how to work on draugr 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 draugr configures →

Reuse

Borrowing it

Nothing to install: this file belongs to draugr-dev/draugr. 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/draugr-dev/draugr/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/draugr-dev/draugr

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 draugr CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/draugr-dev/draugr/claude-md"><img src="https://agentmods.dev/badge/instructions/draugr-dev/draugr/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,078 This file is loaded in full into every session.
When invoked 3,078 The same file — it is already loaded in full.
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.03078 $0.03078
Opus 5.5 $0.01231 $0.01231
Sonnet 5.5 $0.00616 $0.00616
Haiku 4.5 $0.00308 $0.00308

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

Security

Grade A, and why

draugr CLAUDE.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 11d 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.md · 228 lines

How it starts

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

Working on Draugr

Orientation for AI coding assistants, and a reasonable first read for humans too. CONTRIBUTING.md has the mechanics; this file is the why behind them, which is what keeps them from being applied mechanically.

What Draugr is

A security and compliance qualification tool. You describe your application in a declarative descriptor, the Saga, and Draugr infers which checks apply, runs them, normalizes every result to one schema, and returns a deterministic gated verdict with evidence.

The shape of a run, which is also the shape of the code:

Saga  →  controllers  →  scanners  →  SARIF  →  Norn  →  verdict + evidence
        (what applies) (run a tool) (one schema) (policy)
  • Controllers decide what to check for a component and aggregate the results.
  • Scanners run an external tool (Trivy, Semgrep, Gitleaks, Nuclei, Syft…) and normalize its output.
  • SARIF 2.1.0 is the finding currency. Everything converges on it before anything is judged.
  • The Norn applies policy, thresholds, priorities, suppressions, and produces the verdict.

Layout

pkg/ is the public API; treat changes there as breaking until proven otherwise. internal/ is implementation and can move freely.

Package What lives there
pkg/saga The descriptor: repositories, images, hosts, config, exclusions
pkg/plugin The extension SDK, Scanner, Controller, Surveyor, and shared types
pkg/sarif The finding model, plus merge and deduplication
pkg/engine Expands a Saga into scan jobs and orchestrates the run
pkg/norn Evaluates results against policy to produce a verdict
pkg/report Renders a result: console, markdown, HTML, JUnit, JSON, SARIF
internal/controllers, internal/scanners The built-in controls and the tools behind them
internal/builtins Where both get registered

A new control is a controller plus a scanner, registered in internal/builtins. Copy the shape of an existing pair, sca + trivy-fs for a repository tool, images + trivy for one that scans a named artifact.

Read the full file on GitHub · 228 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. 11d ago Changed · +1 lines · +16 tokens per session 1d5ad96e55e7
  2. 1mo ago Changed · +13 lines · +264 tokens per session 46482cfdfec8
  3. 1mo ago Changed · -9 tokens per session 5f97674280c1
  4. 1mo ago First seen · 214 lines · 2,807 tokens per session scan A 289aabe97ac7

Subscribe to this mod's changes

draugr CLAUDE.md is an instructions file published in the GitHub repository draugr-dev/draugr (8 stars, last pushed today), licensed Apache-2.0. It adds 3,078 tokens to every session, about $0.0123 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-08-31.

Related

Other instructions, from other repositories