Stats
Actions
Tags
From agentic-guardrails
Tracks file changes and captures bash evidence during Claude Code sessions. Runs Python scripts via uv on Edit/Write/Bash events to detect state and record file modifications.
3 events · 3 hooks
Safety signals detected in this hook configuration
Where this hook configuration is defined
Defined in hooks/hooks.json
Event handlers and matchers — expand Raw Configuration for the full JSON
Bash|PowerShell|Monitor|Write|Edit|NotebookEdit|Read|apply_patch|mcp__.*AGW_PY="$(command -v python3 || command -v python || command -v py || echo python3)"; exec "$AGW_PY" -c "import os,sys,glob,runpy,json; ev=sys.argv[1]; A=('codex' if (os.environ.get('CODEX_HOME') or os.environ.get('PLUGIN_ROOT')) else 'claude'); C=os.path.expanduser('~/.claude/plugins/cache'); X=os.path.expanduser('~/.codex/plugins/cache'); H=os.path.expanduser('~'); W=os.getcwd(); R=os.environ.get('PLUGIN_ROOT') or os.environ.get('CLAUDE_PLUGIN_ROOT') or ''; G=[C+'/*/agentic-guardrails*',C+'/*/agentic-guardrails*/*',X+'/*/agentic-guardrails*',X+'/*/agentic-guardrails*/*',W+'/.remote-plugins/plugin_*',W+'/*/.remote-plugins/plugin_*',W+'/../.remote-plugins/plugin_*',W+'/../../.remote-plugins/plugin_*',H+'/.remote-plugins/plugin_*',H+'/*/.remote-plugins/plugin_*',H+'/*/*/.remote-plugins/plugin_*',H+'/*/*/rpm/plugin_*',H+'/*/*/*/rpm/plugin_*',H+'/AppData/Roaming/Claude/local-agent-mode-sessions/*/*/rpm/plugin_*',H+'/Library/Application Support/Claude/local-agent-mode-sessions/*/*/rpm/plugin_*',H+'/.config/Claude/local-agent-mode-sessions/*/*/rpm/plugin_*']; ok=lambda c: bool(c) and os.path.isfile(os.path.join(c,'scripts',A,'_dispatch.py')) and os.path.isfile(os.path.join(c,'scripts',A,ev+'.py')); pool=[c for g in G for c in glob.glob(g)]+[v for v in os.environ.values() if v and 'plugin' in v.lower()]; valid=sorted([c for c in pool if ok(c)], key=lambda c: os.path.getmtime(c), reverse=True); root=(R if ok(R) else (valid[0] if valid else None)); sys.argv=[ev,ev]; runpy.run_path(os.path.join(root,'scripts',A,'_dispatch.py'),run_name='__main__') if root else (ev=='pretooluse' and (sys.stderr.write('agentic-guardrails: cannot locate scripts; failing closed\n'),json.dump({'hookSpecificOutput':{'hookEventName':'PreToolUse','permissionDecision':'ask','permissionDecisionReason':'agentic-guardrails could not locate its scripts; failing closed. Review this operation manually.'}},sys.stdout)))" pretooluse15msBash|PowerShell|Monitor|Write|Edit|NotebookEdit|Read|apply_patchAGW_PY="$(command -v python3 || command -v python || command -v py || echo python3)"; exec "$AGW_PY" -c "import os,sys,glob,runpy,json; ev=sys.argv[1]; A=('codex' if (os.environ.get('CODEX_HOME') or os.environ.get('PLUGIN_ROOT')) else 'claude'); C=os.path.expanduser('~/.claude/plugins/cache'); X=os.path.expanduser('~/.codex/plugins/cache'); H=os.path.expanduser('~'); W=os.getcwd(); R=os.environ.get('PLUGIN_ROOT') or os.environ.get('CLAUDE_PLUGIN_ROOT') or ''; G=[C+'/*/agentic-guardrails*',C+'/*/agentic-guardrails*/*',X+'/*/agentic-guardrails*',X+'/*/agentic-guardrails*/*',W+'/.remote-plugins/plugin_*',W+'/*/.remote-plugins/plugin_*',W+'/../.remote-plugins/plugin_*',W+'/../../.remote-plugins/plugin_*',H+'/.remote-plugins/plugin_*',H+'/*/.remote-plugins/plugin_*',H+'/*/*/.remote-plugins/plugin_*',H+'/*/*/rpm/plugin_*',H+'/*/*/*/rpm/plugin_*',H+'/AppData/Roaming/Claude/local-agent-mode-sessions/*/*/rpm/plugin_*',H+'/Library/Application Support/Claude/local-agent-mode-sessions/*/*/rpm/plugin_*',H+'/.config/Claude/local-agent-mode-sessions/*/*/rpm/plugin_*']; ok=lambda c: bool(c) and os.path.isfile(os.path.join(c,'scripts',A,'_dispatch.py')) and os.path.isfile(os.path.join(c,'scripts',A,ev+'.py')); pool=[c for g in G for c in glob.glob(g)]+[v for v in os.environ.values() if v and 'plugin' in v.lower()]; valid=sorted([c for c in pool if ok(c)], key=lambda c: os.path.getmtime(c), reverse=True); root=(R if ok(R) else (valid[0] if valid else None)); sys.argv=[ev,ev]; runpy.run_path(os.path.join(root,'scripts',A,'_dispatch.py'),run_name='__main__') if root else None" posttooluse10msstartup|resume|clearAGW_PY="$(command -v python3 || command -v python || command -v py || echo python3)"; exec "$AGW_PY" -c "import os,sys,glob,runpy,json; ev=sys.argv[1]; A=('codex' if (os.environ.get('CODEX_HOME') or os.environ.get('PLUGIN_ROOT')) else 'claude'); C=os.path.expanduser('~/.claude/plugins/cache'); X=os.path.expanduser('~/.codex/plugins/cache'); H=os.path.expanduser('~'); W=os.getcwd(); R=os.environ.get('PLUGIN_ROOT') or os.environ.get('CLAUDE_PLUGIN_ROOT') or ''; G=[C+'/*/agentic-guardrails*',C+'/*/agentic-guardrails*/*',X+'/*/agentic-guardrails*',X+'/*/agentic-guardrails*/*',W+'/.remote-plugins/plugin_*',W+'/*/.remote-plugins/plugin_*',W+'/../.remote-plugins/plugin_*',W+'/../../.remote-plugins/plugin_*',H+'/.remote-plugins/plugin_*',H+'/*/.remote-plugins/plugin_*',H+'/*/*/.remote-plugins/plugin_*',H+'/*/*/rpm/plugin_*',H+'/*/*/*/rpm/plugin_*',H+'/AppData/Roaming/Claude/local-agent-mode-sessions/*/*/rpm/plugin_*',H+'/Library/Application Support/Claude/local-agent-mode-sessions/*/*/rpm/plugin_*',H+'/.config/Claude/local-agent-mode-sessions/*/*/rpm/plugin_*']; ok=lambda c: bool(c) and os.path.isfile(os.path.join(c,'scripts',A,'_dispatch.py')) and os.path.isfile(os.path.join(c,'scripts',A,ev+'.py')); pool=[c for g in G for c in glob.glob(g)]+[v for v in os.environ.values() if v and 'plugin' in v.lower()]; valid=sorted([c for c in pool if ok(c)], key=lambda c: os.path.getmtime(c), reverse=True); root=(R if ok(R) else (valid[0] if valid else None)); sys.argv=[ev,ev]; runpy.run_path(os.path.join(root,'scripts',A,'_dispatch.py'),run_name='__main__') if root else None" sessionstart15ms79plugins reuse this hooks config
First indexed Nov 28, 2025
Showing the 6 earliest of 79 plugins
npx claudepluginhub profsynapse/synaptic-labs-plugins --plugin agentic-guardrails