Pi Privileged Execution
Use this skill when a local Pi session needs administrator privileges or must perform deletion that may affect the whole machine.
Required Tool
Use the privileged_exec tool for every command that requires sudo. Pass the exact shell command and working directory. Do not pre-expand, hide, rewrite, or split the command to avoid the approval boundary.
The Pi extension will show the command and ask the user for approval. If the sudo credential cache is unavailable, it will show a masked password field inside Pi. Never ask the user to paste a password into a model message or command.
Secret Rules
Never request, echo, store, or place the password in a command, prompt, file, environment variable, tool argument, model message, notification, or returned result. The extension owns password entry and authentication.
Do not retry after denial, cancellation, failed authentication, unavailable TUI, or command failure. Report the failure and wait for the user.
Deletion Rules
Clearly local literal rm commands may use ordinary bash. Global or ambiguous deletion requires explicit approval. Treat root paths, home-directory references, wildcards, variables, shell wrappers, and equivalent deletion commands such as find ... -delete as approval-required.
If ordinary bash blocks a command containing sudo, repeat the exact request through privileged_exec. Do not work around the extension with another shell, environment variable, temporary file, or encoded password.
Local Installation
Expose this skill to Pi's global skill directory:
ln -sfn "/Users/braydon/projects/experiments/braydon-workspace-skills/skills/pi-privileged-execution" "$HOME/.agents/skills/pi-privileged-execution"
Then append this exact path to the existing extensions array in ~/.pi/agent/settings.json without replacing existing extensions:
/Users/braydon/projects/experiments/braydon-workspace-skills/skills/pi-privileged-execution/extension/index.ts
Restart Pi after changing the settings. The Markdown skill is guidance; the companion extension is the enforcement boundary.
Example
User: Install the local service dependency.
Agent: I will request privileged_exec with the exact install command. Pi will show you the command and ask for approval before it runs.