otter-rules-engine

otter-rules-engine is a skill for Claude Code, Codex from AmadeusITGroup/otter. It costs 91 tokens per session (2,767 once invoked), scanned A, original, BSD-3-Clause.

A guide for building and debugging an Otter rules engine, which checks application conditions and runs actions when those conditions match. It covers rulesets, conditions, facts, operators, and actions.

In plain words
What is it for?
Adding rules, facts, custom condition checks, actions, or rulesets, and making components change behavior at runtime.
Why use it?
It keeps conditional application behavior consistent and helps explain why a rule did or did not run.

Skill for Claude CodeCodex

Part of the otter plugin — 11 skills, 3 agents, 3 MCP servers shipped together

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 skills/amadeusitgroup/otter/otter-rules-engine
Any agent
npx skills add AmadeusITGroup/otter --skill otter-rules-engine
Clone the repo
git clone --depth 1 https://github.com/AmadeusITGroup/otter

Made for: Claude Code, Codex.

Or install otter, the plugin that ships this one along with the rest of its 11 skills, 3 agents, 3 MCP servers.

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 otter-rules-engine

README.md
[![agentmods](https://agentmods.dev/badge/skills/amadeusitgroup/otter/otter-rules-engine.svg)](https://agentmods.dev/skills/amadeusitgroup/otter/otter-rules-engine)
Your own site
<a href="https://agentmods.dev/skills/amadeusitgroup/otter/otter-rules-engine"><img src="https://agentmods.dev/badge/skills/amadeusitgroup/otter/otter-rules-engine.svg" alt="Measured on agentmods" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,767 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 $0.00091 $0.02767
Opus 5 $0.00046 $0.01384
Sonnet 5 $0.00018 $0.00553
Haiku 4.5 $0.00009 $0.00277

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

Security

Grade A, and why

otter-rules-engine 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 5d 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.

tools/llm/plugins/otter/skills/otter-rules-engine/SKILL.md · 209 lines

How it starts

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

Otter Rules Engine

The Otter rules engine (@o3r/rules-engine) is a client-side mechanism that evaluates a sorted list of Rulesets and applies actions based on the application's runtime context. When building or editing rules-engine artifacts, follow the workflow below so facts, operators, actions, and rulesets stay consistent and correctly registered.

When to Use

  • Authoring or editing a Ruleset JSON file
  • Adding a custom fact, operator, or action
  • Making component behavior conditional at runtime (config, translation, asset, placeholder)
  • Debugging why a rule does not trigger

Concept Map

Concept What it is How to create
Ruleset Sorted list of rules; may be gated by validityRange / linkedComponents Hand-authored/generated JSON validated by the ruleset schema
Rule Tree of IF_ELSE blocks (branches) ending in ACTION blocks (leaves), identified by a unique id Inside the Ruleset JSON
Operator Pure function evaluating a condition (up to two operands) ng g @o3r/rules-engine:operator
Fact A stream of business values (value$) that triggers re-evaluation ng g @o3r/rules-engine:facts-service
Action Side effect applied at runtime, identified by a unique actionType Built-in, or a custom RulesEngineActionHandler

Prerequisites

Requires an Otter-based app with @o3r/rules-engine installed (ng add @o3r/rules-engine) and the runner registered via provideRulesEngineRunner() (see below). To enable rules-engine on an existing Otter component, run the schematic rather than wiring it by hand:

ng g @o3r/rules-engine:rules-engine-to-component --path=<path-to-component-class.ts>

Decision: What Do You Need to Create?

What is missing to express the rule?
├── A business value the condition depends on → create a FACT
├── A comparison the built-in operators don't cover → create an OPERATOR
├── A runtime effect not covered by built-ins → create an ACTION handler
└── Only the logic itself → edit the RULESET JSON only

Read the full file on GitHub · 209 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. 5d ago First seen · 209 lines · 91 tokens per session scan A 8de1e8b5dd04

Subscribe to this mod's changes

otter-rules-engine is a skill published in the GitHub repository AmadeusITGroup/otter (57 stars, last pushed today), licensed BSD-3-Clause. It adds 91 tokens to every session and 2,767 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-08-30.

Related

Other skills, from other repositories

integrated-browser

Use this when working on the VS Code integrated browser ("browserView") to understand its architecture and mental model. Covers the embedded Chromium browser, its editor tab, navigation, overlay/layout, sessions, and agent browser tools under src/vs/platform/browserView and src/vs/workbench/contrib/browserView.

microsoft/vscode · 68 tokens

policy-and-managed-settings

Use whenever adding, modifying, or reviewing any Copilot, agent, LLM, AI, tool, permission, sandbox, MCP, model, telemetry, feature-gate, setting, configuration, or enterprise control—especially anything an organization or administrator may need to manage. Start here to decide whether it belongs in runtime managed…

microsoft/vscode · 112 tokens

adev-writing-guide

Comprehensive writing guide for Angular documentation (adev). Covers Google Technical Writing standards, Angular-specific markdown extensions, code blocks, and components. You MUST use this skill any time you plan to create, edit, or review documentation files in adev/ or adev/src/content.

angular/angular · 60 tokens

reference-signal-forms

Explains the mental model and architecture of the code under packages/forms/signals. You MUST use this skill any time you plan to work with code in packages/forms/signals.

angular/angular · 43 tokens

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, services, or HTTP communication, or for best practices on reactivity (signals, linkedSignal, resource, httpResource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component…

angular/angular · 77 tokens

reference-compiler-cli

Explains the mental model and architecture of the code under packages/compiler-cli. You MUST use this skill any time you plan to work with code in packages/compiler-cli.

angular/angular · 40 tokens