Agent skill

Safety Interlocks

by benchflow-ai in benchflow-ai/skillsbench

Implement safety interlocks and protective mechanisms to prevent equipment damage and ensure safe control system operation.

Apache-2.0Auto-check passed

Install Safety Interlocks

skills CLI
$ npx skills add benchflow-ai/skillsbench --skill safety-interlocks -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install benchflow-ai/skillsbench safety-interlocks --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tasks/hvac-control/environment/skills/safety-interlocks .claude/skills/safety-interlocks && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
safety-interlocks
GitHub stars
1.8k
Token cost
~1k tokens
SKILL.md length
165 words
Files
1
Skills in repo
178
Repo updated
First seen
Licence
Apache-2.0

At a glance

Implement safety interlocks and protective mechanisms to prevent equipment damage and ensure safe control system operation.

  • Works in 3 steps: Verify sensor reading is reasonable → Check initial conditions → Confirm safety limits are configured
  • SKILL.md covers Overview, Implementation Pattern, Integration with Control Loop and Safety During Open-Loop Testing, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Safety Interlocks is an agent skill from benchflow-ai/skillsbench. Implement safety interlocks and protective mechanisms to prevent equipment damage and ensure safe control system operation.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: SkillsBench evaluates how well skills work and how effective agents are at using them. The licence is Apache-2.0.

Example prompts

  • “/safety-interlocks”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Verify sensor reading is reasonable
  2. Check initial conditions
  3. Confirm safety limits are configured

What it can do on your machine

Read from SKILL.md and the folder at commit 9a1f4dd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Safety Interlocks loads about 1k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 165 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from benchflow-ai/skillsbench at commit 9a1f4dd, republished under its Apache-2.0 licence (© benchflow-ai). 165 words, ~1,029 tokens.

