system_reminder
Inject contextual guidance into tool results
What it does
The system_reminder plugin injects contextual guidance into tool results to nudge agent behavior—without extra API calls.
Example: After writing code
code
Quick Start
main.py
Want to customize? Run co copy system_reminder to get an editable copy with built-in reminders.
How it works
┌─────────────────────────────────────────────┐ │ SYSTEM REMINDER FLOW │ ├─────────────────────────────────────────────┤ │ │ │ 1. Tool executes (e.g., write_file) │ │ ↓ │ │ 2. after_each_tool event fires │ │ ↓ │ │ 3. Plugin checks triggers: │ │ - tool name matches? │ │ - path pattern matches? │ │ ↓ │ │ 4. If match: append system reminder │ │ ↓ │ │ 5. LLM sees result + system reminder │ │ │ └─────────────────────────────────────────────┘
Reminder Categories
Based on Claude Code patterns, system reminders fall into five categories:
| Category | Purpose | Example |
|---|---|---|
| Workflow Nudges | Gentle best practice suggestions | "Consider running tests" |
| State Notifications | Inform about state changes | "You exited plan mode" |
| External Events | React to external changes | "File was modified by linter" |
| Next Steps | Guide what to do next | "Verify your implementation" |
| Context Injection | Provide relevant info | "This file contains secrets" |
Reminder File Format
Each system reminder is a markdown file with YAML frontmatter:
code
Frontmatter Fields
| Field | Required | Description |
|---|---|---|
name | Yes | Unique identifier |
triggers | Yes | List of trigger conditions |
triggers[].tool | No | Tool name to match |
triggers[].path_pattern | No | Glob pattern(s) for file paths |
triggers[].command_pattern | No | Glob pattern(s) for commands |
Customizing
Copy the plugin and built-in reminders to your project:
code
Python REPL
Interactive
This creates:
code
Then import from your local copy and add new reminders:
main.py
Design Principles
Gentle, Not Forceful
- ✓ "Consider running tests"
- ✗ "You MUST run tests now"
Contextual, Not Spammy
Fire only when relevant, not after every tool call
Events Used
| Event | Handler | Purpose |
|---|---|---|
after_each_tool | inject_reminder | Append matching reminder to tool result |
Source
connectonion/useful_plugins/system_reminder.py
main.py
