frmoretto/hardstop
27 stars · Last commit 2026-04-18
Don't let AI destroy your hard work! HardStop is a rock-solid protection for AI-generated commands. Pre-execution safety validation for Claude Code, Claude Cowork. Catches dangerous commands before they run: whether from AI mistakes, hallucinations, prompt injection, or misunderstood instructions. Seatbelts for the agentic AI era.
README preview
# 🛑 Hardstop [](https://www.npmjs.com/package/hardstop) [](https://www.npmjs.com/package/hardstop) [](https://github.com/frmoretto/hardstop/stargazers) [](LICENSE) [](https://www.npmjs.com/package/hardstop) [](https://github.com/frmoretto/hardstop/actions/workflows/test.yml) [](https://codecov.io/gh/frmoretto/hardstop) [](https://www.python.org/downloads/) [](https://github.com/frmoretto/hardstop) [](https://github.com/frmoretto/hardstop/attestations) > 👉 **[⭐ Star on GitHub](https://github.com/frmoretto/hardstop)** if Hardstop keeps you safe! Pre-execution safety validation for AI coding agents. Validates every shell command against 428 security patterns before execution — blocking destructive operations, credential theft, infrastructure teardown, and prompt injection. Fail-closed: blocks by default when uncertain. **Ecosystem:** The detection patterns are published separately as [hardstop-patterns](https://www.npmjs.com/package/hardstop-patterns) ([GitHub](https://github.com/frmoretto/hardstop-patterns)) — reusable in any Node.js tool. [Installation](#-installation) • [How It Works](#%EF%B8%8F-how-it-works) • [Commands](#%EF%B8%8F-controls) • [Report Issue](https://github.com/frmoretto/hardstop/issues)