Download SKILL.mdSave it as .claude/skills/safety-interlocks/SKILL.md (or your agent's skills folder).
name
safety-interlocks
description
Implement safety interlocks and protective mechanisms to prevent equipment damage and ensure safe control system operation.

Safety Interlocks for Control Systems

Overview

Safety interlocks are protective mechanisms that prevent equipment damage and ensure safe operation. In control systems, the primary risks are output saturation and exceeding safe operating limits.

Implementation Pattern

Always check safety conditions BEFORE applying control outputs:

python
def apply_safety_limits(measurement, command, max_limit, min_limit, max_output, min_output):
    """
    Apply safety checks and return safe command.

    Args:
        measurement: Current sensor reading
        command: Requested control output
        max_limit: Maximum safe measurement value
        min_limit: Minimum safe measurement value
        max_output: Maximum output command
        min_output: Minimum output command

    Returns:
        tuple: (safe_command, safety_triggered)
    """
    safety_triggered = False

    # Check for over-limit - HIGHEST PRIORITY
    if measurement >= max_limit:
        command = min_output  # Emergency cutoff
        safety_triggered = True

    # Clamp output to valid range
    command = max(min_output, min(max_output, command))

    return command, safety_triggered

Integration with Control Loop

python
class SafeController:
    def __init__(self, controller, max_limit, min_output=0.0, max_output=100.0):
        self.controller = controller
        self.max_limit = max_limit
        self.min_output = min_output
        self.max_output = max_output
        self.safety_events = []

    def compute(self, measurement, dt):
        """Compute safe control output."""
        # Check safety FIRST
        if measurement >= self.max_limit:
            self.safety_events.append({
                "measurement": measurement,
                "action": "emergency_cutoff"
            })
            return self.min_output

        # Normal control
        output = self.controller.compute(measurement, dt)

        # Clamp to valid range
        return max(self.min_output, min(self.max_output, output))

Safety During Open-Loop Testing

During calibration/excitation, safety is especially important because there's no feedback control:

python
def run_test_with_safety(system, input_value, duration, dt, max_limit):
    """Run open-loop test while monitoring safety limits."""
    data = []
    current_input = input_value

    for step in range(int(duration / dt)):
        result = system.step(current_input)
        data.append(result)

        # Safety check
        if result["output"] >= max_limit:
            current_input = 0.0  # Cut input

    return data

Logging Safety Events

Always log safety events for analysis:

python
safety_log = {
    "limit": max_limit,
    "events": []
}

if measurement >= max_limit:
    safety_log["events"].append({
        "time": current_time,
        "measurement": measurement,
        "command_before": command,
        "command_after": 0.0,
        "event_type": "limit_exceeded"
    })

Pre-Control Checklist

Before starting any control operation:

  1. Verify sensor reading is reasonable

    • Not NaN or infinite
    • Within physical bounds
  2. Check initial conditions

    • Measurement should be at expected starting point
    • Output should start at safe value
  3. Confirm safety limits are configured

    • Maximum limit threshold set
    • Output clamping enabled
python
def pre_control_checks(measurement, config):
    """Run pre-control safety verification."""
    assert not np.isnan(measurement), "Measurement is NaN"
    assert config.get("max_limit") is not None, "Safety limit not configured"
    return True

Best Practices

  1. Defense in depth: Multiple layers of protection
  2. Fail safe: When in doubt, reduce output
  3. Log everything: Record all safety events
  4. Never bypass: Safety code should not be conditionally disabled
  5. Test safety: Verify interlocks work before normal operation

© benchflow-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in tasks/hvac-control/environment/skills/safety-interlocks of benchflow-ai/skillsbench.

Open the folder on GitHubat commit 9a1f4dd

Compare with similar skills

Safety Interlocks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Safety Interlocks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Safety Interlocks this skillbenchflow-ai/skillsbench1.8k—~1kAutomated safety check: PassApache-2.0
Implementing Memory Protection With Dep Aslrmukul975/Anthropic-Cybersecurity-Skills34k—~1kAutomated safety check: PassApache-2.0
Implementing Cloud Dlp For Data Protectionmukul975/Anthropic-Cybersecurity-Skills34k—~4.2kAutomated safety check: PassApache-2.0
Implementing API Threat Protection With Apigeemukul975/Anthropic-Cybersecurity-Skills34k—~2.8kAutomated safety check: PassApache-2.0
Implementing Cloud Workload Protectionmukul975/Anthropic-Cybersecurity-Skills34k—~578Automated safety check: PassApache-2.0
Implementing Mimecast Targeted Attack Protectionmukul975/Anthropic-Cybersecurity-Skills34k—~1.8kAutomated safety check: PassApache-2.0

Similar skills

  • Implementing Memory Protection With Dep Aslr

    mukul975/Anthropic-Cybersecurity-Skills

    Implements memory protection mechanisms including DEP (Data Execution Prevention), ASLR (Address Space Layout Randomization), CFG (Control Flow Guard), and other exploit mitigations to prevent…

    34k GitHub stars~1k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Implementing Cloud Dlp For Data Protection

    mukul975/Anthropic-Cybersecurity-Skills

    Implement cloud DLP using Amazon Macie, Google Cloud DLP API, Microsoft Purview, Azure Information Protection, and Nightfall AI to discover, classify, label, de-identify, and protect sensitive data…

    34k GitHub stars~4.2k tokensUpdated 1 mo ago
    Legal & ComplianceAuto-check passed
  • Implementing API Threat Protection With Apigee

    mukul975/Anthropic-Cybersecurity-Skills

    Implements API threat protection using Google Apigee reverse-proxy policies, including JSON/XML threat protection, OAuth 2.0 enforcement, SpikeArrest rate limiting, regex-based threat detection, and…

    34k GitHub stars~2.8k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Implementing Cloud Workload Protection

    mukul975/Anthropic-Cybersecurity-Skills

    Implements cloud workload protection using boto3 and google-cloud APIs for runtime security monitoring, process anomaly detection, and file integrity checking on EC2/GCE instances.

    34k GitHub stars~578 tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Implementing Mimecast Targeted Attack Protection

    mukul975/Anthropic-Cybersecurity-Skills

    Deploys and configures Mimecast Targeted Threat Protection (TTP) modules -- URL Protect (click-time URL rewriting/analysis), Attachment Protect (sandbox detonation), Impersonation Protect…

    34k GitHub stars~1.8k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Implementing Data Loss Prevention With Microsoft Purview

    mukul975/Anthropic-Cybersecurity-Skills

    Implements DLP policies using Microsoft Purview PowerShell cmdlets and the Graph API to protect data across Exchange Online, SharePoint, OneDrive, Teams, endpoints, and Power BI, including…

    34k GitHub stars~7.9k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed

More from benchflow-ai/skillsbench

All 178 skills in this repo
  • Lean4 Memories

    benchflow-ai/skillsbench

    This skill should be used when working on Lean 4 formalization projects to maintain persistent memory of successful proof patterns, failed approaches, project conventions, and user preferences…

    1.8k GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Senior Data Engineer

    benchflow-ai/skillsbench

    World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, real-time streaming, and data infrastructure.

    1.8k GitHub stars~5.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Ac Branch Pi Model

    benchflow-ai/skillsbench

    AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching acopf-math-model.md and MATPOWER branch fields.

    1.8k GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Civ6lib

    benchflow-ai/skillsbench

    Civilization 6 district mechanics library. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • D3 Visualization

    benchflow-ai/skillsbench

    Build deterministic, verifiable data visualizations with D3.js (v6).

    1.8k GitHub stars~1.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Dc Power Flow

    benchflow-ai/skillsbench

    DC power flow analysis for power systems. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~717 tokensUpdated 2 mo ago
    Auto-check passed

Questions about Safety Interlocks

What does Safety Interlocks do?

Implement safety interlocks and protective mechanisms to prevent equipment damage and ensure safe control system operation. Safety Interlocks is an agent skill from benchflow-ai/skillsbench. Implement safety interlocks and protective mechanisms to prevent equipment damage and ensure safe control system operation.

How do I install Safety Interlocks in Claude Code?

Run `npx skills add benchflow-ai/skillsbench --skill safety-interlocks -a claude-code`. Or copy the skill folder (tasks/hvac-control/environment/skills/safety-interlocks in benchflow-ai/skillsbench) into .claude/skills/safety-interlocks in your project. Claude Code loads it when a task matches its description.

How do I install Safety Interlocks in Codex?

Run `npx skills add benchflow-ai/skillsbench --skill safety-interlocks -a codex`. Or copy the skill folder (tasks/hvac-control/environment/skills/safety-interlocks in benchflow-ai/skillsbench) into .agents/skills/safety-interlocks in your project. Codex loads it when a task matches its description.

Can I use Safety Interlocks in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add benchflow-ai/skillsbench --skill safety-interlocks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/safety-interlocks, .gemini/skills/safety-interlocks, .github/skills/safety-interlocks and .opencode/skills/safety-interlocks in your project.

What does Safety Interlocks need to run?

SKILL.md names no scripts, command-line tools or credentials: Safety Interlocks is instructions for the agent only. Our summary lists: Python 3.

Does Safety Interlocks access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Safety Interlocks safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Safety Interlocks use?

Safety Interlocks is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Safety Interlocks use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Safety Interlocks?

Skills that share tags, products or a category with Safety Interlocks: Implementing Memory Protection With Dep Aslr (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Implementing Cloud Dlp For Data Protection (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Implementing API Threat Protection With Apigee (mukul975/Anthropic-Cybersecurity-Skills, 34k stars) and Implementing Cloud Workload Protection (mukul975/Anthropic-Cybersecurity-Skills, 34k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Safety Interlocks?

benchflow-ai (a GitHub organization) maintains it in benchflow-ai/skillsbench, which has 1,832 GitHub stars. The repository holds 178 skills in this directory. The repository was last updated on July 23, 2026.

Source: benchflow-ai/skillsbench on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.