AI Blocks

Putting the blocks together

This is taking longer than expected.

Try againBrowse the library
AI Blocks · All skills by job · Minds · Mini tools · How it works · From a source · Apps

AI Blocks › Build and ship software

Git safety guard setter

Say you want safe git. Get hooks that block risky commands like force push and hard reset before they run.

Git safety guard setter is a free AI skill for the job "Build and ship software". Give the instructions to an AI assistant that supports the required files and tools, then review its output.

Free · No account · MIT licence · Made by Matt Pocock · Thinking: low

Made by Matt Pocock. See the original on GitHub; we copied it as it is, with its licence.

What it does

Your AI agent can no longer wreck your git history by accident. This sets up a hook in Claude Code that checks each command before it runs, and stops the risky ones. Blocked commands include any git push, including force push, reset --hard, clean -f, branch -D, and checkout or restore of the whole folder. When a command is blocked, Claude is told it has no authority to run it. You choose whether the guard covers one project or all your projects. The skill copies a small shell script into place and adds the matching hook to your settings file.

You give it

You get

Use it when

How to use it

  1. Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
  2. Ask for the job in your own words. Your AI opens the skill when it fits.
  3. It works best when your AI can run code and change your Claude Code settings.

More for Build and ship software

Every build and ship software skill