Stop Claude Code lying about "done". Stop it burning your quota on routing.
god-mode-os is a layer of bash hooks for Claude Code that:
- Block false "done" claims. Claude can't say it ran the tests if it never ran the tests.
- Protect
~/.claude/. Writes to your hooks, skills, andsettings.jsonneed explicit approval. - Catch committed secrets before you ship. A local, fail-closed gitleaks gate.
- Route prompts to skills locally. pgvector + Ollama, sub-300 ms, zero Anthropic tokens.
- Run offline. No telemetry, no phone-home. Your code and prompts never leave the machine.
git clone https://github.com/Wishmakingfairy/god-mode-os-for-claude-code
cd god-mode-os-for-claude-code
./install.sh # ~60 seconds, only jq + python3 neededDon't trust the README? Run
bash smoke.sh. It tests every load-bearing claim in this README against the real code and prints a pass/fail receipt. It runs in a throwawayHOMEand installs nothing, so you can prove the claims before you touch your own~/.claude. The same script runs in CI on every push, on Linux and macOS, so the badge above is a live receipt too.
- Runs offline
- How it hooks in
- What it does
- Before / after
- Install
- What ships in the default install
- Customize
- FAQ
Four walls every senior Claude Code user has hit:
- Claude lies about "done." It claims tests pass without running them, or claims it edited a file it never read.
- Skills are noise. With hundreds of skills installed, Claude burns input tokens scanning manifests to pick the right tool, often picking the wrong one.
- Context dies between sessions. Every morning the agent re-onboards on the same project.
- Discipline slips at 11pm. Prompt-text rules ("verify before saying done") are ignorable. Hook-level rules are not.
god-mode-os is the discipline layer Anthropic deliberately leaves to vendors. It enforces what your CLAUDE.md only describes.
By default god-mode-os makes no external network calls. No telemetry, no analytics, no phone-home. Your prompts, transcripts, and code stay on your machine. The local skill router talks only to localhost (Postgres and Ollama). Two optional exceptions exist, both off by default and documented: the osv-scanner CVE lookup in the pre-deploy gate, and a Gemini session summary you turn on with GMOS_RETRO_GEMINI=1. Full detail in PRIVACY.md. Verify it yourself: grep -rniE 'curl|wget|https?://' --include='*.sh' --include='*.py' . and you will find only localhost and the documented osv.dev lookup.
god-mode-os attaches a small bash hook to each point in the Claude Code session lifecycle. Nothing runs in the background and nothing leaves your machine.
The table below summarises the four scenarios in the before / after section. Each row links to a runnable fixture in docs/demos/fixtures/ so you can reproduce locally.
| Scenario | Default Claude Code (typical) | With god-mode-os |
|---|---|---|
| stop-validator | "All tests pass. Done." with no tool use to back it | block fires; agent rewrites with Read + actual test run |
| install-guard | Write to ~/.claude/settings.json proceeds; existing entries can be dropped |
blocked until GMOS_ADMIN_OVERRIDE=1 |
| routing | Claude reads the full skill manifest each prompt to pick (~721 descriptions in the author's config) | local pgvector cosine match: 0 Anthropic tokens by design, sub-300 ms typical on the author's setup |
| secret-scan gate | a committed API key reaches the remote before anyone notices | bin/pre-deploy-gate.sh blocks the deploy on any gitleaks hit, fully local |
Routing per prompt, lower is better. The saving scales with how many skills you run. The figures below are estimates for a setup with hundreds of skills; with only a few, the difference is small.
Each pair below is a screen recording of a fixture script in docs/demos/fixtures/. The fixtures depict the scenario the hook is meant to address; the hooks themselves are real bash and run against your live Claude Code sessions (verify with ./install.sh && cat ~/.claude/hooks/). Left: default Claude Code behaviour. Right: same prompt with god-mode-os installed.
Prompt: "Fix the JWT bug in
~/src/auth.tsand run the tests." A known Claude Code failure mode: the agent says "all tests pass, done" without actually running them, and you ship the regression. The stop-validator hook blocks any final response that claims about a file path without a recentRead/Grep/Bashof that path. Claude is forced to rewrite the response with proof.
![]() |
![]() |
Prompt: "Add a new PostToolUse hook to my Claude Code config." Without a guard, an agent with
Writeaccess on~/.claude/settings.jsoncan re-serialise the file with new entries, and risk dropping or malforming the existing ones. With the install-guard hook, anyWrite/Edit/Bashagainst~/.claude/settings.json,~/.claude/hooks/, or~/.claude/skills/is blocked until the user re-runs withGMOS_ADMIN_OVERRIDE=1.
![]() |
![]() |
Prompt: "design system tokens for a dark dashboard." Without the hook, Claude reads the skill manifest each prompt to pick. At 721 skills, this is around 3,200 input tokens / ~2.4 s / ~$0.0096 per query (estimate, varies with manifest size and prompt length). With the hook, the router uses a local pgvector cosine match. The architecture sends 0 Anthropic tokens for routing (no API call is made). The latency on the author's setup is sub-300 ms typical; the live measurement loop is in
docs/demos/fixtures/router-demo.sh.
![]() |
![]() |
Prompt: "ship the new env config." A common failure: a real API key gets committed and pushed before anyone reads the diff. Run
bin/pre-deploy-gate.shfirst. It runs gitleaks locally over the working tree and exits non-zero on any hit, so the deploy stops before the secret leaves your machine. gitleaks is fully local. The optional second step (osv-scanner CVE lookup) is the only part that touches the network, and only if you install it.
bin/pre-deploy-gate.sh . # exit 0 = clean, exit 1 = secret or CVE foundReal output on a clean tree:
============================================
PRE-DEPLOY SECURITY GATE :: .
============================================
--- [1/2] Secret scan (gitleaks, local) ---
OK: no secrets found
--- [2/2] Dependency CVEs (osv-scanner, optional, online) ---
OK: no known-vulnerable dependencies
============================================
GATE PASSED
============================================
When gitleaks finds a key, that step prints FAIL: secrets detected, do not deploy and the gate exits 1, so a CI step or a pre-push wrapper stops the deploy before the secret leaves your machine.
The install command is above. To recap the steps:
./install.shsymlinks six hooks into~/.claude/hooks/and registers five entries in~/.claude/settings.json.- The first install backs up your existing
settings.jsontosettings.json.gmos-backup. - Restart Claude Code to activate.
- To remove cleanly:
./uninstall.sh(data kept) or./uninstall.sh --purge(data wiped). Orbash hooks/discipline/discipline-toggle.sh offfor the kill switch without uninstalling.
Want the local skill router? See TIERS.md.
smoke.sh runs every load-bearing claim in this README against the real code, in a throwaway HOME. It installs nothing and never touches your real ~/.claude or ~/.god-mode-os, so you can prove the claims first and decide after.
git clone https://github.com/Wishmakingfairy/god-mode-os-for-claude-code
cd god-mode-os-for-claude-code
bash smoke.sh # plain pass/fail receipt
bash smoke.sh -v # verbose: shows how each check was performedIt hard-fails (exit 1) on any false behavioural claim and soft-warns on timing. The same script runs in CI on every push, on Linux and macOS, so the badge at the top is a live receipt too.
The discipline tier hooks Claude Code's Stop and PreToolUse events.
- stop-validator blocks the response when Claude claims about a file path without a recent
Read/Grep/Bashof it, contains an em-dash, makes statistical claims without a source, or contradicts an earlier turn. Claude is forced to rewrite with proof. - install-guard blocks
Write/Edit/Bashcalls that target~/.claude/settings.json,~/.claude/hooks/,~/.claude/skills/, and other protected paths. Override per command withGMOS_ADMIN_OVERRIDE=1. - folder-law-reminder blocks writes to
/tmpand~/Downloadsby default. Customize via~/.god-mode-os/forbidden-write-paths.txt. - session-retro auto-writes
docs/retros/YYYY-MM-DD-topic.mdwhen a session uses 5 or more tools. It writes from local session stats. An optional Gemini summary is off by default; setGMOS_RETRO_GEMINI=1to turn it on (that step sends the transcript to the Gemini CLI). - capability-manifest runs at
SessionStartand injects a live, local list of your installed skills, MCP servers, and plugins, so Claude does not falsely claim it lacks a tool it actually has. No network calls. - discipline-toggle is the kill switch:
bash hooks/discipline/discipline-toggle.sh off.
Seven toggle env vars, all default on:
GMOS_CHECK_EM_DASH em-dash hard ban
GMOS_CHECK_SLOP ban AI-slop filler words
GMOS_CHECK_SYCOPHANCY ban sycophantic openers
GMOS_CHECK_TOOL_USE no claims about files without reading
GMOS_CHECK_CITATIONS statistics need a source
GMOS_CHECK_CONSISTENCY detect contradiction with prior turn (requires Ollama, majority vote)
GMOS_CHECK_DODGE detect capability denial (requires Ollama)
Set any to 0 to disable that check. The two Ollama-dependent checks self-disable silently if ollama is not on PATH, so the default install with just jq and python3 runs the first three out of the box.
Everything is configurable via either an env var or a plain text file in ~/.god-mode-os/. Edit, save, restart Claude Code; nothing to redeploy.
| What you can change | Where | Default |
|---|---|---|
| Which discipline checks fire | GMOS_CHECK_* env vars |
all 5 on |
| Paths install-guard protects | ~/.god-mode-os/protected-paths.txt |
~/.claude/{settings.json, hooks/, skills/, plugins/, commands/} |
| Paths folder-law-reminder blocks | ~/.god-mode-os/forbidden-write-paths.txt |
/tmp and ~/Downloads |
| Postgres DSN, Ollama URL, embed model (Tier 2) | GMOS_DB_DSN, GMOS_OLLAMA_URL, GMOS_EMBED_MODEL env vars |
localhost defaults |
| Kill switch (disable everything, no uninstall) | ~/.claude/.god-mode-disabled (touch to enable) |
absent |
| Per-command escape hatch | GMOS_ADMIN_OVERRIDE=1 |
unset |
You probably want this if you run Claude Code more than 3 hours a day, you have blown through your Max quota and don't know where the tokens went, you have caught Claude claiming "all tests pass" when they didn't, or you have rebuilt your own hook setup at least once.
You probably don't want this if you use Claude Code casually, you don't have jq installed, or you think hooks are over-engineering.
god-mode-os installs bash hooks into ~/.claude/hooks/ that intercept Claude Code at the Stop, PreToolUse, and UserPromptSubmit events. The hooks enforce verification before "done" claims, block writes to protected config paths, and (optionally, see TIERS.md) route prompts to skills via local pgvector with zero Anthropic API tokens.
The stop-validator hook reads the last assistant turn from the session transcript and blocks it (exit code 2 plus stderr) if the response claims about a file path without a recent Read/Grep/Bash of that path, contains an em-dash, makes a statistical claim without a source, or contradicts an earlier turn. Claude Code surfaces the stderr as a system reminder, forcing the agent to rewrite the response with proof.
god-mode-os works with both Claude Pro / Max subscriptions and the Claude API. Hooks run locally in your shell; they don't care about billing.
god-mode-os adds new entries to settings.json without modifying or removing existing ones. The first install creates a backup at ~/.claude/settings.json.gmos-backup so you can revert if needed.
The agent cannot bypass hooks. Hooks run in your shell process, outside Claude's context window. The agent can request the user to set GMOS_ADMIN_OVERRIDE=1 for a specific command, which is the intended escape hatch.
Run ./uninstall.sh to remove hooks and settings.json entries (data kept). Run ./uninstall.sh --purge to also wipe ~/.god-mode-os/. The kill switch bash hooks/discipline/discipline-toggle.sh off disables all hooks without uninstalling.
What it does not do, stated plainly:
- It constrains behavior. It does not make Claude smarter. These are bash hooks, not a model upgrade.
- stop-validator catches a pattern: claims about a file with no recent read or test, em dashes, unsourced stats, contradictions, slop words. It will not catch every false "done", and the two Ollama-based checks can throw false positives. Every check is an env-var toggle you can turn off.
- The routing token saving scales with how many skills you run. With a handful of skills it is small.
- The secret gate catches what gitleaks recognizes, not literally every secret. The optional osv-scanner step is the only part that touches the network.
- macOS first. The discipline tier is portable bash; the routing tier needs Docker and Ollama.
- It is not a security boundary against a malicious local user. If someone has your shell, they have your config.
Tested on macOS. Tier 1 hooks should work on Linux unchanged. Notifications use terminal-notifier on macOS; on Linux substitute notify-send.
v0.1. Issues, ideas, and PRs welcome. See CONTRIBUTING.md. New discipline checks must be opt-in by default.
Built by Harald Gabrans Zukovs (@Wishmakingfairy on GitHub · LinkedIn).
If god-mode-os saves you time, the cheapest way to say thanks is to star the repo, file a real-use issue, or share what broke and how you fixed it. PRs welcome under CONTRIBUTING.md.
MIT.
Built on top of Claude Code, pgvector, and Ollama. Demo GIFs were rendered with Charm VHS during development; users do not need it installed.
If bash smoke.sh printed Every load-bearing README claim is TRUE on this machine, that took 90 seconds and it never lied to you once. Star the repo. Then go install it.













