jddavenportOpen

Ethos Gate — AI skill for Claude Code

AI community

A PreToolUse safety gate for autonomous AI agents: blocks irreversible or outward-facing actions (sends, spends, deploys) unless a human approved that exact content.

How to install Ethos Gate

This entry records only its repository, not the path inside it, so there is no exact command to give. Open jddavenportOpen/ethos-gate and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Ethos Gate does

A PreToolUse safety gate for autonomous AI agents: blocks irreversible or outward-facing actions (sends, spends, deploys) unless a human approved that exact content. 62 tests, 4 hooks, lethal-trifecta auditor.

Alternatives in AI

  • Business Model — Generate Business Model Canvas with all 9 building blocks 7.8k ★
  • Browserwing — BrowserWing turns your browser actions into MCP commands Or Claude Skill, allowing AI agents to control browse 1.2k ★
  • Kibitz — Real-time decoded feed of AI agent actions — monitor multiple Claude Code & Codex sessions, see exactly what e 521 ★

README

ethos-gate

Application-layer safety hooks for governing agentic Claude systems.

Built from production patterns running 10+ concurrent autonomous Claude sessions. ethos-gate is the application-level guardrail layer — the PreToolUse and Stop hooks that enforce safety properties your system prompt cannot.


What's in here

Module What it does
hooks/irreversible_guard.py Blocks irreversible Bash commands (git push, rm -rf, prod deploys) unless the session has already run tests. Blocks Stop if files were edited but no tests were observed.
hooks/credential_scrape.py Three-tier policy blocking access to browser cred stores (always), autonomous-session privilege escalation (strict mode), and secret files in untrusted-input contexts (sandbox mode).
hooks/external_action_gate.py Governs outbound GitHub actions. Owned repos: full send. External repos: classified + judged. Override token for explicit approvals. Fail-safe: deny when judge is unavailable.
audit/trifecta.py Lethal-trifecta combination-exposure scanner. Flags agents that simultaneously hold private data access + untrusted input exposure + outbound channel. Exit 2 = BLIND = failure.
charter.py Safety commandments and autonomy-ladder dataclasses — documentation-as-data for your policy layer.

Quick start

pip install ethos-gate
# or from source:
git clone https://github.com/jddavenportopen/ethos-gate
cd ethos-gate && pip install -e .

Wire the hooks in your Claude Code settings (`~/.claude/settings.json`):

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": ".*",
        "hooks": [{
          "type": "command",
          "command": "python3 -m ethos_gate.hooks.irreversible_guard",
          "timeout": 5000
        }]
      }
    ],
    "Stop": [
      {
        "hooks": [{
          "type": "command",
          "command": "python3 -m ethos_gate.hooks.irreversible_guard",
          "timeout": 5000