Make Claude Code follow your rules, not just read them
Paste your .claude/settings.json. Hooks that never run and permissions that let too much through show up below with the fix. Add a free guard hook and build your CLAUDE.md. Nothing is uploaded.
Checking the sample…See all fixes
Your .claude/settings.json
Checked as you type; works offline once loaded. Ctrl+Enter checks now, Ctrl+Shift+F applies safe fixes. Your draft stays in this browser only.
Check results
Checking…
| Level | Where | Problem | Fix |
|---|---|---|---|
| error | permissions.allow | "Bash(*)" lets Claude run any shell command without asking, including rm -rf and git push --force. | Remove it (safe fix) and allow the exact commands you run, e.g. "Bash(npm run test *)". |
| error | permissions.allow | "Read(./.env)" allows reading your .env secrets. | Remove it (safe fix) and allow the exact commands you run, e.g. "Bash(npm run test *)". |
| error | env.OPENAI_API_KEY | This looks like a real secret in .claude/settings.json, which is usually committed and shared. | Move it to .claude/settings.local.json (git-ignored) or your shell, and rotate the key if it was ever pushed. |
| error | hooks.preToolUse | "preToolUse" is not an event name: event names are case-sensitive, so these hooks never run. | Rename it to "PreToolUse" (safe fix). |
| error | hooks.preToolUse[0] | Matcher "bash" does not match any tool: tool names are case-sensitive. | Write "Bash" (safe fix). |
| error | hooks.preToolUse[0].hooks[0] | "timeout": "10s" must be a number of seconds. | Write "timeout": 10 (safe fix). |
| error | hooks.PostToolUse[0] | The hook sits directly in the event list; Claude Code expects it inside a "hooks" list, so it never runs. | Wrap it: { "matcher": "…", "hooks": [ { "type": "command", "command": "…" } ] } (safe fix). |
| error | hooks.Stop[0].hooks[0] | This command hook has no "command", so it does nothing. | Add "command": "python3 \"$CLAUDE_PROJECT_DIR\"/.claude/hooks/your_hook.py". |
| warning | permissions.deny | Nothing stops Claude from reading .env, so a debugging step can print your keys into the chat. | Add "Read(./.env)" and "Read(./.env.*)" to deny (safe fix). |
| warning | hooks.preToolUse[0].hooks[0] | The script path is relative; when Claude changes directory (cd into a subfolder), the hook cannot find it and fails. | Start the path with "$CLAUDE_PROJECT_DIR"/ (safe fix). |
| warning | hooks.PostToolUse[0].hooks[0] | Formats the whole project after every single edit, which is slow and touches files Claude did not change. | Format only the edited file (read tool_input.file_path from the hook input), like the kit's format_after_edit.py. |
| warning | hooks | No PreToolUse hook guards Bash. CLAUDE.md rules are advice; only a hook can actually stop a force push or rm -rf. | Add the free guard hook below (one click), or the kit's full guard that blocks 13 kinds of command. |
| info | permissions.allow | "Bash(npm run test:*)" uses the older ":*" prefix form. | It still works; the current docs write "Bash(npm run test *)". |
| info | hooks.PostToolUse[0].hooks[0] | npx may stop to ask before installing a package, and a hook cannot answer. | Use "npx --no-install …" so it only runs a tool your project already has. |
| info | hooks.Stop[0] | Stop does not use a matcher, so "Bash" is ignored and the hook runs every time. | Remove "matcher" from this group. |
No problems found. Restart Claude Code and run /hooks to see each hook listed under its event.
Test the guard hook
A PreToolUse hook sees every Bash command before it runs and can block it with exit code 2. Type a command to see what the free guard does with it.
Press Test command.
The free guard has 4 rules: force push, push to main, rm -rf of home or root, git reset --hard. The kit's guard has 13 and adds a second hook that protects .env, keys and lockfiles from edits.
Build your CLAUDE.md
Take it with you
One zip with .claude/settings.json, the guard hook and your CLAUDE.md, ready to unzip into the project root.
Claude Code Starter Kit
The checker fixes the settings you have. The kit gives you a complete, tested setup for a TypeScript or Python project in one install.
- 5 hooks, tested: a guard that blocks 13 kinds of risky command (force push, push to main,
sudo,curl | sh, destructive SQL, reading.env…), file protection for secrets, keys and lockfiles, format after each edit (only the edited file), session context, and a stop check that sends Claude back to remove debug code. - CLAUDE.md templates for minimal, TypeScript and Python projects, written to stay under 200 lines.
- 5 subagents: code reviewer, bug investigator, refactor planner, dependency checker, release checker.
- 3 skills:
/ship-check,/fix-issue,/explain-diff. - Installer and test record:
install.shcopies it into a project without overwriting your files; 58 checks run on the kit, including every hook with real hook input.
Instant download (zip). 14-day fix-or-refund if it doesn't work as described. Questions: cybermax.tools@gmail.com
Questions
Does the checker upload my settings?
No. Everything runs in this page. Your settings, paths and any keys never leave your browser; the draft is kept only in this browser's storage. A share link carries the settings in the part of the URL after #, which browsers do not send to the server.
What does the free checker cover?
JSON errors with the line, misspelled settings keys, event names and matchers with the wrong case, hooks placed outside a hooks list, hooks with no command or type, timeouts written as text, relative script paths, formatters that rewrite the whole project after each edit, npx install prompts, matchers on events that ignore them, wide-open Bash(*) and destructive allow rules, rules in both allow and deny, no .env deny rule, bypassPermissions, and real-looking keys in env. No limit, no sign-up.
Why not just put the rules in CLAUDE.md?
CLAUDE.md is read as guidance, so Claude can still run a command it says to avoid. A hook runs before the command and can block it, so the rule is enforced. Use CLAUDE.md for how to work, and hooks for what must never happen.
Why not just read the official docs?
The official Claude Code docs are what we check against and the place to learn the rules. The kit saves the hours in between: hooks that are already written and tested, templates that already follow the rules, and subagents and skills you can use on day one.
Is this made by Anthropic?
No. Unofficial. Not affiliated with or endorsed by Anthropic.