trustabl-rules CLAUDE.md

Repository instructions for Trustabl detection rules, explaining the separation between rule files and the engine that loads and tests them.

In plain words
What is it for?
Guiding edits to Trustabl rule packs and explaining where schemas, predicates, fixtures, and Go tests belong.
Why use it?
They prevent rule changes from being validated in the wrong repository or leaving the engine's test fixtures out of sync.

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/trustabl/trustabl-rules/claude-md
Clone the repo
git clone --depth 1 https://github.com/trustabl/trustabl-rules
Per session 2,479 This file is loaded in full into every session.
When invoked 2,479 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.02479 $0.02479
Opus 5 $0.01239 $0.01239
Sonnet 5 $0.00496 $0.00496
Haiku 4.5 $0.00248 $0.00248

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

Security

Grade A, and why

trustabl-rules 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 3d 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 · 189 lines

How it starts

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

Instructions for Claude — Trustabl detection rules

These instructions apply to any work on the detection rule packs in this repository. The packs here are pulled by the Trustabl engine at scan time; the rule schema and predicate implementations, plus the per-rule test harness, live in that engine repository. Links below labeled "engine repo" point there.

Engine/rules split — read this first

  • Rules (the .yaml packs) live here.
  • Schema, predicates, evaluator, loader, and the per-rule fire/silent test table live in the engine repo under internal/rules/.
  • The engine validates rules against its own copy of these packs at testdata/rules-fixture/ (the test fixture). Until the test harness is pointed directly at this repository, a rule change here must be mirrored into the engine's testdata/rules-fixture/ with its fire/silent test cases, or the engine's TestPolicyRules_AllRulesCovered guard will not cover it.
  • There is no go test to run in this repo — it has no Go. Validation runs in the engine repo (go test ./...).

Required reading order before editing

  1. Schema reference (engine repo): internal/rules/schema.yaml — authoritative field reference.
  2. README.md — conventions in this repo.
  3. The closest existing rule to what's being asked for — pattern example.

Do not skip step 1.

Hard rules

  • Never invent YAML keys. The schema is closed (KnownFields(true)). If a field you want does not exist in the engine's internal/rules/schema.go, extending the schema is a four-file change in the engine repo (schema.go + predicates.go + evaluator.go + schema.yaml), gated by a manifest.yaml schema_version bump here. Make the engine changes in one commit.
  • Never change a rule's id after it has shipped. IDs are external identifiers; downstream consumers cite them, and the engine folds the resolved pack into the scan ScanID.
  • Never duplicate a rule ID across files. The loader rejects this at startup.
  • Never widen applies_to across SDKs casually. A rule's explanation / fix text is usually SDK-specific. Adding openai_tool to a Claude-SDK rule (or vice versa) makes the user-facing text lie. If a cross-SDK pattern is genuinely needed, author a separate rule under that SDK's category (<sdk>_sdk/<topic>.yaml) with framing that matches the target SDK.
  • Never write rules at info severity. Reserved.

Read the full file on GitHub · 189 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. 3d ago First seen · 189 lines · 2,479 tokens per session scan A 6f1e5199c740

Subscribe to this mod's changes

trustabl-rules CLAUDE.md is an instructions file published in the GitHub repository trustabl/trustabl-rules (24 stars, last pushed 7d ago), licensed Apache-2.0. It adds 2,479 tokens to every session, about $0.0124 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.