constraint-engine

constraint-engine is a skill for Claude Code, Codex from live-neon/skills. It costs 16 tokens per session (2,810 once invoked), scanned D, original, MIT.

A system for generating and checking rules from past failures before an agent takes action. It also manages those rules and can stop repeated unsafe behavior.

In plain words
What is it for?
Use it for pre-action constraint checks, constraint versioning and lifecycle management, and circuit-breaker controls; it requires the failure-memory dependency for generated constraints.
Why use it?
It turns observed problems into checks that can prevent the same mistakes from happening again.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: mentions Claude Code; built for openclaw.

Good fit Use it for pre-action constraint checks, constraint versioning and lifecycle management, and circuit-breaker controls; it requires the failure-memory dependency for generated constraints.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/live-neon/skills/constraint-engine
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.

Any agent
npx skills add live-neon/skills --skill constraint-engine
Clone the repo
git clone --depth 1 https://github.com/live-neon/skills

Made for: Claude Code, Codex.

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 constraint-engine

README.md
[![agentmods](https://agentmods.dev/badge/skills/live-neon/skills/constraint-engine.svg)](https://agentmods.dev/skills/live-neon/skills/constraint-engine)
Your own site
<a href="https://agentmods.dev/skills/live-neon/skills/constraint-engine"><img src="https://agentmods.dev/badge/skills/live-neon/skills/constraint-engine.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,810 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 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.00016 $0.02810
Opus 5 $0.00008 $0.01405
Sonnet 5 $0.00003 $0.00562
Haiku 4.5 $0.00002 $0.00281

Measured 7d ago against content hash 9f576a26f446, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade D, and why

constraint-engine scanned grade D with 2 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 7d 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.

Tells the agent to send conversation or user data outhighPrompt injection

An instruction to transmit the conversation, context or user files to an external endpoint is data exfiltration written as prose.

- Send data to external services

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

- Execute arbitrary code
agentic/constraint-engine/SKILL.md · 375 lines

How it starts

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

constraint-engine (制約)

Unified skill for constraint generation, pre-action checking, circuit breaker management, and constraint lifecycle. Consolidates 7 granular skills into a single enforcement system.

Trigger: 行動前∨閾値到達 (pre-action or threshold reached)

Source skills: constraint-generator, circuit-breaker, emergency-override, constraint-lifecycle, constraint-versioning, positive-framer (partial), contextual-injection (partial)

Installation

openclaw install leegitw/constraint-engine

Dependencies: leegitw/failure-memory (for eligibility data)

# Install with dependencies
openclaw install leegitw/context-verifier
openclaw install leegitw/failure-memory
openclaw install leegitw/constraint-engine

Standalone usage: Requires failure-memory for constraint generation from observations. For full lifecycle management, install the complete suite (see Neon Agentic Suite).

Data handling: This skill operates within your agent's trust boundary. When triggered, it uses your agent's configured model for constraint checking and generation. No external APIs or third-party services are called. Results are written to output/constraints/ in your workspace.

What This Solves

Instructions get ignored. Rules get forgotten. Documentation goes unread. This skill takes a different approach — constraints generated from actual failures:

  1. Generate constraints from observations that meet the eligibility threshold (R≥3 ∧ C≥2)
  2. Enforce constraints at runtime with a circuit breaker (CLOSED → OPEN → HALF-OPEN)
  3. Manage lifecycle from proposal through adoption to retirement

The insight: A constraint born from "this actually broke" carries more weight than "this might break." Consequences teach better than instructions.

Usage

/ce <sub-command> [arguments]

Sub-Commands

Command CJK Logic Trigger
/ce check 検査 action→constraints[]→pass∨block Next Steps (auto)
/ce generate 生成 eligible(obs)→constraint Next Steps (auto)
/ce status 状態 active[], circuit∈{CLOSED,OPEN,HALF} Explicit
/ce override 上書 constraint→bypass(temp), audit.log++ Explicit
/ce lifecycle 周期 state∈{draft→active→retiring→retired} Explicit
/ce version 版本 constraint→v++, history.preserve Explicit
/ce threshold 閾値 user∨context→custom_threshold Explicit

Read the full file on GitHub · 375 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. 7d ago First seen · 375 lines · 16 tokens per session scan D 9f576a26f446

Subscribe to this mod's changes

constraint-engine is a skill published in the GitHub repository live-neon/skills (2 stars, last pushed 3mo ago), licensed MIT. It adds 16 tokens to every session and 2,810 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 2 findings (tells the agent to send conversation or user data out, unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories