Prevent AI agents from running destructive Git commands with BFG
CatEatsDogs · reddit · 2026-08-26
After experiencing incidents where Qwen and Claude overwrote unsaved code changes via random Git commands, the author created a Skill/Plugin called BFG to block destructive Git operations.
Features
- Blocks all potentially destructive commands (e.g., git stash pop);
- Keeps read-only commands functional;
- Has already prevented data loss multiple times in two weeks of use.
The project is open-sourced on GitHub for developers concerned about AI agent mishaps.
More from coding & agent
- Hermes agent on Omarchy installs Pinokio itself: OS + agent + runtime stack — cocktailpeanut · 2026-08-26
- Anthropic Publishes AI-Native SDLC Playbook — rseroter · 2026-08-26
- Mastra launches skill search for agents with on-the-fly loading — ycombinator · 2026-08-26
- GitHub Spec Kit booms: Spec-driven development replaces vibe coding — Shruti_0810 · 2026-08-26
- FreeLLMAPI Aggregates 34 Free LLM Providers into Single OpenAI-Compatible Endpoint — tom_doerr · 2026-08-26
- OpenAI demos WebMCP: Building agent-ready sites for 3D collaboration — OpenAI · 2026-08-26