pi-session-cleanup
Pass
Audited by Gen Agent Trust Hub on Oct 16, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill invokes a local Python script (
pi-session-cleanup.py) to perform its primary functions. The script is provided as part of the skill and is executed using standard shell commands for scanning (--stats), previewing (--verbose), and cleaning (--execute) files. - [INDIRECT_PROMPT_INJECTION]: The skill possesses a data ingestion surface as it reads and parses conversation logs (
.jsonlfiles) from the user's session directory (~/.pi/sessions). - Ingestion points: The
parse_session_filefunction inpi-session-cleanup.pyreads local session logs. - Boundary markers: The instructions explicitly require the agent to present a summary and use
ask_user_questionfor user confirmation before deletion. - Capability inventory: The script has file system capabilities (
os.remove,os.rmdir) but is restricted to the specific session directory. - Sanitization: The script uses
json.loadsfor structured parsing and only extracts metadata for reporting, reducing the risk of accidental instruction obedience. - [SAFE]: The skill's behavior matches its described purpose of file management. It operates entirely locally without network access, uses no obfuscation, and includes safety mechanisms like a dry-run default and human-in-the-loop confirmation for destructive actions.
Audit Metadata