pi-events
CommunityIntercept and control Pi agent events
AuthordotBeeps
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Pi agents need reliable hooks to observe, modify, and control their runtime behavior; pi-events provides a unified way to intercept tool calls, user input, system prompt composition, and session lifecycle events so extensions can enforce safety, mutate arguments, and inject context without modifying core agent code.
Core Features & Use Cases
- Tool Call Interception & Blocking: Pre-empt tool execution, mutate arguments in-place, or return a block reason to prevent dangerous operations.
- Result & Input Transformation: Modify tool results before finalization and transform or handle raw user input before it reaches the LLM.
- System Prompt & Context Injection: Inject persistent or transient messages and append system prompt text per turn for steering behavior.
- Session & Model Event Handling: React to session start/switch/fork, compaction events, model selection, and message streaming for state restoration and telemetry.
- Provider & Execution Inspection: Inspect or patch provider payloads and track tool execution lifecycle for logging or proxying.
- Safety Patterns: Examples and anti-patterns showing confirmations for destructive actions, lightweight streaming handlers, and proper use of command-only context methods.
Quick Start
Intercept tool calls to block destructive shell commands and inject a transient system prompt reminding the assistant to be concise.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: pi-events Download link: https://github.com/dotBeeps/hoard/archive/main.zip#pi-events Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.