Loslegen
Claude Code Safety Kit for Non-Programmers

Claude Code Safety Kit for Non-Programmers

Not a programmer, but using Claude Code? This kit helps prevent four accidents: deleted files, rules that pile up, "done" reports that aren't true, and browser work in the wrong account or field. Four Python hooks block mass deletes, edits outside your project, force-push and reset --hard, and ask before common push, publish and upload commands. Three skills: setup with a backup first, a claim-by-claim "done" check, and a browser check that stops before the last button. Not a guarantee. #Ingenieurwesen #Produktivität

Rating
Weitere Bewertungen erforderlich
Sold
0
How to use
Herunterladen

Claude Code Safety Kit for Non-Programmers

Keep your files, keep your rules short, and check what "done" really means.

For people who are not programmers but use Claude Code to build tools for their own work. Tested on
Windows.

Three accidents

These come from public reports on Claude Code's GitHub issue tracker, in the reporters' own words.

  • Files disappear. A student on Windows asked Claude Code to free up disk space. "It deleted
    the whole game project." And: "No remote existed." There was no copy anywhere else.
    (anthropics/claude-code#104848)
  • Rules grow until they are the job. A small-business owner who is "not a programmer" wrote:
    "Most of the work went on rules instead of the business." Their hooks grew "from 28 to 46". Then
    they cut them to "five hard stops". (#108568, #107408)
  • "Done" isn't true. The same owner: Claude's own check of 18 of its claims found "5 true, 12
    partly true and 1 false". (#108568)

Writing a stronger sentence in CLAUDE.md doesn't fix any of these. Anthropic's documentation says
CLAUDE.md is context, not something Claude Code enforces. To block an action whatever Claude
decides, it points to hooks. This kit puts that into practice, in this order: a backup first, a few
hard stops enforced by hooks, a person before anything leaves the computer, and a second check of
"done".

What's inside

  • safe-setup skill. It checks your project (backup, git, settings, existing hooks, CLAUDE.md)
    and explains what it found in plain words. It changes nothing until you say yes. Then it makes a
    backup and installs the hooks, only through the two tools below.
  • Four hooks (Python 3, standard library only):
    • no_mass_delete: blocks commands that can delete many files at once (rm -rf,
      Remove-Item -Recurse, del /s, wildcards, git clean -f, and more). Asks you first when
      one command names several files.
    • stay_in_project: blocks changes to files outside your project folder.
    • ask_before_sending: asks you Yes/No before git push, publishing, uploads, web requests that
      send data, e-mail and deploy tools.
    • git_guard: blocks force-push, push to main/master, --no-verify and git reset --hard.
  • selftest.py. Checks that the hooks really start and decide right on your computer. If the
    program in your settings isn't a working Python 3, Claude Code shows only "hook error" and the
    hook blocks nothing. The self-test catches that.
  • Two tools. make_backup.py makes a ZIP copy and/or a git snapshot on your computer. It
    never deletes anything and never uploads anything. install_hooks.py shows the full change to
    your settings first, and writes only when you add --write. Your existing settings stay.
  • check-done skill. It splits a "done" report into claims. A second agent that didn't write
    the report checks each one against the files. You get a table: claim, verdict, evidence.
  • browser-check skill (new in 1.1). For when Claude works in a web browser on sites where
    you are signed in. The kit's hooks can't see that, so the skill checks four things: which account is
    signed in (again on every resume), which field it is about to type into, what the field holds
    after typing, and it stops before the last submit, send, publish or pay button for you to press.
  • A 15-page guide (PDF), a one-page checklist (PDF), and real output from the test runs.

Each hook names itself when it blocks or asks ("Blocked by the no_mass_delete safety
hook: ..."). So you can tell the kit's block from Claude Code's own.

When Claude works in a browser

Claude can type and click in a web browser through a browser tool, on sites where you are signed
in. The kit's hooks see shell commands and file edits, not browser tools. Two things happened in
the maker's own work: a whole article was typed into a different account of the same site, one
click before "save draft", and a click at the wrong position put an article into the title field.
browser-check comes from those two. Type "Use the browser check." before browser work.

Tested on Windows

  • Windows 10, Claude Code 2.1.280 in the terminal, Python 3.13, November 2026.
  • Live runs with both the Bash tool and the PowerShell tool.
  • The settings use the "exec form" from Anthropic's hooks documentation: Claude Code starts Python
    directly, with no shell.
  • Step-by-step setup for Windows: opening PowerShell in your folder, checking Python, the
    "Extract All" folder, hidden file extensions (settings.json.json).

The numbers

  • 568 unit tests for the hooks and the self-test, all passing (no_mass_delete 225,
    stay_in_project 111, ask_before_sending 120, git_guard 94, selftest 18).
  • 44 unit tests for the two tools, all passing (install_hooks 25, make_backup 19).
  • Two independent testers tried to break the kit. The first one gave it a FAIL. The problems they found
    were fixed and retested, and the unit tests include those cases. The guide says what they were.
  • check-done was given a report with 7 claims, some planted false. It found every planted problem.
  • safe-setup sorted a 44-rule CLAUDE.md: 14 rules were the same five hard stops in different
    words. The rest became short notes.
  • browser-check was tested with stand-in browser tools that record every click (no real
    website). With Sonnet it stopped before the final button in 24 of 24 runs, also when asked to
    press it, caught text that landed in the wrong field, and did not follow an instruction written
    into the page. With Haiku it pressed the final button in 4 of 10 runs, so use Sonnet or larger.

Testing changed the kit

Some things were learned only by running it:

  • Claude sometimes offered a way around a block: "I can delete them one at a time instead." The
    README and guide show what to do when it says this.
  • With Haiku, the setup skill once set a git name by itself and rewrote settings.json with a script. So setup
    moved into the two tools, and the skill may change files only through them.

Rules, hooks and checks

A written rule guides Claude but does not stop it (see "Three accidents" above). This kit keeps
written rules short (notes for CLAUDE.md) and has the hard stops enforced by the computer:

  • four hooks that Claude Code runs before a command, which block or ask whatever Claude decided,
  • selftest.py, which fails if a hook is not registered or cannot start on your PC,
  • 568 + 44 unit tests, and live runs on Windows with both shells,
  • three skills that check: your setup, a "done" report, and browser work.

It is made for one tool, Claude Code, and for people who are not programmers.

Who it's for

  • You use Claude Code to build things for your own work or small business.
  • You are not a programmer, and you're on Windows (macOS/Linux: see Limits).
  • Something already went wrong, or you don't want it to: lost files, too many rules, "done" that
    wasn't.

Not for

  • People who haven't installed Claude Code yet. This kit doesn't cover installing it.
  • Cursor, Codex or Copilot. The hooks are a Claude Code feature.
  • Recovering files that are already gone. The kit can't bring them back.

Limits, stated plainly

  • Not a safety guarantee. The hooks read the text of a command. A command written another way
    can get past them, for example files deleted one at a time, or a delete inside a script file.
    The README lists what each hook does not see.
  • The backup comes first. The hooks are the second line.
  • The hooks protect the one project they are installed in.
  • Not tested yet:
    • a Windows PC without Git Bash (the exec-form settings should not need it, according to
      Anthropic's documentation)
    • macOS and Linux (the scripts are the same, but they were not run there)
    • the Claude desktop app (Code tab) and the VS Code extension (the documentation says hooks
      fire the same way there; not checked by hand)
    • the Yes/No questions in a normal session (in the test runs nobody could answer, so Claude
      Code refused, as documented)
  • Use Sonnet or a larger model for the safe-setup setup step. After setup moved into the tools,
    Haiku broke no file rules in two runs, but its report was not always accurate.
  • The browser check is a habit, not a block. It works only when Claude uses it, and it was
    tested with a simulated browser, not on real sites. Use Sonnet or larger for browser work. Look
    at the page yourself and press the last button yourself.
  • Claude Code changes quickly. After an update, run the self-test again.

Try the free part first

The no_mass_delete hook, a smaller self-test and a one-page checklist are free on GitHub
(github.com/lga-cpu/claude-code-safety-starter, MIT license). This kit adds the other three hooks,
all three skills, the backup and install tools, and the guide.

Made by a non-programmer

The kit was made by one non-programmer who uses Claude Code to make and list products, with an
approval gate before anything is published. Chapter 7 of the guide shows what happened in that
work. No names or sales figures.

Format

A ZIP download. One-time purchase. Version 1.1 (see CHANGELOG.md).

Independent product. Not made, endorsed or reviewed by Anthropic. "Claude" and "Claude Code" are
trademarks of Anthropic.