Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
1–10 of 72 posts
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#2Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#3You should probably rely less on AI. If your first thought is "I need to delete some directories" and your immediate next thought is "I'd better ask an AI agent to do this for me", you are definitely exhibiting skill entropy.
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#4What do I mean by "it doesn't work"? Well, claude code is really good at executing things in unusual ways when it needs to, and this is trying to parse shell to catch them.
When claude code has trouble running a bash command, it sometimes will say something like "The current environment is wonky, let's put it in a file and run that", and then use the edit tool to create 'tmp.sh' and then 'bash tmp.sh'. Which this plugin would allow, but would obviously let claude run anything.
I've also had claude reach for awk '{system(...)}', which this plugin doesn't prevent, among some others. A blacklist of "unix commands which can execute arbitrary code" is doomed to failure because there's just so many ways out there to do so.
Preventing destructive operations, like `rm -rf ~/`, is much more easily handled by running the agent in a container with only the code mounted into it, and then frequently committing changes and pushing them out of the container so that the agent can't delete its work history either.
Half-measures, like trying to parse shell commands and flags, is just going to lead to the agent hitting a wall and looping into doing weird things (leading to it being more likely to really screw things up), as opposed to something like containers or VMs which are easy to use and actually work.
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#5You should probably rely less on AI. If your first thought is "I need to delete some directories" and your immediate next thought is "I'd better ask an AI agent to do this for me", you are definitely exhibiting skill entropy.
Just today Claude decided to do a git restore on me, blowing away local changes, despite having strict instructions to do nothing with git except to use it to look at history and branches.
Why jump to the conclusion that the person is so incompetent with no evidence?
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#6Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#7The problem seems to come when it’s stuck in a debug death loop with full permissions.
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#8You should probably rely less on AI. If your first thought is "I need to delete some directories" and your immediate next thought is "I'd better ask an AI agent to do this for me", you are definitely exhibiting skill entropy.
Claude does these things even though you have explicit instructions not to do them, this isn't a tool for you asking it to delete files. Just today Claude decided to do a git restore on me, blowing away local changes, despite having strict instructions to do nothing with git except to use it to look at history and branches. Why jump to the conclusion that the person is so incompetent with no evidence?
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#9You should probably rely less on AI. If your first thought is "I need to delete some directories" and your immediate next thought is "I'd better ask an AI agent to do this for me", you are definitely exhibiting skill entropy.
What is "skill entropy"
Re: Show HN: A Claude Code plugin that catch destructive Git and filesystem commands
#10In my opinion this is a solution at the wrong layer. It's working by trying to filter executed commands, but it doesn't work in many cases (even in 'strict mode'), and there's better, more complete, solutions. What do I mean by "it doesn't work"? Well, claude code is really good at executing things in unusual ways when it needs to, and this is trying to parse shell to catch them. When claude code has trouble running…
I created the feature request for hooks so I could build an integrated governance capability.
I don’t quite yet think the real use cases for hooks has materialized. Through a couple more maturity phases it will. Even though it might seem paradoxical with “the models will just get better” - to which is exactly why we have to be hooked into the mech suits as they'll end up doing more involved things.
But I do pitch my initial , primitive, solution as “an early warning system” at best when used for security , but more so an actual way (opa/rego) to institute your own policies: