nomos CLAUDE.md

nomos CLAUDE.md is an instructions file for coding agents from safe-agentic-world/nomos. It costs 1,705 tokens per session, scanned A, original, Apache-2.0.

Project instructions for Nomos, a Go command-line system for applying and testing safety policies and connecting through MCP.

In plain words
What is it for?
Use them when developing Nomos, running its tests, checking policy decisions, or maintaining its MCP integration.
Why use it?
They provide the project’s build, test, formatting, linting, and smoke-check commands so changes can be verified consistently.

Instructions file

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 instructions/safe-agentic-world/nomos/claude-md
Clone the repo
git clone --depth 1 https://github.com/safe-agentic-world/nomos

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/safe-agentic-world/nomos/claude-md.svg)](https://agentmods.dev/instructions/safe-agentic-world/nomos/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/safe-agentic-world/nomos/claude-md"><img src="https://agentmods.dev/badge/instructions/safe-agentic-world/nomos/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,705 This file is loaded in full into every session.
When invoked 1,705 The same file — it is already loaded in full.
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 $0.01705 $0.01705
Opus 5 $0.00852 $0.00852
Sonnet 5 $0.00341 $0.00341
Haiku 4.5 $0.00170 $0.00170

Measured 4d ago against content hash 9e7c0a233a4b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nomos 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 4d 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 · 81 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Commands

Go 1.25+. Use Makefile targets or go directly.

  • Build CLI: go build ./cmd/nomos (or make build)
  • Release build with version metadata: make release-build (sets ldflags into internal/version)
  • Full test suite: go test ./...
  • Race suite (release gate): go test -race ./...
  • Static checks: go vet ./... (aliased as make lint)
  • Format: gofmt -w . (aliased as make fmt)
  • Single package: go test ./internal/policy
  • Single test: go test ./internal/policy -run TestName
  • Focused MCP compat: go test ./internal/mcp
  • Fast iteration set: go test ./cmd/nomos ./internal/policy ./internal/service ./internal/gateway ./internal/mcp

Smoke checks using the built binary (run after make build / go build):

  • nomos doctor -c ./examples/quickstart/config.quickstart.json --format json
  • nomos policy test --action ./examples/quickstart/actions/allow-readme.json --bundle ./examples/policies/safe.yaml
  • nomos policy test --action ./examples/quickstart/actions/deny-env.json --bundle ./examples/policies/safe.yaml
  • nomos policy explain ... for deny/approval diagnostics

CLI flag precedence is flag > env > fail. Relevant env vars: NOMOS_CONFIG, NOMOS_POLICY_BUNDLE, NOMOS_LOG_LEVEL. --config/-c and --policy-bundle/-p are resolved to absolute paths at parse time.

Architecture

Nomos is an execution firewall for AI agents: an agent-agnostic control plane that sits at the execution boundary and returns ALLOW / DENY / REQUIRE_APPROVAL on normalized actions. The same pipeline backs both the MCP server and HTTP gateway surfaces — understanding that pipeline is the big picture.

Request pipeline (same shape whether the caller is MCP or HTTP):

  1. Boundary (internal/mcp or internal/gateway) accepts the request. Identity is never read from the request body — it is injected from config and verified via bearer/HMAC/OIDC. The MCP path derives action_id/trace_id from the MCP request id (mcp_<id>) to stay deterministic.
  2. Normalize (internal/normalize, internal/action) canonicalizes resources (e.g., file://workspace/..., url://host/path), rejects traversal (..), and yields a stable action fingerprint. Agent-supplied principal/environment claims are rejected.
  3. Policy evaluation (internal/policy) is deny-wins and rule order is irrelevant. Bundles load from JSON or YAML; YAML is validated strictly (duplicate-key and unknown-field rejection) and policy_bundle_hash is always computed from canonical JSON of the typed bundle so equivalent inputs stay deterministic. Matching supports glob patterns and optional identity/risk filters.
  4. Obligations: redaction patterns, output caps (output_max_bytes/output_max_lines), sandbox profile (sandbox_mode), approval scope. Sandbox selection is obligation-driven and fails closed when the configured profile is weaker than required.
  5. Approvals (internal/approval) bind to exact action fingerprints by default; class-scoped approvals require explicit approval_scope_class obligation and are limited to action_type_resource.
  6. Execute (internal/executor, internal/sandbox) runs only ALLOW decisions. repo.apply_patch is implemented as deterministic path + content replacement, not diff application. net.http_request maps normalized url:// to https://, enforces host allowlists, and denies redirects unless the matched policy sets http_redirects.
  7. Credentials (internal/credentials) are brokered as short-lived lease IDs bound to (principal, agent, environment, trace_id). Raw secrets never return to the agent; only lease IDs surface in visibility.
  8. Redact + cap (internal/redact) applies before any output leaves Nomos — to the agent, logs, and audit sinks. Per-rule caps are enforced post-redaction so policy caps cannot be bypassed by larger executor defaults.
  9. Audit + telemetry (internal/audit, internal/telemetry): action.completed is the canonical replay-level AuditEvent v1 record. Hash chaining runs over canonicalized payloads with prev_event_hash attached for cross-platform-deterministic verification. Telemetry is additive (OTLP/HTTP) — audit remains the authoritative evidence surface.

Read the full file on GitHub · 81 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. 4d ago First seen · 81 lines · 1,705 tokens per session scan A 9e7c0a233a4b

Subscribe to this mod's changes

nomos CLAUDE.md is an instructions file published in the GitHub repository safe-agentic-world/nomos (18 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 1,705 tokens to every session, about $0.0085 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.