Skip to content

Sensors Catalog

Sensors are shell scripts wired into Claude Code’s hook system. They run automatically on specific events — agents cannot bypass them. Each sensor has an event that triggers it and an optional matcher that filters which tools it applies to.

NameDescriptionEventMatcherCompatible AgentsRequired
agent-reviewOutputs a review checklist after a dispatched agent completes workPostToolUseAgenttech-leadNo
api-security-checkDetects security anti-patterns in code changes — SQL injection, hardcoded secrets, eval, CORS wildcardsPreToolUseEditWritebackend, fullstack, security
compact-recoveryRe-injects minimal context after /compact (Quick Triggers + Work State only)SessionStartcompactallYes (all)
context-guardInjects context-aware behavioral constraints and detects session wrap-up trigger words before each promptUserPromptSubmitallYes (all)
dispatch-guardValidates code agent dispatches — requires worktree isolation, plan reference, and plan existence before executionPreToolUseAgenttech-leadNo
iac-safety-guardBlocks dangerous infrastructure commands — terraform destroy, kubectl delete namespace, unsafe docker opsPreToolUseBashdevopsNo
routine-checkChecks routine dashboard at session start and flags overdue maintenance routinesSessionStartallAuto-managed
scope-guard-commandsBlocks agent from running application execution commands (tests, builds, servers)PreToolUseBashsecurity, tech-leadNo
scope-guard-filesBlocks agent from editing files outside its workspacePreToolUseEditWriteall
session-contextInjects core identity, memory, protocols, and project status at session startSessionStartstartupresumeclear
status-barPersistent status line showing context usage, session health, and git state after every responseStopallYes (all)
subagent-stop-reviewOutputs a structured review checklist when a dispatched agent finishes workSubagentStoptech-leadNo
test-integrity-guardDetects test quality issues — removed assertions, .skip/.only, empty test bodies, debug artifactsPreToolUseEditWritebackend, frontend, fullstack

Guards block actions that violate boundaries or safety rules. They intercept tool calls before they execute and prevent dangerous operations.

  • scope-guard-files (required) — Prevents agents from editing files outside their workspace directory. This is the primary workspace isolation mechanism.
  • scope-guard-commands — Prevents the Tech Lead and Security agents from running application execution commands (tests, builds, servers) — these agents orchestrate, not execute.
  • dispatch-guard — Validates that code agent dispatches use worktree isolation, reference a plan, and that the plan file exists. Tech Lead only.
  • iac-safety-guard — Blocks destructive infrastructure commands like terraform destroy and kubectl delete namespace. DevOps only.

Context injection sensors add information at key moments — session start, before prompts, or after responses.

  • session-context (required) — Injects the agent’s core identity, working memory, protocols, and current project status at session start. This is how agents “wake up” with context.
  • context-guard (required) — Injects behavioral constraints before each user prompt and detects session wrap-up trigger words (e.g., “that’s all”, “wrap up”).
  • status-bar (required) — Displays a persistent status line after every response showing context usage percentage, session health, and current git state.

Review sensors output checklists after agents complete work, prompting the Tech Lead to verify quality.

  • agent-review — Outputs a review checklist after a dispatched code agent completes work via the Agent tool (PostToolUse).
  • subagent-stop-review — Outputs a structured review checklist when a dispatched agent finishes work (SubagentStop event).

Code quality sensors detect anti-patterns in code changes before they are written.

  • api-security-check — Scans code edits for security anti-patterns: SQL injection, hardcoded secrets, eval(), CORS wildcards, and similar issues.
  • test-integrity-guard — Catches test quality issues: removed assertions, .skip/.only left in tests, empty test bodies, and debug artifacts.
  • routine-check — Parses the routine dashboard at session start and flags any overdue maintenance routines. This sensor is auto-managed: it is installed when any routines are present and removed when the last routine is removed. You do not install or remove it manually.

Sensors listen to Claude Code hook events. The available events are:

EventWhen it fires
SessionStartOnce at the beginning of a new session
UserPromptSubmitBefore each user message is processed
PreToolUseBefore a tool call executes (use matcher to filter by tool)
PostToolUseAfter a tool call completes (use matcher to filter by tool)
StopAfter each agent response
SubagentStopWhen a dispatched subagent finishes
Agent TypeDefault Sensors
Tech Leadsession-context, scope-guard-files, scope-guard-commands, dispatch-guard, subagent-stop-review
Backendsession-context, scope-guard-files
Frontendsession-context, scope-guard-files
Full-Stacksession-context, scope-guard-files
DevOpssession-context, scope-guard-files, iac-safety-guard
Securitysession-context, scope-guard-files, scope-guard-commands, api-security-check