Configurable regex-based alert system for detecting patterns in tool calls and session activity. Supports error triggers, content regex matching, token threshold triggers, and pattern detection with configurable actions.
Configurable regex-based alert system for detecting patterns in tool calls and session activity. Supports error triggers, content regex matching, token threshold triggers, and pattern detection with configurable actions.
version
1
model
sonnet
invoked_by
both
user_invocable
true
tools
["Read","Bash","Grep","Write","TaskUpdate"]
verified
true
lastVerifiedAt
"2026-03-23T23:18:08.049Z"
best_practices
["Follow existing project patterns","Document all outputs clearly","Handle errors gracefully"]
error_handling
graceful
streaming
supported
source
builtin
trust_score
100
provenance_sha
bd3ac619db5020d4
Notification Triggers
Notification Triggers Skill - Configurable regex-based alert system for detecting patterns in tool calls and session activity. Supports error triggers, content regex matching, token threshold triggers, and pattern detection with configurable actions.
- Notification Triggers primary function
- Integration with agent ecosystem
- Standardized output generation
Step 1: Gather Context
Read relevant files and understand requirements
Step 2: Execute
Perform the skill's main function using available tools
Step 3: Output
Return results and save artifacts if applicable
</execution_process>
<best_practices>
Follow existing project patterns: Follow this practice for best results
Document all outputs clearly: Follow this practice for best results
Handle errors gracefully: Follow this practice for best results
</best_practices>
**Example Commands**:
# Invoke this skill
/notification-triggers [arguments]
# Or run the script directly
node .claude/skills/notification-triggers/scripts/main.cjs --help
</usage_example>
Trigger Configuration Schema
Notification triggers are defined in .claude/context/runtime/notification-triggers.json:
{"version":"1.0","triggers":[{"id":"unique-trigger-id","name":"Human-readable trigger name","description":"What this trigger detects","type":
Validate schema against notification-triggers.schema.json
Filter to enabled triggers only
Step 2: Evaluate Conditions
For each enabled trigger:
Error triggers: Check tool output for exception patterns
Regex triggers: Match pattern against tool stdout/stderr
Token threshold: Sum session tokens, compare to minTokens
Pattern triggers: Count regex occurrences in recent output, compare to minOccurrences
Step 3: Execute Matched Actions
If condition is true:
Process action in order (log → alert → spawn → interrupt)
Render message templates with context variables
Record trigger fire in .claude/context/runtime/notification-log.jsonl
Step 4: Record Event
{"timestamp":"ISO-8601","triggerId":"id","triggerName":"name","matched":true,"context":{"sessionId":"current session","taskId":"current task","tokenCount": number
}}