Ethos Gate — AI skill for Claude Code
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
- Visual Skills — AI film director skills for agents: cinematic dramaturgy (Murch, blocking, montage) + exact prompt syntax for 212 ★
- OmniGlyph — Cut your Claude bill 59–70% by rendering bulky LLM context as dense PNG pages — 100% read accuracy, exact per 99 ★
- Agentcanvas — Visualize Pydantic AI agent workflows from Logfire traces as an interactive HTML diagram — tools, nested sub-a 81 ★
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
Related Skills
Gate.Cat
Block irreversible AI-agent actions before they run — deterministic, fail-closed action veto for Claude Code,
Fuck It We Ball
🏀 Claude Code skill: runs an approved plan end to end with subagents — ordered by urgency × unblocking × seve
AI Agent Guardrails Windows Guide
Verified guide: a global guardrail that blocks catastrophic shell commands from AI agents on Windows (Claude C
Smart Context Delegation
Cut coding-agent token usage by ~90%: a PreToolUse hook blocks large file reads; bulk-read/code-write delegate
Backpaw
Undo for AI coding agents. Blocks rm -rf and other permanent deletes from Claude Code, Codex, Cursor, Gemini C
Motus
Keep API keys and tokens out of your AI coding agent. Redacts exact secret values from tool output and session
Related Agents
Project Automation Auditor
Audits a project's automation and verification posture: test runner, formatter/linter PostToolUse hooks, PreTo
Fidelity Verifier
Adversarial verifier for outward-facing drafts (briefs, digests, packs) produced by /share. It tries to FAIL t
Blast Radius Tracer
Traces outward from a few changed files to everything they could affect — callers, data, contracts, CI trigger