yottayoshida

Omamori — AI skill for Claude Code

AI community

AI Agent's Omamori — protect your system from dangerous commands executed via AI CLI tools.

How to install Omamori

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

What Omamori does

AI Agent's Omamori — protect your system from dangerous commands executed via AI CLI tools.

Alternatives in AI

  • System Prompts Leaks — Extracted system prompts from ChatGPT (GPT-5.4, GPT-5.3, Codex), Claude (Opus 4.6, Sonnet 4.6, Claude Code), G 38.6k ★
  • AIHawk — Open-source AI browser agent: describe any task in plain language and it autonomously browses, clicks, types a 30.3k ★
  • Qwen Code — A command-line AI workflow tool adapted from Gemini CLI, optimized for Qwen3-Coder models with enhanced parser 20.8k ★

README

omamori

[![CI](https://github.com/yottayoshida/omamori/actions/workflows/ci.yml/badge.svg)](https://github.com/yottayoshida/omamori/actions/workflows/ci.yml) [![crates.io](https://img.shields.io/crates/v/omamori.svg)](https://crates.io/crates/omamori) [![homebrew](https://img.shields.io/badge/homebrew-tap-blue)](https://github.com/yottayoshida/homebrew-tap) [![License](https://img.shields.io/crates/l/omamori)](LICENSE-MIT)

Deterministic semantic guard for AI CLI tools. Blocks covered destructive commands and self-disablement attempts, with tamper-evident audit trails.

Fast local checks — no model calls, no daemon, no network dependency. **macOS only.** Commands you type in a plain terminal pass through untouched; omamori acts only when an AI tool environment is detected. It is not a sandbox: run it alongside one ([how the two fit together](docs/reference-architecture.md)).

Since **1.0**, three surfaces are frozen until a major version: which command classes are blocked or redirected, the CLI's subcommands and documented exit codes, and the audit chain's verifiability across upgrades. The `config.toml` schema and the Rust library API are not frozen. The full statement is [docs/CONTRACT.md](docs/CONTRACT.md).

Demo

![omamori demo](demo.svg)

A Claude Code session. Codex CLI and Cursor get the same `block` / `log-only` / `trash` behavior when detected.

Quick start

brew install yottayoshida/tap/omamori
omamori setup

`setup` installs the shims and hooks, adds `$HOME/.omamori/shim` to your shell profile, and runs `omamori doctor`. It is safe to re-run after upgrades. Preview with `--dry-run`; use `--non-interactive` in CI and scripts.

To see what omamori would do with a command, without running it:

omamori explain -- rm -rf src/

What it does

  • Blocks destructive commands before they run. rm -rf goes to the macOS Trash, git reset --hard stashes first, and git push --force, git clean -f, chmod 777, `find -delete