@kenryu42/claude-code-safety-net

by kenryu42 · v1.0.0 · prompt

A Claude Code and OpenCode plugin that blocks destructive git and filesystem commands before execution. It works as a PreToolUse hook that intercepts Bash commands and denies dangerous operations like

Install

Add @kenryu42/claude-code-safety-net to Claude Code with the PolySkill CLI: polyskill add @kenryu42/claude-code-safety-net

Instructions

# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project Overview A Claude Code and OpenCode plugin that blocks destructive git and filesystem commands before execution. It works as a PreToolUse hook that intercepts Bash commands and denies dangerous operations like `git reset --hard`, `rm -rf`, and `git checkout -- <files>`. ## Commands - **Setup**: `bun install` - **All checks**: `bun run check` (runs lint, typecheck, knip, ast-grep scan, tests) - **Single test**: `bun test tests/file.test.ts` - **Test pattern**: `bun test…

Keywords: github, git-safety, bash-command-protection, filesystem-security, pretooluse-hook, code-safety, destructive-command-blocker, openai-claude, devops-tools