safe-agentic-world

Nomos — Git skill for Claude Code

Git community

Deny-wins policy hook for Claude Code and Codex.

How to install Nomos

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

What Nomos does

Deny-wins policy hook for Claude Code and Codex. Checks every shell, file, and fetch call against rules you keep in Git, holds under --dangerously-skip-permissions, refuses commands it cannot parse, and keeps a hash-linked audit log.

Alternatives in Git

  • Ws Reset — Reset the current branch to main, fetch upstream, and update submodules 38.1k ★
  • Star Us On GitHub — It helps us keep building 7k ★
  • Intel — On-demand intelligence fetch for a target — CVEs, disclosed reports, new features 3.8k ★

README

Nomos

**Deny wins, in every permission mode. A policy hook for Claude Code and Codex, tested in CI.**

[![CI](https://github.com/safe-agentic-world/nomos/actions/workflows/ci.yml/badge.svg)](https://github.com/safe-agentic-world/nomos/actions/workflows/ci.yml) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)

[Install](#install) · [Claude Code Hook](docs/claude-code-hook.md) · [Codex Hook](docs/codex-hook.md) · [Policy Language](docs/policy-language.md) · [Validation Record](docs/validation-claude-code-hook.md) · [Roadmap](docs/roadmap.md) · [Contributing](CONTRIBUTING.md)

Coding agents run with your shell and your credentials. Nomos is a pre-tool hook that decides each native tool call the agent makes (shell command, file read or write, fetch) against a policy you keep in Git, and answers allow, deny, or ask before the call runs. A deny holds under `--dangerously-skip-permissions`. A command the hook cannot interpret is never auto-allowed. Every decision is appended to a hash-linked audit log with the argv that ran and the rule that decided it.

Sixty Seconds

brew install safe-agentic-world/nomos/nomos   # Scoop and direct downloads under Install
cd your-project
nomos hook claude-code --install --profile safe-dev
nomos hook claude-code --simulate --profile safe-dev --command "rm -rf tests/ patches/ plan/ ~/"

The last command prints what Claude Code would receive:

{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"Nomos: profile safe-dev denies process.exec [\"rm\" \"-rf\" \"tests/\" \"patches/\" \"plan/\" \"~/\"] (rules: safe-dev-deny-catastrophic-delete)"}}

With the same profile, `git status && go test ./...` runs without a prompt, `git push` and `rm -rf build/` ask, `cat config/.env` is denied, and `rm -rf $BUILD_DIR` asks because Nomos does not guess what the shell would expand. Three embedded profiles cover the usual postures: