PlugMyPlugin
← Browse

pgrep-pkill-guard

rvenutolo ★ 0

This Claude Code PreToolUse hook blocks pgrep/pkill commands that would match the agent's own shell process or create infinite polling loops, preventing unintended session termination and timeouts. When a dangerous command pattern is detected, it denies execution and provides specific mitigations such as killing by PID, using --ignore-ancestors, or the bracket-hiding regex trick.

Security DevOps No API key detected runs shell

Install

> /plugin marketplace add rvenutolo/claude-pgrep-pkill-guard
> /plugin install pgrep-pkill-guard

Source: https://github.com/rvenutolo/claude-pgrep-pkill-guard

What it's made of

1 hook

Commands
0
Agents
0
Skills
0
MCP servers
0
Hooks
1 · PreToolUse

What it needs & plugs into

API keys
none
Paid services
none detected
External tools
pgrep-pkill-guard.sh
Talks to
nothing external detected

Analyzed . Facts extracted from the plugin's files. Prose generated by claude-haiku-4-5-20251001.

Is this your plugin?

Claim it to keep the card accurate and enter the weekly contest. Requires signing in as the GitHub owner (rvenutolo).