self-regulation-brake-system

self-regulation-brake-system is a skill for Claude Code, Codex from ChrisLamDev/hermes-core-skills. It costs 26 tokens per session (1,649 once invoked), scanned A, original, MIT.

A brake system that counts repeated failures for named actions and stops retrying after a configured limit, which defaults to three failures.

In plain words
What is it for?
Use it to track failures across sessions, stop repeated retries, reset an action after success, and show the brake status when a session starts.
Why use it?
It prevents an agent from wasting time and tokens repeating the same unsuccessful action, such as a failed login or browser attempt.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions Codex.

Good fit Use it to track failures across sessions, stop repeated retries, reset an action after success, and show the brake status when a session starts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chrislamdev/hermes-core-skills/self-regulation-brake-system
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 ChrisLamDev/hermes-core-skills --skill self-regulation-brake-system
Clone the repo
git clone --depth 1 https://github.com/ChrisLamDev/hermes-core-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 self-regulation-brake-system

README.md
[![agentmods](https://agentmods.dev/badge/skills/chrislamdev/hermes-core-skills/self-regulation-brake-system/github.svg)](https://agentmods.dev/skills/chrislamdev/hermes-core-skills/self-regulation-brake-system)
Your own site
<a href="https://agentmods.dev/skills/chrislamdev/hermes-core-skills/self-regulation-brake-system"><img src="https://agentmods.dev/badge/skills/chrislamdev/hermes-core-skills/self-regulation-brake-system/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 self-regulation-brake-system

Your own site · 80×15
<a href="https://agentmods.dev/skills/chrislamdev/hermes-core-skills/self-regulation-brake-system"><img src="https://agentmods.dev/badge/skills/chrislamdev/hermes-core-skills/self-regulation-brake-system.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,649 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00026 $0.01649
Opus 5 $0.00013 $0.00825
Sonnet 5 $0.00005 $0.00330
Haiku 4.5 $0.00003 $0.00165

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

Security

Grade A, and why

self-regulation-brake-system scanned grade A with 1 finding 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 10d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **terminal 做到嘅**(開app、build、git、curl、cp/mv、改 code、compile)→ 用 terminal
skills/self-regulation-brake-system/SKILL.md · 162 lines

How it starts

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

Self-Regulation Brake System

Problem

Agent can burn thousands of tokens repeating the same failed action (GitHub login, OAuth, browser loops). The user only discovers this when they see the bill.

Solution: brake.sh

A lightweight shell script at ~/.hermes/scripts/brake.sh that:

  • Tracks failure count per action name across sessions
  • Exits with code 2 when limit (default: 3) is exceeded
  • Resets on success

Integration Points

0. System-Level Injection(最強保證 — config.yaml prefill_messages_file)

Brake rules 已寫入 system instructions file,透過 config.yaml 嘅 prefill_messages_file 注入:

  • System instructions file: ~/.hermes/system-instructions/self-regulation.md
  • 呢個 file 每次新 session 開波會自動 inject 做 system instruction
  • 因為係 config-level injection,Agent 無法跳過或忽略

1. session-start.sh hook

Already updated. Every new session shows brake status:

=== 🧠 SELF-REGULATION CONTEXT ===
⚠️  BRAKE SYSTEM IS ACTIVE

2. Agent memory

Injected as self-regulation rules. Ensures the agent knows about brakes even after context compaction.

3. Manual usage (agent self-enforces)

Whenever the agent encounters a failing loop:

# Before retrying, check if brake is triggered
bash ~/.hermes/scripts/brake.sh check "github-login-by-browser"
# exit 0 = safe, count = N
# exit 2 = STOP, ask user

# After a failure
bash ~/.hermes/scripts/brake.sh record "github-login-by-browser"

# After success
bash ~/.hermes/scripts/brake.sh reset "github-login-by-browser"

Brake Trigger Rules(hard-coded in memory,亦注入 system instructions)

Condition Action
Same action fails ≥3 times STOP → clarify user(用 clarify tool,唔好自己估)
5 min of no progress STOP → clarify user
Third-party auth (GitHub/Google/OAuth) First failure → STOP, don't retry
Complex multi-step auth Delegate to subagent first
卡住咗唔出聲 違反 HARD RULE 2 — 失敗咗必須即刻報告,唔可以靜雞雞轉彎

🚩 CUA-Specific Auto-Stop Rules(2026-06-17 確立)

Terminal First 原則

Read the full file on GitHub · 162 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. 10d ago First seen · 162 lines · 26 tokens per session scan A 9d0259f2decc

Subscribe to this mod's changes

self-regulation-brake-system is a skill published in the GitHub repository ChrisLamDev/hermes-core-skills (9 stars, last pushed 2mo ago), licensed MIT. It adds 26 tokens to every session and 1,649 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

unicli-repair

Evidence-driven repair workflow for a broken Uni-CLI adapter. Trigger on a failed unicli envelope, a quarantined adapter, or an explicit adapter-repair request. Classifies non-source failures, edits only the reported adapter path, and uses the original command as a bounded oracle.

olo-dot-io/Uni-CLI · 68 tokens

dead-code-detector

Detect unused/unreachable code in polyglot codebases (Python, TypeScript, Rust). TRIGGERS - dead code, unused functions, unused imports.

terrylica/cc-skills · 37 tokens

multi-agent-performance-profiling

Multi-agent performance profiling for pipeline bottlenecks. TRIGGERS - performance profiling, bottleneck analysis, pipeline optimization.

terrylica/cc-skills · 32 tokens

bgclick-rev

Reverse-engineer a macOS GUI automation app's background-click path and produce a Swift reproduction. Use only when the user provides a target .app and explicitly asks for IDA-backed background-click reverse engineering. Requires IDA Pro with IDA MCP attached.

olo-dot-io/Uni-CLI · 56 tokens

python-memory-safe-scripts

Memory-safe Python script patterns for long-running processes under systemd MemoryMax constraints. Covers allocator purge (mimalloc/glibc malloctrim), HTTP response lifecycle, DataFrame cleanup, thread-local connection reuse, and periodic GC cadence. Battle-tested through 5 OOM optimization cycles on production GPU…

terrylica/cc-skills · 197 tokens

tick-collection-ops

Operate and troubleshoot the MT5 tick collection system. HOST MOVED 2026-08-07 - MT5 now runs on the FXView VPS (Windows scheduled tasks, C:\odb-tickrings), NOT gpu-host-1/Linux-Wine/systemd. EA, ring format and gap-detection reasoning unchanged. Covers gap detection, restart recovery, daily ops.

terrylica/cc-skills · 80 tokens